mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-05-06 07:37:58 +02:00
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:
+3
-1
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user