diff options
author | JSDurand <mmemmew@gmail.com> | 2022-01-04 20:24:07 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2022-01-04 20:24:07 +0800 |
commit | 949888ad5d0cd0f9f9a87f9938a632b3e32df051 (patch) | |
tree | ae9155484a3a5b4124c6d3fae14ada9d718c8579 /src/util.c | |
parent | 55dc897da6e81f2a26cfc7e66ac942824773498b (diff) |
Fix problems
Now some problems are fixed.
It can now read grammar correctly (hopefully) from a file, in the BNF
format. And strings (terminals) are handled fine as well. So glad
that there are no leak problems now.
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -20,7 +20,7 @@ read_entire_file(const char *file_name, char **str, NUM *len) FILE *file = fopen(file_name, "r"); if (!file) { - eprintf("%s:%d, Cannot open file \"%s\": ", + eprintf("%s:%Cannot open file \"%s\": ", __FILE__, __LINE__, file_name); perror(NULL); return 1; @@ -35,7 +35,7 @@ read_entire_file(const char *file_name, char **str, NUM *len) *str = realloc(*str, 1+file_size); if (*str == NULL) { - fleprintf0("%s:%d, Cannot realloc\n"); + fleprintf0("Cannot realloc\n"); return 1; } |