Simpler plode
This commit is contained in:
parent
819ea2f1fa
commit
a890215143
|
@ -34,13 +34,12 @@ static char *
|
|||
plode(char *s)
|
||||
{
|
||||
int i, depth = 0;
|
||||
char c;
|
||||
char c, *ss;
|
||||
if(s[0] == '(') { /* implode */
|
||||
while((c = *s++)) {
|
||||
if(c == '(') depth++;
|
||||
ss = walk(s);
|
||||
while(s < ss) {
|
||||
c = *(s++);
|
||||
if(!spacer(c)) *outp_++ = c;
|
||||
if(c == ')') --depth;
|
||||
if(!depth) return s;
|
||||
}
|
||||
} else { /* explode */
|
||||
while((c = *s++) && !spacer(c))
|
||||
|
|
Loading…
Reference in New Issue