summaryrefslogtreecommitdiff
path: root/core/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/lexer.c')
-rw-r--r--core/lexer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/lexer.c b/core/lexer.c
index 72aa942..ac5194f 100644
--- a/core/lexer.c
+++ b/core/lexer.c
@@ -9,6 +9,7 @@
#include <string.h>
#include "defconf/lexer.h"
#include "defconf/ptrbox.h"
+#include "defconf/trace.h"
/* Constants */
#define MAX_KW_LEN 32
@@ -107,7 +108,7 @@ lexer_scan_ident(struct defconf_state *state, int lc)
buf[bufind++] = lc;
for (;;) {
if (bufind >= sizeof(buf) - 1) {
- printf("fatal: token exceeds maximum length\n");
+ trace_fatal(state, "token exceeds maximum length\n");
return NULL;
}
@@ -191,6 +192,6 @@ lexer_scan(struct defconf_state *state, struct token *result)
return 0;
}
- printf("fatal: unexpected token '%c'\n", c);
+ trace_fatal(state, "unexpected token '%c'\n", c);
return -1;
}