diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-07-07 19:22:49 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-07-07 21:40:56 +0200 |
commit | 0f20693b07cb67c64d125cc1b07522826e4f8e00 (patch) | |
tree | 318e55e4021c3c57d1753d7665241e4f6e2fb7f2 /src/event.c | |
parent | 13c21ac28023542a10cb75c085ce1925da2cdd0e (diff) | |
download | calcurse-0f20693b07cb67c64d125cc1b07522826e4f8e00.zip |
Remove the erase flag and legacy deletion code
This is no longer needed. Note removal, as well as exception handling,
have been moved to separate functions and the cut feature has been
merged into the deletion function.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/event.c')
-rw-r--r-- | src/event.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/event.c b/src/event.c index b53ec2f..561c299 100644 --- a/src/event.c +++ b/src/event.c @@ -150,23 +150,14 @@ struct event *event_scan(FILE * f, struct tm start, int id, char *note) } /* Delete an event from the list. */ -void event_delete(struct event *ev, enum eraseflg flag) +void event_delete(struct event *ev) { llist_item_t *i = LLIST_FIND_FIRST(&eventlist, ev, NULL); if (!i) EXIT(_("no such appointment")); - switch (flag) { - case ERASE_CUT: - LLIST_REMOVE(&eventlist, i); - break; - default: - LLIST_REMOVE(&eventlist, i); - mem_free(ev->mesg); - mem_free(ev); - break; - } + LLIST_REMOVE(&eventlist, i); } void event_paste_item(struct event *ev, long date) |