From 738a3a417071bfaed53297cbefad39b996e55dfb Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Sun, 13 Jan 2008 12:40:45 +0000 Subject: Ability to attach notes to appointments and events added --- src/todo.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/todo.c') diff --git a/src/todo.c b/src/todo.c index 987492f..322ec6d 100755 --- a/src/todo.c +++ b/src/todo.c @@ -1,4 +1,4 @@ -/* $calcurse: todo.c,v 1.17 2007/12/31 17:37:53 culot Exp $ */ +/* $calcurse: todo.c,v 1.18 2008/01/13 12:40:45 culot Exp $ */ /* * Calcurse - text-based organizer @@ -179,7 +179,6 @@ todo_delete_note_bynum(unsigned num) { unsigned n; struct todo_s *i, **iptr; - char fullname[BUFSIZ]; n = 0; iptr = &todolist; @@ -189,13 +188,7 @@ todo_delete_note_bynum(unsigned num) ierror( _("FATAL ERROR in todo_delete_note_bynum: " "no note attached\n"), IERROR_FATAL); - snprintf(fullname, BUFSIZ, "%s%s", path_notes, i->note); - if (unlink(fullname) != 0) - ierror( - _("FATAL ERROR in todo_delete_note_bynum: " - "could not remove note\n"), IERROR_FATAL); - free(i->note); - i->note = NULL; + erase_note(&i->note); return; } iptr = &i->next; @@ -221,7 +214,7 @@ todo_delete_bynum(unsigned num) *iptr = i->next; free(i->mesg); if (i->note != NULL) - free(i->note); + erase_note(&i->note); free(i); return; } -- cgit v1.2.3