Do not walk twice for explode
This commit is contained in:
parent
70e96e9644
commit
42fd486a41
|
@ -47,16 +47,14 @@ put_reg(char r)
|
||||||
{
|
{
|
||||||
char c, *s = regs[(int)r];
|
char c, *s = regs[(int)r];
|
||||||
if(r == '~') {
|
if(r == '~') {
|
||||||
char buf;
|
|
||||||
/* special stdin */
|
/* special stdin */
|
||||||
while(fread(&buf, 1, 1, stdin) && buf >= ' ')
|
while(fread(&c, 1, 1, stdin) && c >= ' ')
|
||||||
*outp_++ = buf;
|
*outp_++ = c;
|
||||||
} else if(s) {
|
} else if(s) {
|
||||||
char *ss = walk(s);
|
char *ss = walk(s);
|
||||||
if(r == '*') {
|
if(r == '*') {
|
||||||
/* special implode */
|
/* special implode */
|
||||||
if(*s == '(') {
|
if(*s == '(') {
|
||||||
ss = walk(s);
|
|
||||||
while(s < ss && (c = *s++))
|
while(s < ss && (c = *s++))
|
||||||
if(!spacer(c)) *outp_++ = c;
|
if(!spacer(c)) *outp_++ = c;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue