Added comments for special registers
This commit is contained in:
parent
e897e59f7a
commit
70e96e9644
|
@ -48,18 +48,19 @@ put_reg(char r)
|
||||||
char c, *s = regs[(int)r];
|
char c, *s = regs[(int)r];
|
||||||
if(r == '~') {
|
if(r == '~') {
|
||||||
char buf;
|
char buf;
|
||||||
|
/* special stdin */
|
||||||
while(fread(&buf, 1, 1, stdin) && buf >= ' ')
|
while(fread(&buf, 1, 1, stdin) && buf >= ' ')
|
||||||
*outp_++ = buf;
|
*outp_++ = buf;
|
||||||
} else if(s) {
|
} else if(s) {
|
||||||
char *ss = walk(s);
|
char *ss = walk(s);
|
||||||
if(r == '*') {
|
if(r == '*') {
|
||||||
/* implode */
|
/* special implode */
|
||||||
if(*s == '(') {
|
if(*s == '(') {
|
||||||
ss = walk(s);
|
ss = walk(s);
|
||||||
while(s < ss && (c = *s++))
|
while(s < ss && (c = *s++))
|
||||||
if(!spacer(c)) *outp_++ = c;
|
if(!spacer(c)) *outp_++ = c;
|
||||||
}
|
}
|
||||||
/* explode */
|
/* special explode */
|
||||||
else {
|
else {
|
||||||
int i, depth = 0;
|
int i, depth = 0;
|
||||||
while((c = *s++) && !spacer(c))
|
while((c = *s++) && !spacer(c))
|
||||||
|
@ -68,6 +69,7 @@ put_reg(char r)
|
||||||
*outp_++ = ')';
|
*outp_++ = ')';
|
||||||
}
|
}
|
||||||
} else if(r == ':') {
|
} else if(r == ':') {
|
||||||
|
/* special stdout */
|
||||||
if(*s == '(') s++, --ss;
|
if(*s == '(') s++, --ss;
|
||||||
while(s < ss) {
|
while(s < ss) {
|
||||||
c = *s++;
|
c = *s++;
|
||||||
|
|
Loading…
Reference in New Issue