There is no point in calling gui_cmdline_parser_ext() when rereading
the configuration since this parser only looks at the command line
options which never change.
Removing the call in com_reread_conf() also allows to get rid of the
global _argc and _argv variables.
static struct gui_theme theme;
static struct gui_theme theme;
-static int _argc;
-static char **_argv;
-
static void com_help(void);
static void com_reread_conf(void);
static void com_enlarge_top_win(void);
static void com_help(void);
static void com_reread_conf(void);
static void com_enlarge_top_win(void);
return;
}
PARA_INFO_LOG("rereading command line options and config file\n");
return;
}
PARA_INFO_LOG("rereading command line options and config file\n");
- gui_cmdline_parser_ext(_argc, _argv, &conf, ¶ms);
/*
* Despite .print_errors is set to 0, gengetopt will print to stderr
* anyway, and exit on errors. So we have to shutdown curses first.
/*
* Despite .print_errors is set to 0, gengetopt will print to stderr
* anyway, and exit on errors. So we have to shutdown curses first.
- _argc = argc;
- _argv = argv;
-
gui_cmdline_parser(argc, argv, &conf); /* exits on errors */
loglevel = get_loglevel_by_name(conf.loglevel_arg);
version_handle_flag("gui", conf.version_given);
gui_cmdline_parser(argc, argv, &conf); /* exits on errors */
loglevel = get_loglevel_by_name(conf.loglevel_arg);
version_handle_flag("gui", conf.version_given);