diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-06-26 13:29:54 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-06-30 14:34:35 +0200 |
commit | 02c90ba53a658686bad5cb5f88c555d9eef06399 (patch) | |
tree | 4c9676d9e1bb703bb757cd05c6ce273e073e5c0e /src/apoint.c | |
parent | e1fbee0071ad6bb5d5c17865c5a7b67a63930e7d (diff) | |
download | calcurse-02c90ba53a658686bad5cb5f88c555d9eef06399.zip |
Revise *_delete{,_bynum}()
Always pass an item instead of passing a date and a index. This makes
use of the NULL callback that was added with one of the previous
patches.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/apoint.c')
-rw-r--r-- | src/apoint.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/apoint.c b/src/apoint.c index 61acc49..e6e02c4 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -269,17 +269,15 @@ struct apoint *apoint_scan(FILE * f, struct tm start, struct tm end, char state, return apoint_new(buf, note, tstart, tend - tstart, state); } -void apoint_delete_bynum(long start, unsigned num, enum eraseflg flag) +void apoint_delete(struct apoint *apt, enum eraseflg flag) { - llist_item_t *i; int need_check_notify = 0; LLIST_TS_LOCK(&alist_p); - i = LLIST_TS_FIND_NTH(&alist_p, num, &start, apoint_inday); + llist_item_t *i = LLIST_TS_FIND_FIRST(&alist_p, apt, NULL); if (!i) EXIT(_("no such appointment")); - struct apoint *apt = LLIST_TS_GET_DATA(i); switch (flag) { case ERASE_FORCE_ONLY_NOTE: |