From: Eric S. Raymond Date: Sat, 10 Jun 2017 05:42:53 +0000 (-0400) Subject: Change NAPLIN signature - prepration for linenoise. X-Git-Tag: 1.1~460 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=037f1df7dd8faf29622654ec4a79c2437b927b28;p=open-adventure.git Change NAPLIN signature - prepration for linenoise. --- diff --git a/misc.c b/misc.c index 4d5dd31..b991117 100644 --- a/misc.c +++ b/misc.c @@ -194,8 +194,7 @@ bool GETIN(FILE *input, for (;;) { if (game.blklin) TYPE0(); - MAPLIN(input); - if (feof(input)) + if (!MAPLIN(input)) return false; *pword1=GETTXT(true,true,true); if (game.blklin && *pword1 < 0) @@ -701,7 +700,7 @@ void BUG(long num) /* Machine dependent routines (MAPLIN, TYPE, SAVEIO) */ -void MAPLIN(FILE *fp) +bool MAPLIN(FILE *fp) { long i, val; @@ -739,6 +738,7 @@ void MAPLIN(FILE *fp) if (feof(fp)) { if (logfp && fp == stdin) fclose(logfp); + return false; } else { if (logfp && fp == stdin) IGNORE(fputs(rawbuf, logfp)); @@ -753,6 +753,7 @@ void MAPLIN(FILE *fp) LNLENG=i; } LNPOSN=1; + return true; } }