summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-01-04 20:24:07 +0800
committerJSDurand <mmemmew@gmail.com>2022-01-04 20:24:07 +0800
commit949888ad5d0cd0f9f9a87f9938a632b3e32df051 (patch)
treeae9155484a3a5b4124c6d3fae14ada9d718c8579 /src/util.h
parent55dc897da6e81f2a26cfc7e66ac942824773498b (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.h')
-rw-r--r--src/util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h
index 9120e9b..940b7e4 100644
--- a/src/util.h
+++ b/src/util.h
@@ -28,8 +28,8 @@ typedef unsigned long long UNUM; /* definitely bigger than size_t */
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
-#define fleprintf0(M) eprintf(M, __FILE__, __LINE__)
-#define fleprintf(M, ...) eprintf(M, __FILE__, __LINE__, __VA_ARGS__)
+#define fleprintf0(M) eprintf("%s:%d, " M, __FILE__, __LINE__)
+#define fleprintf(M, ...) eprintf("%s:%d, " M, __FILE__, __LINE__, __VA_ARGS__)
unsigned char read_entire_file(const char *file_name, char **str, NUM *len);