Symbols called 'eof' conflict with Windows io.h.

This commit is contained in:
David Given 2022-07-16 19:40:11 +02:00
parent 496424acf6
commit f30bf70832
2 changed files with 7 additions and 7 deletions

View file

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

View file

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