lexical.c, simplify using cp_readchar()

This commit is contained in:
rlar 2014-04-15 19:12:58 +02:00
parent 448099ef94
commit 8c7ae0d61c
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}