summaryrefslogtreecommitdiff
path: root/src/io.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-08-02 21:36:25 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-10-05 12:25:47 +0200
commitbc97d60ef2cacfe79875e6c604bf3f0e6d07fbd9 (patch)
tree97d70f3e80f0791f880eee5fdade6d15b59c9017 /src/io.c
parentc7b56ca556f4ffd3e6fe941356c6abc4d16967d4 (diff)
downloadcalcurse-bc97d60ef2cacfe79875e6c604bf3f0e6d07fbd9.zip
Refactor out note deserialization
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/io.c b/src/io.c
index b461b2b..31b4097 100644
--- a/src/io.c
+++ b/src/io.c
@@ -1226,10 +1226,8 @@ io_load_app (void)
c = getc (data_file);
if (c == '>')
{
- (void)fgets (note, NOTESIZ + 1, data_file);
- note[NOTESIZ] = '\0';
+ note_read (note, data_file);
notep = note;
- getc (data_file);
}
else
{
@@ -1324,11 +1322,7 @@ io_load_todo (void)
/* Now read the attached note, if any. */
c = getc (data_file);
if (c == '>')
- {
- (void)fgets (note, NOTESIZ + 1, data_file);
- note[NOTESIZ] = '\0';
- getc (data_file);
- }
+ note_read (note, data_file);
else
note[0] = '\0';
/* Then read todo description. */