diff --git a/lang/b/compiler/b.h b/lang/b/compiler/b.h index 6c5a4febb..ab66d0b29 100644 --- a/lang/b/compiler/b.h +++ b/lang/b/compiler/b.h @@ -45,7 +45,7 @@ extern const char* modulename; extern int paramsize; extern struct hshtab hshtab[HSHSIZ]; extern int hshused; -extern int eof; +extern int ateof; extern int peekc; extern const char* ctab; extern struct hshtab *bsym; diff --git a/lang/b/compiler/b0.c b/lang/b/compiler/b0.c index 077a3abb3..1d96857fd 100644 --- a/lang/b/compiler/b0.c +++ b/lang/b/compiler/b0.c @@ -22,7 +22,7 @@ int string_part; int paramsize; struct hshtab hshtab[HSHSIZ]; int hshused; -int eof; +int ateof; int peekc; const char* ctab; struct hshtab *bsym; @@ -129,7 +129,7 @@ main(int argc, char *argv[]) string_part = 0; code_part = C_getid(); C_beginpart(code_part); - while (!eof) { + while (!ateof) { extdef(); blkend(); } @@ -368,12 +368,12 @@ symbol(void) c = peekc; peekc = 0; } else - if (eof) + if (ateof) return EOFC; else c = getchar(); if (c==EOF) { - eof++; + ateof++; return(EOFC); } @@ -453,7 +453,7 @@ loop: } } } - eof++; + ateof++; error("Nonterminated comment"); return EOFC; @@ -820,7 +820,7 @@ stmt: if ((o = symbol()) == LBRACE) { if (d) blkhed(); - while (!eof) { + while (!ateof) { if ((o = symbol()) == RBRACE) goto bend; pushsym(o);