From a78115ad8ee16a56e40df7e11b2e68fcbdb01a15 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Mon, 15 Feb 2010 11:21:30 +0000 Subject: [PATCH] Fixed variable declarations and added missing includes. Signed-off-by: Andrew Borodin --- lib/tty/color.h | 1 + lib/tty/tty.c | 5 +++++ lib/tty/tty.h | 2 ++ src/args.c | 23 ++++++++--------------- src/main.c | 8 ++------ src/main.h | 2 +- 6 files changed, 19 insertions(+), 22 deletions(-) diff --git a/lib/tty/color.h b/lib/tty/color.h index 0f259327..c204d0a2 100644 --- a/lib/tty/color.h +++ b/lib/tty/color.h @@ -20,6 +20,7 @@ # include "tty-ncurses.h" #endif +/* colors specified on the command line: they override any other setting */ extern char *command_line_colors; void tty_init_colors (gboolean disable, gboolean force); diff --git a/lib/tty/tty.c b/lib/tty/tty.c index 3c869e19..da23d90d 100644 --- a/lib/tty/tty.c +++ b/lib/tty/tty.c @@ -43,6 +43,11 @@ /*** global variables **************************************************/ +/* If true program softkeys (HP terminals only) on startup and after every + command ran in the subshell to the description found in the termcap/terminfo + database */ +int reset_hp_softkeys = 0; + /* If true lines are drown by spaces */ gboolean slow_tty = FALSE; diff --git a/lib/tty/tty.h b/lib/tty/tty.h index e3133e3b..72b7941b 100644 --- a/lib/tty/tty.h +++ b/lib/tty/tty.h @@ -21,6 +21,8 @@ /* {{{ Input }}} */ +extern int reset_hp_softkeys; + extern void tty_init (gboolean slow, gboolean ugly_lines); extern void tty_shutdown (void); diff --git a/src/args.c b/src/args.c index 203650de..12846952 100644 --- a/src/args.c +++ b/src/args.c @@ -25,29 +25,22 @@ */ #include +#include #include - #include "lib/global.h" #include "lib/tty/tty.h" +#include "lib/tty/color.h" /* command_line_colors */ #include "lib/strutil.h" -#include "src/args.h" +#include "src/main.h" #include "src/textconf.h" +#include "subshell.h" /* use_subshell */ -/*** external variables **************************************************************************/ - -extern int reset_hp_softkeys; -extern int use_subshell; - -extern char *mc_home; -extern char *mc_home_alt; +#include "src/args.h" -/* colors specified on the command line: they override any other setting */ -extern char *command_line_colors; +/*** external variables **************************************************************************/ -extern const char *edit_one_file; -extern const char *view_one_file; /*** global variables ****************************************************************************/ /* If true, show version info and exit */ @@ -93,11 +86,11 @@ int mc_args__debug_level = 0; static GOptionContext *context; - static gboolean mc_args__nouse_subshell = FALSE; static gboolean mc_args__show_datadirs = FALSE; -GOptionGroup *main_group; +static GOptionGroup *main_group; + static const GOptionEntry argument_main_table[] = { /* generic options */ { diff --git a/src/main.c b/src/main.c index 2717726e..27e34b76 100644 --- a/src/main.c +++ b/src/main.c @@ -42,11 +42,12 @@ #include "lib/global.h" #include "lib/tty/tty.h" -#include "lib/skin.h" #include "lib/tty/mouse.h" #include "lib/tty/key.h" /* For init_key() */ #include "lib/tty/win.h" /* xterm_flag */ +#include "lib/skin.h" + #include "lib/mcconfig.h" #include "lib/filehighlight.h" #include "lib/fileloc.h" /* MC_USERCONF_DIR */ @@ -197,11 +198,6 @@ int mouse_move_pages = 1; /* If true: l&r arrows are used to chdir if the input line is empty */ int navigate_with_arrows = 0; -/* If true program softkeys (HP terminals only) on startup and after every - command ran in the subshell to the description found in the termcap/terminfo - database */ -int reset_hp_softkeys = 0; - /* The prompt */ const char *mc_prompt = NULL; diff --git a/src/main.h b/src/main.h index a21d2133..3ad59c1f 100644 --- a/src/main.h +++ b/src/main.h @@ -105,6 +105,7 @@ extern const global_keymap_t *help_map; #ifdef HAVE_SUBSHELL_SUPPORT void do_update_prompt (void); +int load_prompt (int fd, void *unused); #endif enum cd_enum { @@ -115,7 +116,6 @@ enum cd_enum { int do_cd (const char *new_dir, enum cd_enum cd_type); /* For find.c */ void sort_cmd (void); void change_panel (void); -int load_prompt (int, void *); void save_cwds_stat (void); void quiet_quit_cmd (void); /* For cmd.c and command.c */ -- 2.11.4.GIT