aboutsummaryrefslogtreecommitdiffstats
path: root/src/event.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-06-26 11:22:08 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-06-30 14:34:35 +0200
commitb8b6830dfd75f6870b2171e7f31cb0cdb927532e (patch)
treecd3ad69b32150402de8b031f68705fb2f8e99600 /src/event.c
parent8a85aaafa5905297398605eb890b00d22416eeb5 (diff)
downloadcalcurse-b8b6830dfd75f6870b2171e7f31cb0cdb927532e.tar.gz
calcurse-b8b6830dfd75f6870b2171e7f31cb0cdb927532e.zip
Allow passing more complex data to list callbacks
Change the data type of the "data" parameter from "long" to "void *" in llist_find_*() signatures to allow for passing more complex objects. Change all llist_find_*() invocations and callbacks accordingly. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/event.c')
-rw-r--r--src/event.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/event.c b/src/event.c
index 6371b27..4af9f23 100644
--- a/src/event.c
+++ b/src/event.c
@@ -104,9 +104,9 @@ struct event *event_new(char *mesg, char *note, long day, int id)
}
/* Check if the event belongs to the selected day */
-unsigned event_inday(struct event *i, long start)
+unsigned event_inday(struct event *i, long *start)
{
- return (i->day < start + DAYINSEC && i->day >= start);
+ return (i->day < *start + DAYINSEC && i->day >= *start);
}
/* Write to file the event in user-friendly format */
@@ -157,7 +157,7 @@ struct event *event_scan(FILE * f, struct tm start, int id, char *note)
/* Delete an event from the list. */
void event_delete_bynum(long start, unsigned num, enum eraseflg flag)
{
- llist_item_t *i = LLIST_FIND_NTH(&eventlist, num, start, event_inday);
+ llist_item_t *i = LLIST_FIND_NTH(&eventlist, num, &start, event_inday);
if (!i)
EXIT(_("no such appointment"));