Check for ?: register value before transform
This commit is contained in:
parent
16a1617820
commit
21ec6b9e6a
12
src/modal.c
12
src/modal.c
|
@ -73,16 +73,16 @@ put_reg(char r)
|
||||||
char *s = regs[(int)r];
|
char *s = regs[(int)r];
|
||||||
if(r == '*')
|
if(r == '*')
|
||||||
s = plode(s);
|
s = plode(s);
|
||||||
else if(r == ':') {
|
else if(s) {
|
||||||
char *bb = walk(s);
|
char *ss = walk(s);
|
||||||
if(*s == '(') s++, --bb;
|
if(r == ':') {
|
||||||
while(s < bb) {
|
if(*s == '(') s++, --ss;
|
||||||
|
while(s < ss) {
|
||||||
char c = *(s++);
|
char c = *(s++);
|
||||||
if(c == '\\' && *(s++) == 'n') c = 0xa;
|
if(c == '\\' && *(s++) == 'n') c = 0xa;
|
||||||
putc(c, stdout);
|
putc(c, stdout);
|
||||||
}
|
}
|
||||||
} else if(s) {
|
} else
|
||||||
char *ss = walk(s);
|
|
||||||
while((s < ss)) *outp_++ = *s++;
|
while((s < ss)) *outp_++ = *s++;
|
||||||
} else
|
} else
|
||||||
*outp_++ = r;
|
*outp_++ = r;
|
||||||
|
|
Loading…
Reference in New Issue