Re-enable skipping of #-led comments.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 25 May 2017 03:05:19 +0000 (23:05 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 23 Mar 2023 15:28:53 +0000 (11:28 -0400)
misc.c

diff --git a/misc.c b/misc.c
index 18bdd7aa2adb066b1ac2cb2ed5f74ad44fa67320..04107c7d7e41917d617b3d7b7adbd864fa758c9f 100644 (file)
--- 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);