aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2019-06-22 09:02:06 -0700
committerPaul Gilbert2019-06-22 14:40:50 -0700
commit1249c335392d7cc2d5492a5bc8718b9a034fbb11 (patch)
treebd1475e7304db33f04c3914c8e49c2bd299f6faa /engines
parent2cf0320569c80c8e389e44d1b0463792ddf8e7cd (diff)
downloadscummvm-rg350-1249c335392d7cc2d5492a5bc8718b9a034fbb11.tar.gz
scummvm-rg350-1249c335392d7cc2d5492a5bc8718b9a034fbb11.tar.bz2
scummvm-rg350-1249c335392d7cc2d5492a5bc8718b9a034fbb11.zip
GLK: ALAN2: Change all EOF to EOD that is case to uint
Diffstat (limited to 'engines')
-rw-r--r--engines/glk/alan2/acode.h7
-rw-r--r--engines/glk/alan2/alan2.cpp2
-rw-r--r--engines/glk/alan2/decode.cpp4
-rw-r--r--engines/glk/alan2/exe.cpp10
-rw-r--r--engines/glk/alan2/main.cpp28
-rw-r--r--engines/glk/alan2/main.h4
-rw-r--r--engines/glk/alan2/params.cpp30
-rw-r--r--engines/glk/alan2/parse.cpp90
8 files changed, 86 insertions, 89 deletions
diff --git a/engines/glk/alan2/acode.h b/engines/glk/alan2/acode.h
index dcc292b16b..74f0e541e4 100644
--- a/engines/glk/alan2/acode.h
+++ b/engines/glk/alan2/acode.h
@@ -72,11 +72,8 @@ typedef int WrdKind;
/* Syntax element classifications */
-// End of file
-#ifdef EOF
-#undef EOF
-#endif
-#define EOF ((uint32)-1)
+// End of data
+#define EOD ((uint32)-1)
// End of syntax
#define EOS ((uint32)-2)
diff --git a/engines/glk/alan2/alan2.cpp b/engines/glk/alan2/alan2.cpp
index 4e6babc4c1..5953f834f0 100644
--- a/engines/glk/alan2/alan2.cpp
+++ b/engines/glk/alan2/alan2.cpp
@@ -145,7 +145,7 @@ void Alan2::synchronizeSave(Common::Serializer &s) {
}
// Sync scores
- for (i = 0; (int)scores[i] != EOF; i++)
+ for (i = 0; (int)scores[i] != EOD; i++)
syncVal(s, &scores[i]);
}
diff --git a/engines/glk/alan2/decode.cpp b/engines/glk/alan2/decode.cpp
index 2955c37745..4f89380272 100644
--- a/engines/glk/alan2/decode.cpp
+++ b/engines/glk/alan2/decode.cpp
@@ -30,14 +30,14 @@ namespace Alan2 {
/* Bit output */
static int decodeBuffer; /* Bits to be input */
static int bitsToGo; /* Bits still in buffer */
-static int garbageBits; /* Bits past EOF */
+static int garbageBits; /* Bits past EOD */
static int inputBit() {
int bit;
if (!bitsToGo) { /* More bits available ? */
decodeBuffer = txtfil->readByte(); /* No, so get more */
- if (decodeBuffer == EOF) {
+ if (decodeBuffer == EOD) {
garbageBits++;
if (garbageBits > VALUEBITS - 2)
syserr("Error in encoded data file.");
diff --git a/engines/glk/alan2/exe.cpp b/engines/glk/alan2/exe.cpp
index f749425cd0..6072f5ebc3 100644
--- a/engines/glk/alan2/exe.cpp
+++ b/engines/glk/alan2/exe.cpp
@@ -446,7 +446,7 @@ static Aptr litatr(Aword lit, Aword atr) {
sprintf(str, "Unknown attribute for literal (%ld).", (unsigned long) atr);
syserr(str);
}
- return (Aptr)EOF;
+ return (Aptr)EOD;
}
Aptr attribute(Aword id, Aword atr) {
@@ -464,7 +464,7 @@ Aptr attribute(Aword id, Aword atr) {
sprintf(str, "Can't ATTRIBUTE item (%ld).", (unsigned long) id);
syserr(str);
}
- return (Aptr)EOF;
+ return (Aptr)EOD;
}
Aptr strattr(Aword id, Aword atr) {
@@ -503,7 +503,7 @@ Aword where(Aword id) {
sprintf(str, "Can't WHERE item (%ld).", (unsigned long) id);
syserr(str);
}
- return (Aptr)EOF;
+ return (Aptr)EOD;
}
@@ -654,7 +654,7 @@ Abool isHere(Aword id) {
sprintf(str, "Can't HERE item (%ld).", (unsigned long) id);
syserr(str);
}
- return (Abool)EOF;
+ return (Abool)EOD;
}
/*----------------------------------------------------------------------
@@ -688,7 +688,7 @@ Abool isNear(Aword id) {
sprintf(str, "Can't NEAR item (%ld).", (unsigned long) id);
syserr(str);
}
- return (Abool)EOF;
+ return (Abool)EOD;
}
diff --git a/engines/glk/alan2/main.cpp b/engines/glk/alan2/main.cpp
index f585e7d584..8f9752dab0 100644
--- a/engines/glk/alan2/main.cpp
+++ b/engines/glk/alan2/main.cpp
@@ -167,7 +167,7 @@ void syserr(const char *str) {
void error(MsgKind msgno /* IN - The error message number */) {
if (msgno != MSGMAX)
prmsg(msgno);
- wrds[wrdidx] = EOF; /* Force new player input */
+ wrds[wrdidx] = EOD; /* Force new player input */
dscrstkp = 0; /* Reset describe stack */
//longjmp(jmpbuf,TRUE);
@@ -330,10 +330,10 @@ static void sayparam(int p) {
int i;
for (i = 0; i <= p; i++)
- if (params[i].code == EOF)
+ if (params[i].code == EOD)
syserr("Nonexistent parameter referenced.");
- if (params[p].firstWord == EOF) /* Any words he used? */
+ if (params[p].firstWord == EOD) /* Any words he used? */
say(params[p].code);
else /* Yes, so use them... */
for (i = params[p].firstWord; i <= params[p].lastWord; i++) {
@@ -491,7 +491,7 @@ void prmsg(MsgKind msg /* IN - message number */) {
/* How to know we are at end of a table */
Boolean eot(Aword *adr) {
- return *adr == EOF;
+ return *adr == EOD;
}
Boolean isObj(Aword x) {
@@ -778,7 +778,7 @@ Boolean possible() {
if (!trycheck(alt[1]->checks, FALSE))
return FALSE;
- for (i = 0; params[i].code != EOF; i++) {
+ for (i = 0; params[i].code != EOD; i++) {
alt[i + 2] = findalt(objs[params[i].code - OBJMIN].vrbs, i + 1);
/* CHECKs in a possible parameter */
if (alt[i + 2] != 0 && alt[i + 2]->checks != 0)
@@ -786,10 +786,10 @@ Boolean possible() {
return FALSE;
}
- for (i = 0; i < 2 || params[i - 2].code != EOF; i++)
+ for (i = 0; i < 2 || params[i - 2].code != EOD; i++)
if (alt[i] != 0 && alt[i]->action != 0)
break;
- if (i >= 2 && params[i - 2].code == EOF)
+ if (i >= 2 && params[i - 2].code == EOD)
/* Didn't find any code for this verb/object combination */
return FALSE;
else
@@ -829,7 +829,7 @@ static void do_it() {
if (fail) return;
}
- for (i = 0; params[i].code != EOF; i++) {
+ for (i = 0; params[i].code != EOD; i++) {
if (isLit(params[i].code))
alt[i + 2] = 0;
else {
@@ -850,10 +850,10 @@ static void do_it() {
}
/* Check for anything to execute... */
- for (i = 0; i < 2 || params[i - 2].code != EOF; i++)
+ for (i = 0; i < 2 || params[i - 2].code != EOD; i++)
if (alt[i] != 0 && alt[i]->action != 0)
break;
- if (i >= 2 && params[i - 2].code == EOF)
+ if (i >= 2 && params[i - 2].code == EOD)
/* Didn't find any code for this verb/object combination */
error(M_CANT0);
@@ -862,7 +862,7 @@ static void do_it() {
/* First try any BEFORE or ONLY from outside in */
done[0] = FALSE;
done[1] = FALSE;
- for (i = 2; params[i - 2].code != EOF; i++)
+ for (i = 2; params[i - 2].code != EOD; i++)
done[i] = FALSE;
i--;
while (i >= 0) {
@@ -891,7 +891,7 @@ static void do_it() {
}
/* Then execute any not declared as AFTER, i.e. the default */
- for (i = 0; i < 2 || params[i - 2].code != EOF; i++) {
+ for (i = 0; i < 2 || params[i - 2].code != EOD; i++) {
if (alt[i] != 0)
if (alt[i]->qual != (Aword)Q_AFTER) {
if (!done[i] && alt[i]->action != 0) {
@@ -952,11 +952,11 @@ void action(ParamElem plst[] /* IN - Plural parameter list */) {
*/
for (mpos = 0; params[mpos].code != 0; mpos++); /* Find multiple position */
sprintf(marker, "($%d)", mpos + 1); /* Prepare a printout with $1/2/3 */
- for (i = 0; plst[i].code != EOF; i++) {
+ for (i = 0; plst[i].code != EOD; i++) {
params[mpos] = plst[i];
output(marker);
do_it();
- if (plst[i + 1].code != EOF)
+ if (plst[i + 1].code != EOD)
para();
}
params[mpos].code = 0;
diff --git a/engines/glk/alan2/main.h b/engines/glk/alan2/main.h
index 10b0015a44..3d0f308540 100644
--- a/engines/glk/alan2/main.h
+++ b/engines/glk/alan2/main.h
@@ -73,8 +73,8 @@ extern Common::SeekableReadStream *codfil;
#undef fseek
#undef fclose
#define ftell(FP) FP->pos()
-#define fgetc(FP) (FP->pos() >= FP->size()) ? EOF : FP->readByte()
-#define getc(FP) (FP->pos() >= FP->size()) ? EOF : FP->readByte()
+#define fgetc(FP) (FP->pos() >= FP->size()) ? EOD : FP->readByte()
+#define getc(FP) (FP->pos() >= FP->size()) ? EOD : FP->readByte()
#define fseek(FP, OFS, WHENCE) FP->seek(OFS, WHENCE)
#define fclose(FP) delete FP
diff --git a/engines/glk/alan2/params.cpp b/engines/glk/alan2/params.cpp
index 8273518522..1d5da8ece8 100644
--- a/engines/glk/alan2/params.cpp
+++ b/engines/glk/alan2/params.cpp
@@ -30,16 +30,16 @@ namespace Alan2 {
void compact(ParamElem a[]) {
int i, j;
- for (i = 0, j = 0; a[j].code != (Aword)EOF; j++)
+ for (i = 0, j = 0; a[j].code != (Aword)EOD; j++)
if (a[j].code != 0)
a[i++] = a[j];
- a[i].code = (Aword)EOF;
+ a[i].code = (Aword)EOD;
}
int lstlen(ParamElem a[]) {
int i = 0;
- while (a[i].code != (Aword)EOF)
+ while (a[i].code != (Aword)EOD)
i++;
return (i);
}
@@ -47,22 +47,22 @@ int lstlen(ParamElem a[]) {
Boolean inlst(ParamElem l[], Aword e) {
int i;
- for (i = 0; l[i].code != (Aword)EOF && l[i].code != e; i++);
+ for (i = 0; l[i].code != (Aword)EOD && l[i].code != e; i++);
return (l[i].code == e);
}
void lstcpy(ParamElem a[], ParamElem b[]) {
int i;
- for (i = 0; b[i].code != (Aword)EOF; i++)
+ for (i = 0; b[i].code != (Aword)EOD; i++)
a[i] = b[i];
- a[i].code = (Aword)EOF;
+ a[i].code = (Aword)EOD;
}
void sublst(ParamElem a[], ParamElem b[]) {
int i;
- for (i = 0; a[i].code != (Aword)EOF; i++)
+ for (i = 0; a[i].code != (Aword)EOD; i++)
if (inlst(b, a[i].code))
a[i].code = 0; /* Mark empty */
compact(a);
@@ -71,31 +71,31 @@ void sublst(ParamElem a[], ParamElem b[]) {
void mrglst(ParamElem a[], ParamElem b[]) {
int i, last;
- for (last = 0; a[last].code != (Aword)EOF; last++); /* Find end of list */
- for (i = 0; b[i].code != (Aword)EOF; i++)
+ for (last = 0; a[last].code != (Aword)EOD; last++); /* Find end of list */
+ for (i = 0; b[i].code != (Aword)EOD; i++)
if (!inlst(a, b[i].code)) {
a[last++] = b[i];
- a[last].code = (Aword)EOF;
+ a[last].code = (Aword)EOD;
}
}
void isect(ParamElem a[], ParamElem b[]) {
int i, last = 0;
- for (i = 0; a[i].code != (Aword)EOF; i++)
+ for (i = 0; a[i].code != (Aword)EOD; i++)
if (inlst(b, a[i].code))
a[last++] = a[i];
- a[last].code = (Aword)EOF;
+ a[last].code = (Aword)EOD;
}
void cpyrefs(ParamElem p[], Aword r[]) {
int i;
- for (i = 0; r[i] != (Aword)EOF; i++) {
+ for (i = 0; r[i] != (Aword)EOD; i++) {
p[i].code = r[i];
- p[i].firstWord = (Aword)EOF;
+ p[i].firstWord = (Aword)EOD;
}
- p[i].code = (Aword)EOF;
+ p[i].code = (Aword)EOD;
}
} // End of namespace Alan2
diff --git a/engines/glk/alan2/parse.cpp b/engines/glk/alan2/parse.cpp
index db478ff632..a12a655870 100644
--- a/engines/glk/alan2/parse.cpp
+++ b/engines/glk/alan2/parse.cpp
@@ -41,7 +41,7 @@ namespace Alan2 {
/* PUBLIC DATA */
-int wrds[LISTLEN / 2] = {EOF}; /* List of parsed words */
+int wrds[LISTLEN / 2] = {EOD}; /* List of parsed words */
int wrdidx; /* and an index into it */
Boolean plural = FALSE;
@@ -113,7 +113,7 @@ static int lookup(char wrd[]) {
return (i);
}
unknown(wrd);
- return (EOF);
+ return (EOD);
}
static int number(char token[] /* IN - The string to convert to a number */) {
@@ -224,7 +224,7 @@ static void scan() {
wrds[i++] = conjWord;
} else
unknown(token);
- wrds[i] = EOF;
+ wrds[i] = EOD;
eol = (token = gettoken(NULL)) == NULL;
} while (!eol);
}
@@ -252,11 +252,11 @@ static int allLength; /* No. of objects matching 'all' */
static void nonverb() {
if (isDir(wrds[wrdidx])) {
wrdidx++;
- if (wrds[wrdidx] != EOF && !isConj(wrds[wrdidx]))
+ if (wrds[wrdidx] != EOD && !isConj(wrds[wrdidx]))
error(M_WHAT);
else
go(dict[wrds[wrdidx - 1]].code);
- if (wrds[wrdidx] != EOF)
+ if (wrds[wrdidx] != EOD)
wrdidx++;
} else
error(M_WHAT);
@@ -270,19 +270,19 @@ static void buildall(ParamElem list[]) {
if (isHere(o)) {
found = TRUE;
list[i].code = o;
- list[i++].firstWord = EOF;
+ list[i++].firstWord = EOD;
}
if (!found)
error(M_WHAT_ALL);
else
- list[i].code = EOF;
+ list[i].code = EOD;
}
static void unambig(ParamElem plst[]) {
int i;
Boolean found = FALSE; /* Adjective or noun found ? */
static ParamElem *refs; /* Entities referenced by word */
- static ParamElem *savlst; /* Saved list for backup at EOF */
+ static ParamElem *savlst; /* Saved list for backup at EOD */
int firstWord, lastWord; /* The words the player used */
if (refs == NULL)
@@ -294,12 +294,12 @@ static void unambig(ParamElem plst[]) {
if (isLiteral(wrds[wrdidx])) {
/* Transform the word into a reference to the literal value */
plst[0].code = wrds[wrdidx++] - dictsize + LITMIN;
- plst[0].firstWord = EOF; /* No words used! */
- plst[1].code = EOF;
+ plst[0].firstWord = EOD; /* No words used! */
+ plst[1].code = EOD;
return;
}
- plst[0].code = EOF; /* Make empty */
+ plst[0].code = EOD; /* Make empty */
if (isIt(wrds[wrdidx])) {
wrdidx++;
/* Use last object in previous command! */
@@ -308,20 +308,20 @@ static void unambig(ParamElem plst[]) {
error(M_WHAT_IT);
if (!isHere(pparams[i].code)) {
params[0].code = pparams[i].code;
- params[0].firstWord = EOF;
- params[1].code = EOF;
+ params[0].firstWord = EOD;
+ params[1].code = EOD;
error(M_NO_SUCH);
}
plst[0] = pparams[i];
- plst[0].firstWord = EOF; /* No words used! */
- plst[1].code = EOF;
+ plst[0].firstWord = EOD; /* No words used! */
+ plst[1].code = EOD;
return;
}
firstWord = wrdidx;
- while (wrds[wrdidx] != EOF && isAdj(wrds[wrdidx])) {
+ while (wrds[wrdidx] != EOD && isAdj(wrds[wrdidx])) {
/* If this word can be a noun and there is no noun following break loop */
- if (isNoun(wrds[wrdidx]) && (wrds[wrdidx + 1] == EOF || !isNoun(wrds[wrdidx + 1])))
+ if (isNoun(wrds[wrdidx]) && (wrds[wrdidx + 1] == EOD || !isNoun(wrds[wrdidx + 1])))
break;
cpyrefs(refs, (Aword *)addrTo(dict[wrds[wrdidx]].adjrefs));
lstcpy(savlst, plst); /* To save it for backtracking */
@@ -333,7 +333,7 @@ static void unambig(ParamElem plst[]) {
}
wrdidx++;
}
- if (wrds[wrdidx] != EOF) {
+ if (wrds[wrdidx] != EOD) {
if (isNoun(wrds[wrdidx])) {
cpyrefs(refs, (Aword *)addrTo(dict[wrds[wrdidx]].nounrefs));
if (found)
@@ -350,7 +350,7 @@ static void unambig(ParamElem plst[]) {
/* Perhaps the last word was also a noun? */
lstcpy(plst, savlst); /* Restore to before last adjective */
cpyrefs(refs, (Aword *)addrTo(dict[wrds[wrdidx - 1]].nounrefs));
- if (plst[0].code == EOF)
+ if (plst[0].code == EOD)
lstcpy(plst, refs);
else
isect(plst, refs);
@@ -361,17 +361,17 @@ static void unambig(ParamElem plst[]) {
/* Allow remote objects, but resolve ambiguities by presence */
if (lstlen(plst) > 1) {
- for (i = 0; plst[i].code != EOF; i++)
+ for (i = 0; plst[i].code != EOD; i++)
if (!isHere(plst[i].code))
plst[i].code = 0;
compact(plst);
}
if (lstlen(plst) > 1 || (found && lstlen(plst) == 0)) {
- params[0].code = 0; /* Just make it anything != EOF */
+ params[0].code = 0; /* Just make it anything != EOD */
params[0].firstWord = firstWord; /* Remember words for errors below */
params[0].lastWord = lastWord;
- params[1].code = EOF; /* But be sure to terminate */
+ params[1].code = EOD; /* But be sure to terminate */
if (lstlen(plst) > 1)
error(M_WHICH_ONE);
else if (found && lstlen(plst) == 0)
@@ -390,19 +390,19 @@ static void simple(ParamElem olst[]) {
if (tlst == NULL)
tlst = (ParamElem *) allocate(sizeof(ParamElem) * (MAXENTITY + 1));
- tlst[0].code = EOF;
+ tlst[0].code = EOD;
for (;;) {
if (isThem(wrds[wrdidx])) {
plural = TRUE;
- for (i = 0; pmlst[i].code != EOF; i++)
+ for (i = 0; pmlst[i].code != EOD; i++)
if (!isHere(pmlst[i].code))
pmlst[i].code = 0;
compact(pmlst);
if (lstlen(pmlst) == 0)
error(M_WHAT_THEM);
lstcpy(olst, pmlst);
- olst[0].firstWord = EOF; /* No words used */
+ olst[0].firstWord = EOD; /* No words used */
wrdidx++;
} else {
unambig(olst); /* Look for unambigous noun phrase */
@@ -414,7 +414,7 @@ static void simple(ParamElem olst[]) {
}
}
mrglst(tlst, olst);
- if (wrds[wrdidx] != EOF
+ if (wrds[wrdidx] != EOD
&& (isConj(wrds[wrdidx]) &&
(isAdj(wrds[wrdidx + 1]) || isNoun(wrds[wrdidx + 1])))) {
/* More parameters in a conjunction separated list ? */
@@ -449,7 +449,7 @@ static void complex(ParamElem olst[]) {
plural = TRUE;
buildall(alst); /* Build list of all objects */
wrdidx++;
- if (wrds[wrdidx] != EOF && isBut(wrds[wrdidx])) {
+ if (wrds[wrdidx] != EOD && isBut(wrds[wrdidx])) {
wrdidx++;
simple(olst);
if (lstlen(olst) == 0)
@@ -499,11 +499,11 @@ static void resolve(ParamElem plst[]) {
if (allLength > 0) return; /* ALL has already done this */
/* Resolve ambiguities by presence */
- for (i = 0; plst[i].code != EOF; i++)
+ for (i = 0; plst[i].code != EOD; i++)
if (plst[i].code < LITMIN) /* Literals are always 'here' */
if (!isHere(plst[i].code)) {
params[0] = plst[i]; /* Copy error param as first one for message */
- params[1].code = EOF; /* But be sure to terminate */
+ params[1].code = EOD; /* But be sure to terminate */
error(M_NO_SUCH);
}
}
@@ -532,7 +532,7 @@ static void tryMatch(ParamElem mlst[] /* OUT - List of params allowed by multipl
while (TRUE) {
/* End of input? */
- if (wrds[wrdidx] == EOF || isConj(wrds[wrdidx])) {
+ if (wrds[wrdidx] == EOD || isConj(wrds[wrdidx])) {
while (!endOfTable(elms) && elms->code != EOS)
elms++;
if (endOfTable(elms))
@@ -576,7 +576,7 @@ static void tryMatch(ParamElem mlst[] /* OUT - List of params allowed by multipl
}
} else
params[paramidx++] = tlst[0];
- params[paramidx].code = EOF;
+ params[paramidx].code = EOD;
}
elms = (ElmElem *) addrTo(elms->next);
}
@@ -586,12 +586,12 @@ static void tryMatch(ParamElem mlst[] /* OUT - List of params allowed by multipl
if (elms->next == 0) /* No verb code, verb not declared! */
error(M_CANT0);
- for (p = 0; params[p].code != EOF; p++) /* Mark all parameters unchecked */
+ for (p = 0; params[p].code != EOD; p++) /* Mark all parameters unchecked */
checked[p] = FALSE;
for (cla = (ClaElem *) addrTo(elms->next); !endOfTable(cla); cla++) {
if (params[cla->code - 1].code == 0) {
/* This was a multiple parameter, so check all and remove failing */
- for (i = 0; mlst[i].code != EOF; i++) {
+ for (i = 0; mlst[i].code != EOD; i++) {
params[cla->code - 1] = mlst[i];
if (!claCheck(cla)) {
/* Multiple could be both an explicit list of params and an ALL */
@@ -619,11 +619,11 @@ static void tryMatch(ParamElem mlst[] /* OUT - List of params allowed by multipl
checked[cla->code - 1] = TRUE; /* Remember that it's already checked */
}
/* Now check the rest of the parameters, must be objects */
- for (p = 0; params[p].code != EOF; p++)
+ for (p = 0; params[p].code != EOD; p++)
if (!checked[p]) {
if (params[p].code == 0) {
/* This was a multiple parameter, check all and remove failing */
- for (i = 0; mlst[i].code != EOF; i++)
+ for (i = 0; mlst[i].code != EOD; i++)
if (mlst[i].code != 0) /* Skip any empty slots */
if (!isObj(mlst[i].code))
mlst[i].code = 0;
@@ -647,7 +647,7 @@ static void tryMatch(ParamElem mlst[] /* OUT - List of params allowed by multipl
params[p].code = 0; /* Restore multiple marker */
compact(mlst);
if (lstlen(mlst) == 0) {
- params[0].code = EOF;
+ params[0].code = EOD;
error(M_WHAT_ALL);
}
} else if (anyPlural) {
@@ -662,23 +662,23 @@ static void tryMatch(ParamElem mlst[] /* OUT - List of params allowed by multipl
static void match(ParamElem *mlst /* OUT - List of params allowed by multiple */) {
tryMatch(mlst); /* ... to understand what he said */
- if (wrds[wrdidx] != EOF && !isConj(wrds[wrdidx]))
+ if (wrds[wrdidx] != EOD && !isConj(wrds[wrdidx]))
error(M_WHAT);
- if (wrds[wrdidx] != EOF) /* More on this line? */
+ if (wrds[wrdidx] != EOD) /* More on this line? */
wrdidx++; /* If so skip the AND */
}
void parse() {
if (mlst == NULL) { /* Allocate large enough paramlists */
mlst = (ParamElem *) allocate(sizeof(ParamElem) * (MAXENTITY + 1));
- mlst[0].code = EOF;
+ mlst[0].code = EOD;
pmlst = (ParamElem *) allocate(sizeof(ParamElem) * (MAXENTITY + 1));
params = (ParamElem *) allocate(sizeof(ParamElem) * (MAXENTITY + 1));
- params[0].code = EOF;
+ params[0].code = EOD;
pparams = (ParamElem *) allocate(sizeof(ParamElem) * (MAXENTITY + 1));
}
- if (wrds[wrdidx] == EOF) {
+ if (wrds[wrdidx] == EOD) {
wrdidx = 0;
scan();
if (g_vm->shouldQuit())
@@ -689,9 +689,9 @@ void parse() {
allLength = 0;
paramidx = 0;
lstcpy(pparams, params);
- params[0].code = EOF;
+ params[0].code = EOD;
lstcpy(pmlst, mlst);
- mlst[0].code = EOF;
+ mlst[0].code = EOD;
if (isVerb(wrds[wrdidx])) {
vrbwrd = wrds[wrdidx];
vrbcode = dict[vrbwrd].code;
@@ -699,8 +699,8 @@ void parse() {
match(mlst);
action(mlst); /* mlst contains possible multiple params */
} else {
- params[0].code = EOF;
- pmlst[0].code = EOF;
+ params[0].code = EOD;
+ pmlst[0].code = EOD;
nonverb();
}
}