diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-07-07 18:10:12 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-07-07 21:36:38 +0200 |
commit | 88588ad704329939834b45eb2058fb48f0a5068f (patch) | |
tree | 37156cf05dd7ce803d381089cbca977135790b7d /src/calcurse.h | |
parent | 7fb25a84d427f4a3cb79ea02908daf9ce8ba07ca (diff) | |
download | calcurse-88588ad704329939834b45eb2058fb48f0a5068f.zip |
Refactor exception handling
Remove the exception handling code from recur_*_erase() and move it to
separate functions recur_*_add_exc(). Create a wrapper function
day_item_add_exc() that can be used to add an exception to generic
items.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.h')
-rw-r--r-- | src/calcurse.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/calcurse.h b/src/calcurse.h index b0f1477..25a91e3 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -671,6 +671,7 @@ char *day_item_get_note(struct day_item *); void day_item_erase_note(struct day_item *); long day_item_get_duration(struct day_item *); int day_item_get_state(struct day_item *); +void day_item_add_exc(struct day_item *, long); void day_item_fork(struct day_item *, struct day_item *); int day_store_items(long, unsigned *, unsigned *, regex_t *); struct day_items_nb *day_process_storage(struct date *, unsigned, @@ -887,8 +888,10 @@ 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 *); unsigned recur_event_inday(struct recur_event *, long *); -void recur_event_erase(struct recur_event *, long, unsigned, enum eraseflg); -void recur_apoint_erase(struct recur_apoint *, long, unsigned, enum eraseflg); +void recur_event_add_exc(struct recur_event *, long); +void recur_apoint_add_exc(struct recur_apoint *, long); +void recur_event_erase(struct recur_event *, enum eraseflg); +void recur_apoint_erase(struct recur_apoint *, enum eraseflg); void recur_exc_scan(llist_t *, FILE *); struct notify_app *recur_apoint_check_next(struct notify_app *, long, long); void recur_apoint_switch_notify(struct recur_apoint *); |