Add io_load_data() wrapper
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
15
src/args.c
15
src/args.c
@@ -747,8 +747,7 @@ int parse_args(int argc, char **argv)
|
||||
io_check_file(path_conf);
|
||||
vars_init();
|
||||
config_load(); /* To get output date format. */
|
||||
io_load_app(&filter);
|
||||
io_load_todo(&filter);
|
||||
io_load_data(&filter);
|
||||
io_save_todo(NULL);
|
||||
io_save_apts(NULL);
|
||||
} else if (query) {
|
||||
@@ -757,8 +756,7 @@ int parse_args(int argc, char **argv)
|
||||
io_check_file(path_conf);
|
||||
vars_init();
|
||||
config_load(); /* To get output date format. */
|
||||
io_load_app(&filter);
|
||||
io_load_todo(&filter);
|
||||
io_load_data(&filter);
|
||||
int add_line = todo_arg(fmt_todo, &limit, &filter);
|
||||
date_arg_from_to(from, to, add_line, fmt_apt, fmt_rapt, fmt_ev,
|
||||
fmt_rev, &limit);
|
||||
@@ -769,24 +767,21 @@ int parse_args(int argc, char **argv)
|
||||
} else if (gc) {
|
||||
io_check_file(path_apts);
|
||||
io_check_file(path_todo);
|
||||
io_load_app(NULL);
|
||||
io_load_todo(NULL);
|
||||
io_load_data(NULL);
|
||||
note_gc();
|
||||
} else if (import) {
|
||||
io_check_file(path_apts);
|
||||
io_check_file(path_todo);
|
||||
/* Get default pager in case we need to show a log file. */
|
||||
vars_init();
|
||||
io_load_app(NULL);
|
||||
io_load_todo(NULL);
|
||||
io_load_data(NULL);
|
||||
io_import_data(IO_IMPORT_ICAL, ifile);
|
||||
io_save_apts(path_apts);
|
||||
io_save_todo(path_todo);
|
||||
} else if (export) {
|
||||
io_check_file(path_apts);
|
||||
io_check_file(path_todo);
|
||||
io_load_app(&filter);
|
||||
io_load_todo(&filter);
|
||||
io_load_data(&filter);
|
||||
io_export_data(xfmt);
|
||||
} else {
|
||||
/* interactive mode */
|
||||
|
||||
Reference in New Issue
Block a user