From 54afefba9497d22db706df30eee2cfc68f59892f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 24 May 2017 23:05:19 -0400 Subject: [PATCH] Re-enable skipping of #-led comments. --- misc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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); -- 2.31.1