aboutsummaryrefslogtreecommitdiffstats
path: root/src/todo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/todo.c')
-rw-r--r--src/todo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/todo.c b/src/todo.c
index a6b5687..935109f 100644
--- a/src/todo.c
+++ b/src/todo.c
@@ -183,6 +183,15 @@ todo_add (char *mesg, int id, char *note)
return todo;
}
+void
+todo_write (struct todo *todo, FILE *f)
+{
+ if (todo->note)
+ (void)fprintf (f, "[%d]>%s %s\n", todo->id, todo->note, todo->mesg);
+ else
+ (void)fprintf (f, "[%d] %s\n", todo->id, todo->mesg);
+}
+
/* Delete a note previously attached to a todo item. */
static void
todo_delete_note_bynum (unsigned num)