summaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-07-07 18:23:30 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-07-21 18:13:40 +0200
commit87664095cdd2c85d50e1be42442c0c24b611c7dc (patch)
tree48146b5854874fd8c699ab3348b4151905e09760 /src/utils.c
parent40772daaf4d241a71f6eba5190cf8cd03d028880 (diff)
downloadcalcurse-87664095cdd2c85d50e1be42442c0c24b611c7dc.zip
Refactor out note functions
* Add new note_edit() and note_view() helper functions. Use these instead of copy-pasted code in *_note_edit(). * Move all note-related functions (note_edit(), note_view(), note_erase()) to a new source file "note.c". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/utils.c b/src/utils.c
index 949b1b7..4ea2ce3 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -595,24 +595,6 @@ new_tempfile (const char *prefix, int trailing_len)
return mem_strdup (fullname + prefix_len);
}
-/* Erase a note previously attached to a todo, event or appointment. */
-void
-erase_note (char **note, enum eraseflg flag)
-{
- char fullname[BUFSIZ];
-
- if (*note == NULL)
- return;
- if (flag != ERASE_FORCE_KEEP_NOTE)
- {
- (void)snprintf (fullname, BUFSIZ, "%s%s", path_notes, *note);
- if (unlink (fullname) != 0)
- EXIT (_("could not remove note"));
- }
- mem_free (*note);
- *note = NULL;
-}
-
/*
* Convert a string containing a date into three integers containing the year,
* month and day.