From: Eric S. Raymond Date: Wed, 24 May 2017 14:07:05 +0000 (-0400) Subject: Allow comments in logfiles. X-Git-Tag: seed~61 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=263b5ac3ba01ee3a5120412ef3350b10c0f092fa;p=open-adventure.git Allow comments in logfiles. --- 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);