diff options
author | Yorhel <git@yorhel.nl> | 2020-01-25 09:25:08 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-01-25 09:25:11 +0100 |
commit | ecb71f25501bc78efdaaa2535e95a58d11e09e5a (patch) | |
tree | 0fbe19c034ee85ef7eb3e450c3c57cd4dd30cffa | |
parent | 7875a76bba2ea3b88439c3e304b15c486c14fc79 (diff) |
Fix definitions of global vars `confirm_quit` and `dir_process`
They were defined (rather than just declared) in .h files, when they
really should be defined in at most a single .c file.
Fixes #140.
-rw-r--r-- | src/browser.h | 1 | ||||
-rw-r--r-- | src/dir.h | 2 | ||||
-rw-r--r-- | src/dir_common.c | 1 | ||||
-rw-r--r-- | src/main.c | 1 |
4 files changed, 3 insertions, 2 deletions
diff --git a/src/browser.h b/src/browser.h index 41a44e6..e748cd2 100644 --- a/src/browser.h +++ b/src/browser.h @@ -28,7 +28,6 @@ #include "global.h" -int confirm_quit; int browse_key(int); void browse_draw(void); void browse_init(struct dir *); @@ -103,7 +103,7 @@ int dir_export_init(const char *fn); /* Function set by input code. Returns dir_output.final(). */ -int (*dir_process)(); +extern int (*dir_process)(); /* Scanning a live directory */ extern int dir_scan_smfs; diff --git a/src/dir_common.c b/src/dir_common.c index f17fa2c..284a981 100644 --- a/src/dir_common.c +++ b/src/dir_common.c @@ -31,6 +31,7 @@ #include <stdarg.h> +int (*dir_process)(); char *dir_curpath; /* Full path of the last seen item. */ struct dir_output dir_output; char *dir_fatalerr; /* Error message on a fatal error. (NULL if there was no fatal error) */ @@ -42,6 +42,7 @@ long update_delay = 100; int cachedir_tags = 0; int extended_info = 0; int follow_symlinks = 0; +int confirm_quit = 0; static int min_rows = 17, min_cols = 60; static int ncurses_init = 0; |