summaryrefslogtreecommitdiffstats
path: root/src/calcurse.h
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-10-11 13:06:55 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-10-21 08:58:54 +0200
commit2bf02493385ffe5e51b5480e57f9643bc80b8267 (patch)
tree3c791cc59ef006c689c7c2bda79e3a2222ecf51b /src/calcurse.h
parent28c98f7d0136b4a533e26f076886aa242c709f1c (diff)
downloadcalcurse-2bf02493385ffe5e51b5480e57f9643bc80b8267.tar.gz
calcurse-2bf02493385ffe5e51b5480e57f9643bc80b8267.zip
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 <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.h')
-rw-r--r--src/calcurse.h6
1 files changed, 6 insertions, 0 deletions
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);