Explode terminates in an empty list
This commit is contained in:
parent
30690c1d83
commit
819ea2f1fa
|
@ -43,12 +43,8 @@ plode(char *s)
|
|||
if(!depth) return s;
|
||||
}
|
||||
} else { /* explode */
|
||||
*outp_++ = *s++;
|
||||
if(!spacer(*s)) *outp_++ = ' ';
|
||||
while((c = *s++) && !spacer(c)) {
|
||||
*outp_++ = '(', *outp_++ = c, depth++, c = *s;
|
||||
if(!spacer(c)) *outp_++ = ' ';
|
||||
}
|
||||
while((c = *s++) && !spacer(c))
|
||||
*outp_++ = c, *outp_++ = ' ', *outp_++ = '(', depth++;
|
||||
for(i = 0; i < depth; i++)
|
||||
*outp_++ = ')';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue