diff --git a/src/background.h b/src/background.h index c590ec155..266240d65 100644 --- a/src/background.h +++ b/src/background.h @@ -8,6 +8,8 @@ #ifdef WITH_BACKGROUND +#include /* pid_t */ + enum TaskState { Task_Running, Task_Stopped diff --git a/src/charsets.c b/src/charsets.c index 3e7d43497..c7d5941fb 100644 --- a/src/charsets.c +++ b/src/charsets.c @@ -33,6 +33,7 @@ #include "charsets.h" #include "strutil.h" /* utf-8 functions */ #include "main.h" +#include "util.h" /* concat_dir_and_file() */ int n_codepages = 0; diff --git a/src/complete.c b/src/complete.c index 3b25d2e9f..c9fdb8e06 100644 --- a/src/complete.c +++ b/src/complete.c @@ -30,19 +30,19 @@ #include #include #include -#include +#include #include #include +#include #include #include "global.h" #include "tty.h" -#include "win.h" #include "color.h" #include "dialog.h" #include "widget.h" #include "wtools.h" -#include "main.h" +#include "main.h" /* show_all_if_ambiguous */ #include "util.h" #include "../src/strescape.h" #include "key.h" /* XCTRL and ALT macros */ diff --git a/src/cons.saver.c b/src/cons.saver.c index 72bb3eeff..0ca0b4ab3 100644 --- a/src/cons.saver.c +++ b/src/cons.saver.c @@ -43,9 +43,7 @@ * root is even worse. */ -#ifdef HAVE_CONFIG_H #include -#endif #ifndef _GNU_SOURCE #define _GNU_SOURCE diff --git a/src/dir.c b/src/dir.c index 977d0b6e7..fcc0a202f 100644 --- a/src/dir.c +++ b/src/dir.c @@ -22,7 +22,6 @@ #include -#include #include #include #include diff --git a/src/ecs.h b/src/ecs.h index 66e3e6601..fbb15fe89 100644 --- a/src/ecs.h +++ b/src/ecs.h @@ -35,6 +35,10 @@ * byte-to-character encoding. */ +#include /* size_t */ + +#include "global.h" /* include */ + /* Use the macros ECS_CHAR and ECS_STR to bring character and string * literals to the correct form required by the C compiler. */ #ifdef EXTCHARSET_ENABLED diff --git a/src/execute.c b/src/execute.c index 6b2d4f0ae..bb7d5dc7e 100644 --- a/src/execute.c +++ b/src/execute.c @@ -21,7 +21,8 @@ #include -#include +#include +#include #include "global.h" #include "tty.h" diff --git a/src/file.h b/src/file.h index 250dfe9a8..6e964bb14 100644 --- a/src/file.h +++ b/src/file.h @@ -7,6 +7,7 @@ #define MC_FILE_H #include "global.h" +#include /* off_t */ #include "fileopctx.h" #include "dialog.h" /* Dlg_head */ #include "widget.h" /* WLabel */ diff --git a/src/vfsdummy.h b/src/vfsdummy.h index b7bd7f058..27af5edc1 100644 --- a/src/vfsdummy.h +++ b/src/vfsdummy.h @@ -6,6 +6,9 @@ #ifndef MC_VFSDUMMY_H #define MC_VFSDYMMY_H +#include "global.h" /* glib.h*/ +#include "util.h" + /* Flags of VFS classes */ #define VFSF_LOCAL 1 /* Class is local (not virtual) filesystem */ #define VFSF_NOLINKS 2 /* Hard links not supported */ @@ -76,4 +79,4 @@ vfs_canon (const char *path) return p; } -#endif +#endif /* MC_VFSDUMMY_H */ diff --git a/src/widget.c b/src/widget.c index 86eb69203..318c27c41 100644 --- a/src/widget.c +++ b/src/widget.c @@ -46,7 +46,6 @@ #include "mouse.h" #include "dialog.h" #include "widget.h" -#include "win.h" #include "key.h" /* XCTRL and ALT macros */ #include "../src/mcconfig/mcconfig.h" /* for history loading and saving */ #include "wtools.h" /* For common_dialog_repaint() */ diff --git a/src/win.c b/src/win.c index bf53c8b6a..8eaf8b19c 100644 --- a/src/win.c +++ b/src/win.c @@ -23,30 +23,21 @@ #include #include -#include -#ifdef HAVE_TERMIOS_H -#include -#endif - -#include "global.h" -#include "tty.h" -#include "color.h" -#include "mouse.h" -#include "dialog.h" -#include "widget.h" -#include "win.h" +#include "global.h" /* glib.h */ +#include "tty.h" /* raw(), noraw() */ #include "key.h" /* XCTRL and ALT macros */ #include "layout.h" #include "strutil.h" +#include "win.h" /* * Common handler for standard movement keys in a text area. Provided * functions are called with the "data" argument. backfn and forfn also - * get an argument indicating how many lines to scroll. Return 1 if - * the key was handled, 0 otherwise. + * get an argument indicating how many lines to scroll. Return MSG_HANDLED if + * the key was handled, MSG_NOT_HANDLED otherwise. */ -int +cb_ret_t check_movement_keys (int key, int page_size, void *data, movefn backfn, movefn forfn, movefn topfn, movefn bottomfn) { @@ -228,4 +219,3 @@ int lookup_key (char *keyname) } return 0; } - diff --git a/src/win.h b/src/win.h index 682a8f136..f7d596de0 100644 --- a/src/win.h +++ b/src/win.h @@ -6,10 +6,12 @@ #ifndef MC_WIN_H #define MC_WIN_H +#include "dialog.h" /* cb_ret_t */ + /* Keys management */ typedef void (*movefn) (void *, int); -int check_movement_keys (int key, int page_size, void *data, movefn backfn, - movefn forfn, movefn topfn, movefn bottomfn); +cb_ret_t check_movement_keys (int key, int page_size, void *data, movefn backfn, + movefn forfn, movefn topfn, movefn bottomfn); int lookup_key (char *keyname); /* Terminal management */ @@ -20,4 +22,4 @@ void do_exit_ca_mode (void); void mc_raw_mode (void); void mc_noraw_mode (void); -#endif +#endif /* MC_WIN_H */ diff --git a/vfs/gc.c b/vfs/gc.c index b159af160..ec66ae7ca 100644 --- a/vfs/gc.c +++ b/vfs/gc.c @@ -39,21 +39,17 @@ #include #include #include -#include #include /* is_digit() */ #include /* gettimeofday() */ #include "../src/global.h" #include "../src/tty.h" /* enable/disable interrupt key */ -#include "../src/wtools.h" /* message() */ #include "../src/main.h" /* print_vfs_message */ +#include "../src/layout.h" /* get_current_type() */ #include "utilvfs.h" #include "vfs-impl.h" -#include "gc.h" #include "vfs.h" - -#include "../src/panel.h" /* get_current_panel() */ -#include "../src/layout.h" /* get_current_type() */ +#include "gc.h" int vfs_timeout = 60; /* VFS timeout in seconds */ diff --git a/vfs/vfs-impl.h b/vfs/vfs-impl.h index 484191d7c..f86bf1379 100644 --- a/vfs/vfs-impl.h +++ b/vfs/vfs-impl.h @@ -9,7 +9,11 @@ #ifdef USE_VFS -#include +/*#include */ +#include +#include + +#include "../src/fs.h" /* MC_MAXPATHLEN */ typedef void *vfsid; struct vfs_stamping;