Diagnose lines that are implicitly treated as REM lines.

Diagnose REM commands that are implicitly treated as having MSG type.

Properly start all lines that should start with REM, with REM.
This commit is contained in:
Dianne Skoll
2024-08-21 12:44:01 -04:00
parent 09dba4bc94
commit 6e64b175aa
10 changed files with 136 additions and 130 deletions
+3 -1
View File
@@ -1683,7 +1683,9 @@ static void GenerateCalEntries(int col)
/* Note: Since the parser hasn't been used yet, we don't */
/* need to destroy it here. */
default: CreateParser(CurLine, &p);
default:
Wprint("Unrecognized command; interpreting as REM MSG ...");
CreateParser(CurLine, &p);
r=DoCalRem(&p, col);
break;
}
+1
View File
@@ -540,6 +540,7 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim)
DBufFree(&buf);
trig->typ = MSG_TYPE;
if (s->isnested) return E_CANT_NEST_RTYPE;
Wprint("Missing REM type; assuming MSG");
parsing = 0;
break;
}
+8 -2
View File
@@ -353,9 +353,15 @@ static void DoReminders(void)
break;
/* If we don't recognize the command, do a REM by default */
/* If we don't recognize the command, do a REM by default, but warn */
default: DestroyParser(&p); CreateParser(CurLine, &p); purge_handled = 1; r=DoRem(&p); break;
default:
Wprint("Unrecognized command; interpreting as REM MSG ...");
DestroyParser(&p);
CreateParser(CurLine, &p);
purge_handled = 1;
r=DoRem(&p);
break;
}
if (r && (!Hush || r != E_RUN_DISABLED)) {