From: Eric S. Raymond Date: Thu, 25 May 2017 03:05:19 +0000 (-0400) Subject: Re-enable skipping of #-led comments. X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=54afefba9497d22db706df30eee2cfc68f59892f;p=open-adventure.git Re-enable skipping of #-led comments. --- diff --git a/misc.c b/misc.c index 18bdd7a..04107c7 100644 --- a/misc.c +++ b/misc.c @@ -883,9 +883,12 @@ long I, VAL; if(MAP2[1] == 0)MPINIT(); - if (!oldstyle && isatty(0)) - fputs("> ", stdout); - IGNORE(fgets(INLINE+1,sizeof(INLINE)-1,OPENED)); + if (!oldstyle && OPENED == stdin) + fputs("> ", stdout); + do { + IGNORE(fgets(INLINE+1,sizeof(INLINE)-1,OPENED)); + } while + (!feof(OPENED) && INLINE[1] == '#'); if (feof(OPENED)) { if (logfp) fclose(logfp);