diff --git a/src/calendar.c b/src/calendar.c index a36a9ef5..546824c9 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -11,7 +11,7 @@ /***************************************************************/ #include "config.h" -static char const RCSID[] = "$Id: calendar.c,v 1.15 2007-06-05 02:44:30 dfs Exp $"; +static char const RCSID[] = "$Id: calendar.c,v 1.16 2007-06-29 02:11:02 dfs Exp $"; #include #include @@ -638,7 +638,22 @@ static int DoCalRem(ParsePtr p, int col) strcpy(trig.passthru, "PSFile"); trig.typ = PASSTHRU_TYPE; } - if (!PsCal && trig.typ == PASSTHRU_TYPE) return OK; + if (!PsCal) { + if (trig.typ == PASSTHRU_TYPE) { + if (strcmp(trig.passthru, "COLOR")) return OK; + /* Strip off the three color numbers */ + DBufFree(&buf); + r=ParseToken(p, &buf); + DBufFree(&buf); + if (r) return r; + r=ParseToken(p, &buf); + DBufFree(&buf); + if (r) return r; + r=ParseToken(p, &buf); + DBufFree(&buf); + if (r) return r; + } + } /* Remove any "at" times from PS or PSFILE reminders */ if (trig.typ == PASSTHRU_TYPE && strcmp(trig.passthru, "COLOR")) { diff --git a/src/dorem.c b/src/dorem.c index 846c9254..25d6c53b 100644 --- a/src/dorem.c +++ b/src/dorem.c @@ -13,7 +13,7 @@ /***************************************************************/ #include "config.h" -static char const RCSID[] = "$Id: dorem.c,v 1.15 2007-06-29 01:52:36 dfs Exp $"; +static char const RCSID[] = "$Id: dorem.c,v 1.16 2007-06-29 02:11:02 dfs Exp $"; #include #include @@ -535,7 +535,7 @@ static int ParseScanFrom(ParsePtr s, Trigger *t) /* Trigger the reminder if it's a RUN or MSG type. */ /* */ /***************************************************************/ - int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul) +int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul) { int r, y, m, d; char PrioExpr[25]; @@ -547,11 +547,25 @@ static int ParseScanFrom(ParsePtr s, Trigger *t) DBufInit(&buf); DBufInit(&calRow); if (t->typ == RUN_TYPE && RunDisabled) return E_RUN_DISABLED; - if (t->typ == PASSTHRU_TYPE || + if ((t->typ == PASSTHRU_TYPE && strcmp(t->passthru, "COLOR")) || t->typ == CAL_TYPE || t->typ == PS_TYPE || t->typ == PSF_TYPE) return OK; + + /* Handle COLOR types */ + if (t->typ == PASSTHRU_TYPE && !strcmp(t->passthru, "COLOR")) { + /* Strip off three tokens */ + r = ParseToken(p, &buf); + DBufFree(&buf); + if (r) return r; + r = ParseToken(p, &buf); + DBufFree(&buf); + if (r) return r; + r = ParseToken(p, &buf); + DBufFree(&buf); + if (r) return r; + } /* If it's a MSG-type reminder, and no -k option was used, issue the banner. */ if ((t->typ == MSG_TYPE || t->typ == MSF_TYPE) && !NumTriggered && !NextMode && !MsgCommand) { @@ -676,6 +690,7 @@ static int ParseScanFrom(ParsePtr s, Trigger *t) reminder now. */ switch(t->typ) { case MSG_TYPE: + case PASSTHRU_TYPE: if (MsgCommand) { DoMsgCommand(MsgCommand, DBufValue(&buf)); } else { diff --git a/src/var.c b/src/var.c index a4aa09d9..7565b442 100644 --- a/src/var.c +++ b/src/var.c @@ -12,7 +12,7 @@ /***************************************************************/ #include "config.h" -static char const RCSID[] = "$Id: var.c,v 1.10 2005-09-30 03:29:32 dfs Exp $"; +static char const RCSID[] = "$Id: var.c,v 1.11 2007-06-29 02:11:02 dfs Exp $"; #include #include @@ -446,7 +446,7 @@ static SysVar SysVarArr[] = { { "NumQueued", 0, INT_TYPE, &NumQueued, 0, 0 }, { "NumTrig", 0, INT_TYPE, &NumTriggered, 0, 0 }, { "PrefixLineNo", 0, INT_TYPE, &DoPrefixLineNo,0, 0 }, - { "PSCal", 0, INT_TYPE, &PsCal, 0, 0 }, + { "PSCal", 0, INT_TYPE, &PsCal, 0, 0 }, { "RunOff", 0, INT_TYPE, &RunDisabled, 0, 0 }, { "SimpleCal", 0, INT_TYPE, &DoSimpleCalendar, 0, 0 }, { "SortByDate", 0, INT_TYPE, &SortByDate, 0, 0},