Add recur_apoint_inday() and recur_event_inday().
To be used with llist_fn_match_t callbacks later. I feel a bit ill adding those functions. This definitely is a hack. Ultimately, there should be some generic recur_item_inday() function that accepts both recurring apointments and events (or some wrapper structure) instead of parameter galeere. This is not the right place to fix that tho. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
14
src/recur.c
14
src/recur.c
@@ -728,6 +728,20 @@ recur_item_inday (long item_start, struct days *item_exc, int rpt_type,
|
||||
return (0);
|
||||
}
|
||||
|
||||
unsigned
|
||||
recur_apoint_inday(struct recur_apoint *rapt, long day_start)
|
||||
{
|
||||
return recur_item_inday (rapt->start, rapt->exc, rapt->rpt->type,
|
||||
rapt->rpt->freq, rapt->rpt->until, day_start);
|
||||
}
|
||||
|
||||
unsigned
|
||||
recur_event_inday(struct recur_event *rev, long day_start)
|
||||
{
|
||||
return recur_item_inday (rev->day, rev->exc, rev->rpt->type, rev->rpt->freq,
|
||||
rev->rpt->until, day_start);
|
||||
}
|
||||
|
||||
/*
|
||||
* Delete a recurrent event from the list (if delete_whole is not null),
|
||||
* or delete only one occurence of the recurrent event.
|
||||
|
||||
Reference in New Issue
Block a user