From 263b5ac3ba01ee3a5120412ef3350b10c0f092fa Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 24 May 2017 10:07:05 -0400 Subject: [PATCH] Allow comments in logfiles. --- misc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/misc.c b/misc.c index f1bd954..77d81bc 100644 --- a/misc.c +++ b/misc.c @@ -884,8 +884,12 @@ void fMAPLIN(FILE *OPENED) { if(MAP2[1] == 0)MPINIT(); if (!oldstyle && SETUP) - fputs("> ", stdout); - IGNORE(fgets(raw_input,sizeof(INLINE)-1,OPENED)); + fputs("> ", stdout); + do { + IGNORE(fgets(raw_input,sizeof(INLINE)-1,OPENED)); + } while + /* allow comments in logfiles */ + (!feof(OPENED) && raw_input[0] == '#'); if (feof(OPENED)) { if (logfp) fclose(logfp); -- 2.31.1