aboutsummaryrefslogtreecommitdiffstats
path: root/src/todo.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2008-01-13 12:40:45 +0000
committerFrederic Culot <calcurse@culot.org>2008-01-13 12:40:45 +0000
commit738a3a417071bfaed53297cbefad39b996e55dfb (patch)
tree006b954aa80383c18ed030d1be3f08855d54a2f8 /src/todo.c
parentb7115fbcf2a3a53d52f73ce0693075ab50de96f5 (diff)
downloadcalcurse-738a3a417071bfaed53297cbefad39b996e55dfb.tar.gz
calcurse-738a3a417071bfaed53297cbefad39b996e55dfb.zip
Ability to attach notes to appointments and events added
Diffstat (limited to 'src/todo.c')
-rwxr-xr-xsrc/todo.c13
1 files changed, 3 insertions, 10 deletions
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;
}