Merge remote-tracking branch 'upstream/master' into d6/binary
This commit is contained in:
commit
3904d428a8
|
@ -79,7 +79,12 @@ put_reg(char r)
|
|||
if(*s == '(') s++, --ss;
|
||||
while(s < ss) {
|
||||
char c = *s++;
|
||||
if(c == '\\' && *s++ == 'n') c = 0xa;
|
||||
if(c == '\\') {
|
||||
switch(*s++) {
|
||||
case 'n': putc(0x0a, stdout); break;
|
||||
case 's': putc(0x20, stdout); break;
|
||||
}
|
||||
} else
|
||||
putc(c, stdout);
|
||||
}
|
||||
} else
|
||||
|
@ -200,7 +205,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, 11 Apr 2024.\n");
|
||||
return !printf("Modal Interpreter, 12 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