From ba28426fc0788d52ac7128c2dcd7afeff8be1127 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 26 Jun 2012 09:17:23 +0200 Subject: Remove unused functions Remove apoint_get(), event_get(), recur_get_apoint() and recur_get_event(), since they are no longer used. Signed-off-by: Lukas Fleischer --- src/apoint.c | 12 ------------ src/calcurse.h | 4 ---- src/event.c | 12 ------------ src/recur.c | 26 -------------------------- 4 files changed, 54 deletions(-) diff --git a/src/apoint.c b/src/apoint.c index d6def9d..5362dc1 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -413,18 +413,6 @@ struct apoint *apoint_scan(FILE * f, struct tm start, struct tm end, char state, return apoint_new(buf, note, tstart, tend - tstart, state); } -/* Retrieve an appointment from the list, given the day and item position. */ -struct apoint *apoint_get(long day, int pos) -{ - llist_item_t *i = LLIST_TS_FIND_NTH(&alist_p, pos, day, apoint_inday); - - if (i) - return LLIST_TS_GET_DATA(i); - - EXIT(_("item not found")); - /* NOTREACHED */ -} - void apoint_delete_bynum(long start, unsigned num, enum eraseflg flag) { llist_item_t *i; diff --git a/src/calcurse.h b/src/calcurse.h index c3233bb..8c50498 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -607,7 +607,6 @@ unsigned apoint_inday(struct apoint *, long); void apoint_sec2str(struct apoint *, long, char *, char *); void apoint_write(struct apoint *, FILE *); struct apoint *apoint_scan(FILE *, struct tm, struct tm, char, char *); -struct apoint *apoint_get(long, int); void apoint_delete_bynum(long, unsigned, enum eraseflg); void apoint_scroll_pad_down(int, int); void apoint_scroll_pad_up(int); @@ -697,7 +696,6 @@ struct event *event_new(char *, char *, long, int); unsigned event_inday(struct event *, long); void event_write(struct event *, FILE *); struct event *event_scan(FILE *, struct tm, int, char *); -struct event *event_get(long, int); void event_delete_bynum(long, unsigned, enum eraseflg); void event_paste_item(void); @@ -868,8 +866,6 @@ void recur_apoint_erase(long, unsigned, unsigned, enum eraseflg); void recur_repeat_item(void); void recur_exc_scan(llist_t *, FILE *); struct notify_app *recur_apoint_check_next(struct notify_app *, long, long); -struct recur_apoint *recur_get_apoint(long, int); -struct recur_event *recur_get_event(long, int); void recur_apoint_switch_notify(struct recur_apoint *); void recur_event_paste_item(void); void recur_apoint_paste_item(void); diff --git a/src/event.c b/src/event.c index f460ded..6371b27 100644 --- a/src/event.c +++ b/src/event.c @@ -154,18 +154,6 @@ struct event *event_scan(FILE * f, struct tm start, int id, char *note) return event_new(buf, note, tstart, id); } -/* Retrieve an event from the list, given the day and item position. */ -struct event *event_get(long day, int pos) -{ - llist_item_t *i = LLIST_FIND_NTH(&eventlist, pos, day, event_inday); - - if (i) - return LLIST_TS_GET_DATA(i); - - EXIT(_("event not found")); - /* NOTREACHED */ -} - /* Delete an event from the list. */ void event_delete_bynum(long start, unsigned num, enum eraseflg flag) { diff --git a/src/recur.c b/src/recur.c index 5eb6de6..024d886 100644 --- a/src/recur.c +++ b/src/recur.c @@ -978,32 +978,6 @@ struct notify_app *recur_apoint_check_next(struct notify_app *app, long start, return app; } -/* Returns a structure containing the selected recurrent appointment. */ -struct recur_apoint *recur_get_apoint(long date, int num) -{ - llist_item_t *i = LLIST_TS_FIND_NTH(&recur_alist_p, num, date, - recur_apoint_inday); - - if (i) - return LLIST_TS_GET_DATA(i); - - EXIT(_("item not found")); - /* NOTREACHED */ -} - -/* Returns a structure containing the selected recurrent event. */ -struct recur_event *recur_get_event(long date, int num) -{ - llist_item_t *i = LLIST_FIND_NTH(&recur_elist, num, date, - recur_event_inday); - - if (i) - return LLIST_GET_DATA(i); - - EXIT(_("item not found")); - /* NOTREACHED */ -} - /* Switch recurrent item notification state. */ void recur_apoint_switch_notify(struct recur_apoint *rapt) { -- cgit v1.2.3-70-g09d2