aboutsummaryrefslogtreecommitdiff
path: root/src/preprocess.c
diff options
context:
space:
mode:
authorMarvin Borner2021-07-27 21:10:34 +0200
committerMarvin Borner2021-07-27 21:10:34 +0200
commitbfdc8d2d843c08bd01517256a63518d03da236f6 (patch)
tree399cfdb73a1716b8d8f6efb1447990f917a9242a /src/preprocess.c
parent56c2a240f379ca3d12b1bb5a9950c1663ba33763 (diff)
Started treeify
Diffstat (limited to 'src/preprocess.c')
-rw-r--r--src/preprocess.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/preprocess.c b/src/preprocess.c
index dec55b7..8d9394a 100644
--- a/src/preprocess.c
+++ b/src/preprocess.c
@@ -1,4 +1,8 @@
-#include <lib.h>
+#include <assert.h>
+#include <math.h>
+#include <stddef.h>
+#include <string.h>
+
#include <log.h>
#include <preprocess.h>
@@ -29,7 +33,7 @@ void preprocess(struct ctx *ctx)
} else if (cur == '\0') {
break;
} else if (cur == '#' && ctx->column == 1) {
- if (strncmp(ctx->raw + i + 1, "inc ", MIN(4, ctx->size - i)) == 0) {
+ if (strncmp(ctx->raw + i + 1, "inc ", fmin(4, ctx->size - i)) == 0) {
// TODO: Add include features
} else if (*(ctx->raw + i + 1) == '#') {
// Comment