diff options
author | Lars Henriksen <LarsHenriksen@get2net.dk> | 2019-12-08 09:16:24 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2020-04-28 07:32:44 -0400 |
commit | bf3dba2ae2b3c1f0e06191b6878dc7f22570f8f6 (patch) | |
tree | 1a5c183b753861cf3e3fb37ba181787f3da3da3f /src/calcurse.h | |
parent | ce81c0fa6362f0092f40eab1cddf0a6339c473c5 (diff) | |
download | calcurse-bf3dba2ae2b3c1f0e06191b6878dc7f22570f8f6.tar.gz calcurse-bf3dba2ae2b3c1f0e06191b6878dc7f22570f8f6.zip |
Improve data load error reporting
The last part of loading appointments and events is performed by four
"scan" functions called from io_load_app(). Failure in this part of data
load does not use io_load_error().
The four "scan" functions are changed to return an error message on
failure and NULL otherwise (the previous return value was not used).
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/calcurse.h')
-rw-r--r-- | src/calcurse.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/calcurse.h b/src/calcurse.h index 204ee2c..768993e 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -766,7 +766,7 @@ void apoint_sec2str(struct apoint *, time_t, char *, char *); char *apoint_tostr(struct apoint *); char *apoint_hash(struct apoint *); void apoint_write(struct apoint *, FILE *); -struct apoint *apoint_scan(FILE *, struct tm, struct tm, char, char *, +char *apoint_scan(FILE *, struct tm, struct tm, char, char *, struct item_filter *); void apoint_delete(struct apoint *); struct notify_app *apoint_check_next(struct notify_app *, time_t); @@ -864,7 +864,7 @@ unsigned event_inday(struct event *, time_t *); char *event_tostr(struct event *); char *event_hash(struct event *); void event_write(struct event *, FILE *); -struct event *event_scan(FILE *, struct tm, int, char *, struct item_filter *); +char *event_scan(FILE *, struct tm, int, char *, struct item_filter *); void event_delete(struct event *); void event_paste_item(struct event *, time_t); int event_dummy(struct day_item *); @@ -1051,10 +1051,10 @@ struct recur_event *recur_event_new(char *, char *, time_t, int, struct rpt *); char recur_def2char(enum recur_type); int recur_char2def(char); -struct recur_apoint *recur_apoint_scan(FILE *, struct tm, struct tm, char, +char *recur_apoint_scan(FILE *, struct tm, struct tm, char, char *, struct item_filter *, struct rpt *); -struct recur_event *recur_event_scan(FILE *, struct tm, int, char *, +char *recur_event_scan(FILE *, struct tm, int, char *, struct item_filter *, struct rpt *); char *recur_apoint_tostr(struct recur_apoint *); char *recur_apoint_hash(struct recur_apoint *); |