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 <calcurse@cryptocrack.de>
This commit is contained in:
parent
225a310de1
commit
9a6b875b1d
32
src/args.c
32
src/args.c
@ -641,10 +641,10 @@ int parse_args(int argc, char **argv)
|
|||||||
non_interactive = 1;
|
non_interactive = 1;
|
||||||
} else if (gflag) {
|
} else if (gflag) {
|
||||||
io_init(cfile, datadir);
|
io_init(cfile, datadir);
|
||||||
io_check_dir(path_dir, NULL);
|
io_check_dir(path_dir);
|
||||||
io_check_dir(path_notes, NULL);
|
io_check_dir(path_notes);
|
||||||
io_check_file(path_apts, NULL);
|
io_check_file(path_apts);
|
||||||
io_check_file(path_todo, NULL);
|
io_check_file(path_todo);
|
||||||
io_load_app();
|
io_load_app();
|
||||||
io_load_todo();
|
io_load_todo();
|
||||||
note_gc();
|
note_gc();
|
||||||
@ -652,12 +652,12 @@ int parse_args(int argc, char **argv)
|
|||||||
} else if (multiple_flag) {
|
} else if (multiple_flag) {
|
||||||
if (load_data) {
|
if (load_data) {
|
||||||
io_init(cfile, datadir);
|
io_init(cfile, datadir);
|
||||||
io_check_dir(path_dir, NULL);
|
io_check_dir(path_dir);
|
||||||
io_check_dir(path_notes, NULL);
|
io_check_dir(path_notes);
|
||||||
}
|
}
|
||||||
if (iflag) {
|
if (iflag) {
|
||||||
io_check_file(path_apts, NULL);
|
io_check_file(path_apts);
|
||||||
io_check_file(path_todo, NULL);
|
io_check_file(path_todo);
|
||||||
/* Get default pager in case we need to show a log file. */
|
/* Get default pager in case we need to show a log file. */
|
||||||
vars_init();
|
vars_init();
|
||||||
io_load_app();
|
io_load_app();
|
||||||
@ -668,8 +668,8 @@ int parse_args(int argc, char **argv)
|
|||||||
non_interactive = 1;
|
non_interactive = 1;
|
||||||
}
|
}
|
||||||
if (xflag) {
|
if (xflag) {
|
||||||
io_check_file(path_apts, NULL);
|
io_check_file(path_apts);
|
||||||
io_check_file(path_todo, NULL);
|
io_check_file(path_todo);
|
||||||
io_load_app();
|
io_load_app();
|
||||||
io_load_todo();
|
io_load_todo();
|
||||||
io_export_data(xfmt);
|
io_export_data(xfmt);
|
||||||
@ -677,20 +677,20 @@ int parse_args(int argc, char **argv)
|
|||||||
return non_interactive;
|
return non_interactive;
|
||||||
}
|
}
|
||||||
if (tflag) {
|
if (tflag) {
|
||||||
io_check_file(path_todo, NULL);
|
io_check_file(path_todo);
|
||||||
io_load_todo();
|
io_load_todo();
|
||||||
todo_arg(tnum, fmt_todo, preg);
|
todo_arg(tnum, fmt_todo, preg);
|
||||||
non_interactive = 1;
|
non_interactive = 1;
|
||||||
}
|
}
|
||||||
if (nflag) {
|
if (nflag) {
|
||||||
io_check_file(path_apts, NULL);
|
io_check_file(path_apts);
|
||||||
io_load_app();
|
io_load_app();
|
||||||
next_arg();
|
next_arg();
|
||||||
non_interactive = 1;
|
non_interactive = 1;
|
||||||
}
|
}
|
||||||
if (dflag || rflag || sflag) {
|
if (dflag || rflag || sflag) {
|
||||||
io_check_file(path_apts, NULL);
|
io_check_file(path_apts);
|
||||||
io_check_file(path_conf, NULL);
|
io_check_file(path_conf);
|
||||||
io_load_app();
|
io_load_app();
|
||||||
config_load(); /* To get output date format. */
|
config_load(); /* To get output date format. */
|
||||||
if (dflag)
|
if (dflag)
|
||||||
@ -702,8 +702,8 @@ int parse_args(int argc, char **argv)
|
|||||||
} else if (aflag) {
|
} else if (aflag) {
|
||||||
struct date day;
|
struct date day;
|
||||||
|
|
||||||
io_check_file(path_apts, NULL);
|
io_check_file(path_apts);
|
||||||
io_check_file(path_conf, NULL);
|
io_check_file(path_conf);
|
||||||
vars_init();
|
vars_init();
|
||||||
config_load(); /* To get output date format. */
|
config_load(); /* To get output date format. */
|
||||||
io_load_app();
|
io_load_app();
|
||||||
|
@ -754,9 +754,9 @@ void io_save_cal(enum save_display);
|
|||||||
void io_load_app(void);
|
void io_load_app(void);
|
||||||
void io_load_todo(void);
|
void io_load_todo(void);
|
||||||
void io_load_keys(const char *);
|
void io_load_keys(const char *);
|
||||||
void io_check_dir(char *, int *);
|
int io_check_dir(const char *);
|
||||||
unsigned io_file_exist(char *);
|
unsigned io_file_exist(const char *);
|
||||||
void io_check_file(char *, int *);
|
int io_check_file(const char *);
|
||||||
int io_check_data_files(void);
|
int io_check_data_files(void);
|
||||||
void io_startup_screen(int);
|
void io_startup_screen(int);
|
||||||
void io_export_data(enum export_type);
|
void io_export_data(enum export_type);
|
||||||
|
6
src/io.c
6
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!"));
|
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)
|
if (read_only)
|
||||||
return -1;
|
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;
|
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)
|
if (read_only)
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user