Skip to content

Commit

Permalink
move
Browse files Browse the repository at this point in the history
  • Loading branch information
DQNEO committed Sep 19, 2018
1 parent 56420c4 commit 661fb68
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lex.c
Expand Up @@ -82,17 +82,17 @@ char *input_position(void) {
return format("%s:%d", file->name, file->line);
}

static void unget(int c) {
if (c == '\n') file->line--;
ungetc(c, file->fp);
}

static int get(void) {
int c = getc(file->fp);
if (c == '\n') file->line++;
return c;
}

static void unget(int c) {
if (c == '\n') file->line--;
ungetc(c, file->fp);
}

static int get_nonspace(void) {
int c;
while ((c = get()) != EOF) {
Expand Down

0 comments on commit 661fb68

Please sign in to comment.