Attempt at spacing out special characters

This commit is contained in:
Devine Lu Linvega 2024-04-13 16:25:19 -07:00
parent 42fd486a41
commit 7e7e455b03
1 changed files with 4 additions and 1 deletions

View File

@ -210,7 +210,10 @@ main(int argc, char **argv)
if(c == ')' && *(w - 1) == ' ') w--;
if(c == ' ' && *(w - 1) == ' ') w--;
}
*w++ = c;
if(c == '[' || c == ']' || c == '{' || c == '}')
*w++ = ' ', *w++ = c, *w++ = ' ';
else
*w++ = c;
}
while(*(--w) <= ' ') *w = 0;
fclose(f);