From 2bf02493385ffe5e51b5480e57f9643bc80b8267 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 11 Oct 2011 13:06:55 +0200 Subject: Avoid unnecessary start time calculations Rename recur_*_inday() to recur_*_find_occurrence() and use the new functions whenever we actually care about the start time of an occurrence. Reintroduce recur_*_inday() as wrappers to recur_*_find_occurrence() and pass NULL as start time buffer (which means "skip start time calculation"). Keep using these when we only want to know if a recurrent item belongs to a specific day but do not care about the actual start time. Signed-off-by: Lukas Fleischer --- src/calcurse.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/calcurse.h') diff --git a/src/calcurse.h b/src/calcurse.h index a3ea45c..fb2be66 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -821,6 +821,12 @@ struct recur_event *recur_event_scan (FILE *, struct tm, int, char, void recur_apoint_write (struct recur_apoint *, FILE *); void recur_event_write (struct recur_event *, FILE *); void recur_save_data (FILE *); +unsigned recur_item_find_occurrence (long, long, llist_t *, int, + int, long, long, unsigned *); +unsigned recur_apoint_find_occurrence (struct recur_apoint *, + long, unsigned *); +unsigned recur_event_find_occurrence (struct recur_event *, long, + unsigned *); unsigned recur_item_inday (long, long, llist_t *, int, int, long, long); unsigned recur_apoint_inday(struct recur_apoint *, long); -- cgit v1.2.3-54-g00ecf