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>
This commit is contained in:
Lukas Fleischer
2012-07-07 19:22:49 +02:00
parent 13c21ac280
commit 0f20693b07
5 changed files with 27 additions and 82 deletions

View File

@@ -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)