mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-25 02:32:57 +02:00
More work on purge mode.
This commit is contained in:
+13
-4
@@ -58,7 +58,10 @@ int DoRem(ParsePtr p)
|
||||
/* Parse the trigger date and time */
|
||||
if ( (r=ParseRem(p, &trig, &tim, 1)) ) return r;
|
||||
|
||||
if (trig.typ == NO_TYPE) return E_EOLN;
|
||||
if (trig.typ == NO_TYPE) {
|
||||
PurgeEchoLine("%s\n%s\n", "#!PURGE Cannot parse next line", CurLine);
|
||||
return E_EOLN;
|
||||
}
|
||||
if (trig.typ == SAT_TYPE) {
|
||||
PurgeEchoLine("%s\n", "#!PURGE Cannot purge SATISFY-type reminders");
|
||||
PurgeEchoLine("%s\n", CurLine);
|
||||
@@ -94,14 +97,20 @@ int DoRem(ParsePtr p)
|
||||
} else {
|
||||
/* Calculate the trigger date */
|
||||
jul = ComputeTrigger(trig.scanfrom, &trig, &r, 1);
|
||||
if (r) return r;
|
||||
if (r) {
|
||||
if (PurgeMode) {
|
||||
PurgeEchoLine("%s: %s\n", "#!PURGE Problem calculating trigger date", ErrMsg[r]);
|
||||
PurgeEchoLine("%s\n", CurLine);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
if (PurgeMode) {
|
||||
if (trig.expired) {
|
||||
if (trig.expired || jul < JulianToday) {
|
||||
if (p->expr_happened) {
|
||||
PurgeEchoLine("%s\n", "#!PURGE Next line may have expired, but contains expression");
|
||||
PurgeEchoLine("%s\n", CurLine);
|
||||
PurgeEchoLine("%s\n", CurLine);
|
||||
} else {
|
||||
PurgeEchoLine("#!PURGE EXPIRED: %s\n", CurLine);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user