Fixed issue with trailing whitespace
This commit is contained in:
parent
479cd07383
commit
dacb9836a0
|
@ -132,7 +132,8 @@ write_rule(Rule *r, char last, char *res)
|
|||
put_reg(*b++);
|
||||
else
|
||||
*outp_++ = c, last = c;
|
||||
if(last == ' ' && outp_ - origin == 0) outp_--;
|
||||
if(outp_ - origin == 0)
|
||||
while(*res == ' ') res++;
|
||||
return commit_rule(r, res, 0);
|
||||
}
|
||||
|
||||
|
@ -200,7 +201,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, 13 Apr 2024.\n");
|
||||
return !printf("Modal Interpreter, 14 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