From 8c7ae0d61cbe40a2be014c560bac57a0cbcd054d Mon Sep 17 00:00:00 2001 From: rlar Date: Tue, 15 Apr 2014 19:12:58 +0200 Subject: [PATCH] lexical.c, simplify using cp_readchar() --- src/frontend/parser/lexical.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/parser/lexical.c b/src/frontend/parser/lexical.c index e34b3370e..f01a9bf6e 100644 --- a/src/frontend/parser/lexical.c +++ b/src/frontend/parser/lexical.c @@ -142,13 +142,13 @@ nloop: for (;;) { if (string) { - c = *string++; + c = cp_readchar(&string, cp_inp_cur); if (c == '\0') c = '\n'; if (c == ESCAPE) c = '['; } else { - c = input(cp_inp_cur); + c = cp_readchar(&string, cp_inp_cur); } gotchar: @@ -191,7 +191,7 @@ nloop: wlist = cw = NULL; if (string) return NULL; - while (((c = input(cp_inp_cur)) != '\n') && (c != EOF)) + while (((c = cp_readchar(&string, cp_inp_cur)) != '\n') && (c != EOF)) ; goto nloop; }