|
|
@ -1,6 +1,6 @@ |
|
|
|
# main.leg -- C parser + interpreter |
|
|
|
# |
|
|
|
# Last edited: 2025-01-24 22:12:50 by piumarta on zora |
|
|
|
# Last edited: 2025-01-25 08:53:25 by piumarta on m1mbp |
|
|
|
|
|
|
|
%{ |
|
|
|
; |
|
|
@ -1339,7 +1339,9 @@ void popInput(void) |
|
|
|
|
|
|
|
FILE *sysOpen(char *path) |
|
|
|
{ |
|
|
|
FILE *fp = fopen(path, "r"); |
|
|
|
char abspath[1024]; |
|
|
|
snprintf(abspath, sizeof(abspath), "include/%s", path); |
|
|
|
FILE *fp = fopen(abspath, "r"); |
|
|
|
if (!fp) fatal("#include <%s>: %s", path, strerror(errno)); |
|
|
|
return fp; |
|
|
|
} |
|
|
|