[Remind-Fans] Too many full OMITs?
Dianne Skoll
dianne at skoll.ca
Thu Nov 14 07:31:10 EST 2019
On 11/13/19 8:38 PM, Tim Chase wrote:
> Ah, upon closer inspection, I missed updating the year on one of them:
> OMIT Mar 8 2021 THROUGH Mar 12 2020 MSG %"Spring Break: No school%"%
> that 2020 should have been a 2021. So it apparently went searching
> forward for the end of the OMIT's THROUGH clause, not noticing that
> it was in the *past*, merrily filling up all the available OMIT
> buckets.
Actually, Remind is a little more sophisticated than that. If you have:
OMIT date1 THROUGH date2
and date1 is after date2, then Remind swaps them, turning it into:
OMIT date2 THROUGH date1
It also figures out if there's enough room before filling the OMIT
buckets, so the OMIT date1 THROUGH date2 is atomic: Either all OMITs
succeed or none do. The relevant code snippet from omit.c is posted
below for your amusement. :)
Regards,
Dianne.
if (end < start) {
tmp = start;
start = end;
end = tmp;
}
tmp = end - start + 1;
/* Don't create any OMITs if there would be too many. */
if (NumFullOmits + tmp >= MAX_FULL_OMITS) return E_2MANY_FULL;
More information about the Remind-fans
mailing list