From 9a6b875b1d6876db30d3e3438ed28dd460970025 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 26 Nov 2012 01:32:57 +0100 Subject: io_check_*()/io_file_exist(): Fix signatures This was broken in commit 87fb8cfec0d8e8fc901746095458bd316314b6ee. Fix function signatures and update all invocations accordingly. Signed-off-by: Lukas Fleischer --- src/args.c | 32 ++++++++++++++++---------------- src/calcurse.h | 6 +++--- src/io.c | 6 +++--- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/args.c b/src/args.c index 0ffd46b..85c91cb 100644 --- a/src/args.c +++ b/src/args.c @@ -641,10 +641,10 @@ int parse_args(int argc, char **argv) non_interactive = 1; } else if (gflag) { io_init(cfile, datadir); - io_check_dir(path_dir, NULL); - io_check_dir(path_notes, NULL); - io_check_file(path_apts, NULL); - io_check_file(path_todo, NULL); + io_check_dir(path_dir); + io_check_dir(path_notes); + io_check_file(path_apts); + io_check_file(path_todo); io_load_app(); io_load_todo(); note_gc(); @@ -652,12 +652,12 @@ int parse_args(int argc, char **argv) } else if (multiple_flag) { if (load_data) { io_init(cfile, datadir); - io_check_dir(path_dir, NULL); - io_check_dir(path_notes, NULL); + io_check_dir(path_dir); + io_check_dir(path_notes); } if (iflag) { - io_check_file(path_apts, NULL); - io_check_file(path_todo, NULL); + 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(); @@ -668,8 +668,8 @@ int parse_args(int argc, char **argv) non_interactive = 1; } if (xflag) { - io_check_file(path_apts, NULL); - io_check_file(path_todo, NULL); + io_check_file(path_apts); + io_check_file(path_todo); io_load_app(); io_load_todo(); io_export_data(xfmt); @@ -677,20 +677,20 @@ int parse_args(int argc, char **argv) return non_interactive; } if (tflag) { - io_check_file(path_todo, NULL); + io_check_file(path_todo); io_load_todo(); todo_arg(tnum, fmt_todo, preg); non_interactive = 1; } if (nflag) { - io_check_file(path_apts, NULL); + io_check_file(path_apts); io_load_app(); next_arg(); non_interactive = 1; } if (dflag || rflag || sflag) { - io_check_file(path_apts, NULL); - io_check_file(path_conf, NULL); + io_check_file(path_apts); + io_check_file(path_conf); io_load_app(); config_load(); /* To get output date format. */ if (dflag) @@ -702,8 +702,8 @@ int parse_args(int argc, char **argv) } else if (aflag) { struct date day; - io_check_file(path_apts, NULL); - io_check_file(path_conf, NULL); + io_check_file(path_apts); + io_check_file(path_conf); vars_init(); config_load(); /* To get output date format. */ io_load_app(); diff --git a/src/calcurse.h b/src/calcurse.h index 041b865..0feefcc 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -754,9 +754,9 @@ void io_save_cal(enum save_display); void io_load_app(void); void io_load_todo(void); void io_load_keys(const char *); -void io_check_dir(char *, int *); -unsigned io_file_exist(char *); -void io_check_file(char *, int *); +int io_check_dir(const char *); +unsigned io_file_exist(const char *); +int io_check_file(const char *); int io_check_data_files(void); void io_startup_screen(int); void io_export_data(enum export_type); diff --git a/src/io.c b/src/io.c index 1988179..b8fccfd 100644 --- a/src/io.c +++ b/src/io.c @@ -793,7 +793,7 @@ void io_load_keys(const char *pager) WARN_MSG(_("Some actions do not have any associated key bindings!")); } -void io_check_dir(char *dir, int *missing) +int io_check_dir(const char *dir) { if (read_only) return -1; @@ -812,7 +812,7 @@ void io_check_dir(char *dir, int *missing) } } -unsigned io_file_exist(char *file) +unsigned io_file_exist(const char *file) { FILE *fd; @@ -825,7 +825,7 @@ unsigned io_file_exist(char *file) } } -unsigned io_check_file(char *file) +int io_check_file(const char *file) { if (read_only) return -1; -- cgit v1.2.3