summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-01-11 09:58:43 +0800
committerJSDurand <mmemmew@gmail.com>2022-01-11 09:58:43 +0800
commit91016bd3855375796fd1eabd501ebc12491f2655 (patch)
treec4a608966b686c9639a90b92c31c00632532fac8 /src/util.h
parent949888ad5d0cd0f9f9a87f9938a632b3e32df051 (diff)
Add the framework for character classes.
Now we have the potential to recognize character classes. But the most important task for us now is to experiment with ((B)RN)GLR algorithms, so we leave the character classes at the present state for a moment.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h
index 940b7e4..6d6072a 100644
--- a/src/util.h
+++ b/src/util.h
@@ -10,6 +10,8 @@ typedef long DATA;
typedef long NUM;
typedef unsigned long long UNUM; /* definitely bigger than size_t */
+typedef unsigned char BOOL;
+
#define HC_ATTR __attribute__((__hot__, __const__))
#define H_ATTR __attribute__((__hot__))
@@ -31,6 +33,6 @@ typedef unsigned long long UNUM; /* definitely bigger than size_t */
#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);
+BOOL read_entire_file(const char *file_name, char **str, NUM *len);
#endif