From 06cb82a8ccc3587dff728321dff5416b18090483 Mon Sep 17 00:00:00 2001 From: katherine Date: Wed, 10 Jul 2019 20:24:08 -0700 Subject: implement deftype get --- src/tok.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/tok.c') diff --git a/src/tok.c b/src/tok.c index 9b57459..e6b385d 100644 --- a/src/tok.c +++ b/src/tok.c @@ -236,6 +236,8 @@ static void sub_match_header(void) void tok_reset(FILE *f) { + assert(f != NULL); + curf = f; curtok.line = 1; curtok.col = 1; @@ -252,7 +254,7 @@ struct tok_s tok_get(void) if (unget) { unget = false; return curtok; - } + } curtok.col += vlen; vlen = 0; -- cgit v1.2.3