Fixed issue in explode
This commit is contained in:
parent
9a61ef90f3
commit
417ac2f2ad
|
@ -43,11 +43,11 @@ plode(char *s)
|
|||
if(!depth) return s;
|
||||
}
|
||||
} else { /* explode */
|
||||
*outp_++ = *s++, *outp_++ = ' ';
|
||||
*outp_++ = *s++;
|
||||
if(!spacer(*s)) *outp_++ = ' ';
|
||||
while((c = *s++) && !spacer(c)) {
|
||||
*outp_++ = '(', *outp_++ = c, depth++, c = *s;
|
||||
if(!spacer(c))
|
||||
*outp_++ = ' ';
|
||||
if(!spacer(c)) *outp_++ = ' ';
|
||||
}
|
||||
for(i = 0; i < depth; i++)
|
||||
*outp_++ = ')';
|
||||
|
@ -193,7 +193,7 @@ main(int argc, char **argv)
|
|||
if(argc < 2)
|
||||
return !printf("usage: modal [-v] source.modal\n");
|
||||
if(argc < 3 && argv[1][0] == '-' && argv[1][1] == 'v')
|
||||
return !printf("Modal Interpreter, 8 Apr 2024.\n");
|
||||
return !printf("Modal Interpreter, 10 Apr 2024.\n");
|
||||
if(!(f = fopen(argv[1], "r")))
|
||||
return !printf("Invalid Modal file: %s.\n", argv[1]);
|
||||
while(fread(&c, 1, 1, f)) {
|
||||
|
|
Loading…
Reference in New Issue