mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
vfs/gc.c src/widget.c: removed unneeded #include's.
vfs/vfs-impl.h src/background.h src/charsets.c src/esc.h src/file.h src/execute.c src/vfsdummy.h: fixed missed #include's. src/cons.saver.c: include <config.h> unconditionally. src/complete.c:: fixed #include's. src/win.h src/win.c: removed unneeded #include's; check_movement_keys(): fixed type of returned value.
This commit is contained in:
parent
5f61e9aaa4
commit
26852546b7
@ -8,6 +8,8 @@
|
||||
|
||||
#ifdef WITH_BACKGROUND
|
||||
|
||||
#include <sys/types.h> /* pid_t */
|
||||
|
||||
enum TaskState {
|
||||
Task_Running,
|
||||
Task_Stopped
|
||||
|
@ -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;
|
||||
|
||||
|
@ -30,19 +30,19 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <pwd.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#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 */
|
||||
|
@ -43,9 +43,7 @@
|
||||
* root is even worse.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -35,6 +35,10 @@
|
||||
* byte-to-character encoding.
|
||||
*/
|
||||
|
||||
#include <sys/types.h> /* size_t */
|
||||
|
||||
#include "global.h" /* include <glib.h> */
|
||||
|
||||
/* 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
|
||||
|
@ -21,7 +21,8 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "global.h"
|
||||
#include "tty.h"
|
||||
|
@ -7,6 +7,7 @@
|
||||
#define MC_FILE_H
|
||||
|
||||
#include "global.h"
|
||||
#include <sys/types.h> /* off_t */
|
||||
#include "fileopctx.h"
|
||||
#include "dialog.h" /* Dlg_head */
|
||||
#include "widget.h" /* WLabel */
|
||||
|
@ -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 */
|
||||
|
@ -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() */
|
||||
|
22
src/win.c
22
src/win.c
@ -23,30 +23,21 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_TERMIOS_H
|
||||
#include <termios.h>
|
||||
#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;
|
||||
}
|
||||
|
||||
|
@ -6,9 +6,11 @@
|
||||
#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,
|
||||
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);
|
||||
|
||||
@ -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 */
|
||||
|
8
vfs/gc.c
8
vfs/gc.c
@ -39,21 +39,17 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#include <ctype.h> /* is_digit() */
|
||||
#include <sys/time.h> /* 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 */
|
||||
|
@ -9,7 +9,11 @@
|
||||
|
||||
#ifdef USE_VFS
|
||||
|
||||
#include <stddef.h>
|
||||
/*#include <stddef.h>*/
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "../src/fs.h" /* MC_MAXPATHLEN */
|
||||
|
||||
typedef void *vfsid;
|
||||
struct vfs_stamping;
|
||||
|
Loading…
Reference in New Issue
Block a user