diff --git a/include/seasons.rem b/include/seasons.rem index 5f01249e..3c70fa76 100644 --- a/include/seasons.rem +++ b/include/seasons.rem @@ -1,6 +1,15 @@ # Equinoxes and solstices -REM [soleq(today(), 0)] MSG %"March Equinox%" is %3. -REM [soleq(today(), 1)] MSG %"June Solstice%" is %3. -REM [soleq(today(), 2)] MSG %"September Equinox%" is %3. -REM [soleq(today(), 3)] MSG %"December Solstice%" is %3. +IF $LatDeg >= 0 + # Northern Hemisphere + REM NOQUEUE [soleq(0)] MSG %"Vernal Equinox%" is %3. + REM NOQUEUE [soleq(1)] MSG %"Summer Solstice%" is %3. + REM NOQUEUE [soleq(2)] MSG %"Autumnal Equinox%" is %3. + REM NOQUEUE [soleq(3)] MSG %"Winter Solstice%" is %3. +ELSE + # Southern Hemisphere + REM NOQUEUE [soleq(0)] MSG %"Autumnal Equinox%" is %3. + REM NOQUEUE [soleq(1)] MSG %"Winter Solstice%" is %3. + REM NOQUEUE [soleq(2)] MSG %"Vernal Equinox%" is %3. + REM NOQUEUE [soleq(3)] MSG %"Summer Solstice%" is %3. +ENDIF diff --git a/src/dorem.c b/src/dorem.c index 67fe0dda..acc05783 100644 --- a/src/dorem.c +++ b/src/dorem.c @@ -234,6 +234,7 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim, int save_in_globals) trig->skip = NO_SKIP; trig->once = NO_ONCE; trig->addomit = 0; + trig->noqueue = 0; trig->typ = NO_TYPE; trig->scanfrom = NO_DATE; trig->from = NO_DATE; @@ -435,6 +436,11 @@ int ParseRem(ParsePtr s, Trigger *trig, TimeTrig *tim, int save_in_globals) trig->addomit = 1; break; + case T_NoQueue: + DBufFree(&buf); + trig->noqueue = 1; + break; + case T_Omit: DBufFree(&buf); if (trig->omitfunc[0]) { diff --git a/src/funcs.c b/src/funcs.c index 6b1350dc..1f6c6015 100644 --- a/src/funcs.c +++ b/src/funcs.c @@ -3638,7 +3638,6 @@ FSoleq(func_info *info) dse = DSEToday; FromDSE(dse, &y, NULL, NULL); /* We just want the year */ } - ASSERT_TYPE(1, INT_TYPE); ret = solstice_equinox_for_year(y, which); if (dse != NO_DATE && (ret / MINUTES_PER_DAY) < dse) { diff --git a/src/queue.c b/src/queue.c index c5549ef6..3ea0bc2e 100644 --- a/src/queue.c +++ b/src/queue.c @@ -75,6 +75,7 @@ int QueueReminder(ParsePtr p, Trigger *trig, QueuedRem *qelem; if (DontQueue || + trig->noqueue || tim->ttime == NO_TIME || trig->typ == CAL_TYPE || tim->ttime < SystemTime(0) / 60 || diff --git a/src/token.c b/src/token.c index be6151e0..5693aac3 100644 --- a/src/token.c +++ b/src/token.c @@ -80,6 +80,7 @@ Token TokArray[] = { { "monday", 3, T_WkDay, 0 }, { "msf", 3, T_RemType, MSF_TYPE }, { "msg", 3, T_RemType, MSG_TYPE }, + { "noqueue", 7, T_NoQueue, 0 }, { "november", 3, T_Month, 10 }, { "october", 3, T_Month, 9 }, { "omit", 3, T_Omit, 0 }, diff --git a/src/types.h b/src/types.h index 1904e527..ee8e522a 100644 --- a/src/types.h +++ b/src/types.h @@ -77,6 +77,7 @@ typedef struct { int eventduration; /* Original event duration (minutes) */ int maybe_uncomputable; /* Suppress "can't compute trigger" warnings */ int addomit; /* Add trigger date to global OMITs */ + int noqueue; /* Don't queue even if timed */ char sched[VAR_NAME_LEN+1]; /* Scheduling function */ char warn[VAR_NAME_LEN+1]; /* Warning function */ char omitfunc[VAR_NAME_LEN+1]; /* OMITFUNC function */ @@ -156,7 +157,7 @@ enum TokTypes T_Rem, T_Push, T_Pop, T_Preserve, T_Include, T_IncludeR, T_IncludeCmd, T_If, T_Else, T_EndIf, T_IfTrig, T_ErrMsg, T_Set, T_UnSet, T_Fset, T_Funset, T_Omit, T_Banner, T_Exit, - T_AddOmit, + T_AddOmit, T_NoQueue, T_WkDay, T_Month, T_Time, T_Date, T_DateTime, T_Skip, T_At, T_RemType, T_Until, T_Year, T_Day, T_Rep, T_Delta,