Added align register

This commit is contained in:
Devine Lu Linvega 2024-04-17 09:17:31 -07:00
parent 9dd3439986
commit 3bce3dab79
1 changed files with 13 additions and 1 deletions

View File

@ -65,10 +65,22 @@ put_reg(char r)
for(i = 0; i < depth; i++) for(i = 0; i < depth; i++)
*dst_++ = ')'; *dst_++ = ')';
} }
} else if(r == '.') { /* unpack */ } else if(r == '.') { /* special unpack */
if(*s == '(') if(*s == '(')
s++, --ss; s++, --ss;
while(s < ss) *dst_++ = *s++; while(s < ss) *dst_++ = *s++;
} else if(r == '^') { /* special align */
int i, depth = 0;
s++;
while(s < ss) {
*dst_++ = '(';
while((c = *s) && !spacer(c))
*dst_++ = c, s++;
if(s < ss - 1) *dst_++ = ' ';
s++, depth++;
}
for(i = 0; i < depth; i++)
*dst_++ = ')';
} else if(r == ':') { /* special stdout */ } else if(r == ':') { /* special stdout */
if(*s == '(') s++, --ss; if(*s == '(') s++, --ss;
while(s < ss) { while(s < ss) {