HANDLE_VERSION_FLAG("audioc", conf);
cf = configfile_exists();
if (cf) {
- if (audioc_cmdline_parser_configfile(cf, &conf, 0, 0, 0)) {
+ struct audioc_cmdline_parser_params params = {
+ .override = 0,
+ .initialize = 0,
+ .check_required = 0,
+ .check_ambiguity = 0
+ };
+ if (audioc_cmdline_parser_config_file(cf, &conf, ¶ms)) {
fprintf(stderr, "parse error in config file\n");
exit(EXIT_FAILURE);
}
para_drop_privileges(conf.user_arg, conf.group_arg);
cf = configfile_exists();
if (cf) {
- if (audiod_cmdline_parser_configfile(cf, &conf, 0, 0, 0)) {
+ struct audiod_cmdline_parser_params params = {
+ .override = 0,
+ .initialize = 0,
+ .check_required = 0,
+ .check_ambiguity = 0
+
+ };
+ if (audiod_cmdline_parser_config_file(cf, &conf, ¶ms)) {
PARA_EMERG_LOG("%s", "parse error in config file\n");
exit(EXIT_FAILURE);
}
ret = -E_NO_CONFIG;
goto out;
}
- if (!ret)
- client_cmdline_parser_configfile(pcd->config_file,
- &pcd->conf, 0, 0, 0);
+ if (!ret) {
+ struct client_cmdline_parser_params params = {
+ .override = 0,
+ .initialize = 0,
+ .check_required = 0,
+ .check_ambiguity = 0
+ };
+ client_cmdline_parser_config_file(pcd->config_file,
+ &pcd->conf, ¶ms);
+ }
ret = 1;
PARA_INFO_LOG("loglevel: %d\n", pcd->conf.loglevel_arg);
PARA_INFO_LOG("config_file: %s\n", pcd->config_file);
conf.config_file_arg);
exit(EXIT_FAILURE);
}
- if (ret)
- fade_cmdline_parser_configfile(conf.config_file_arg,
- &conf, 0, 0, 0);
+ if (ret) {
+ struct fade_cmdline_parser_params params = {
+ .override = 0,
+ .initialize = 0,
+ .check_required = 0,
+ .check_ambiguity = 0
+ };
+ fade_cmdline_parser_config_file(conf.config_file_arg,
+ &conf, ¶ms);
+ }
ret = open_mixer();
if (ret < 0) {
PARA_EMERG_LOG("can not open mixer device %s.",
free(home);
}
if (!stat(cf, &statbuf)) {
- if (filter_cmdline_parser_configfile(cf, &conf, 0, 0, 0))
+ struct filter_cmdline_parser_params params = {
+ .override = 0,
+ .initialize = 0,
+ .check_required = 0,
+ .check_ambiguity = 0
+ };
+ if (filter_cmdline_parser_config_file(cf, &conf, ¶ms))
return -E_FILTER_SYNTAX;
}
if (!conf.list_filters_given)
static void com_reread_conf(void)
{
char *cf =configfile_exists();
+ struct gui_cmdline_parser_params params = {
+ .override = 1,
+ .initialize = 1,
+ .check_required = 0,
+ .check_ambiguity = 0
+ };
if (!cf) {
PARA_WARNING_LOG("%s", "there is no configuration to read");
}
PARA_INFO_LOG("%s", "rereading command line options and config file");
gui_cmdline_parser(_argc, _argv, &conf);
- gui_cmdline_parser_configfile(cf, &conf, 1, 1, 0);
+ gui_cmdline_parser_config_file(cf, &conf, ¶ms);
PARA_NOTICE_LOG("%s", "config file reloaded");
if (check_key_map_args() < 0)
finish(EXIT_FAILURE);
conf.config_file_arg);
exit(EXIT_FAILURE);
}
- if (cf)
- gui_cmdline_parser_configfile(cf, &conf, 0, 0, 0);
+ if (cf) {
+ struct gui_cmdline_parser_params params = {
+ .override = 0,
+ .initialize = 0,
+ .check_required = 0,
+ .check_ambiguity = 0
+ };
+ gui_cmdline_parser_config_file(cf, &conf, ¶ms);
+ }
if (check_key_map_args() < 0) {
fprintf(stderr, "invalid key map in config file\n");
exit(EXIT_FAILURE);
args_info.config_file_arg);
exit(EXIT_FAILURE);
}
- if (ret)
- sdl_gui_cmdline_parser_configfile(args_info.config_file_arg,
- &args_info, 0, 0, 0);
+ if (ret) {
+ struct sdl_gui_cmdline_parser_params params = {
+ .override = 0,
+ .initialize = 0,
+ .check_required = 0,
+ .check_ambiguity = 0
+ };
+ sdl_gui_cmdline_parser_config_file(args_info.config_file_arg,
+ &args_info, ¶ms);
+ }
signal(SIGCHLD, SIG_IGN);
width = args_info.width_arg;
height = args_info.height_arg;
}
if (!ret) {
int tmp = conf.daemon_given;
- server_cmdline_parser_configfile(cf, &conf, override, 0, 0);
+ struct server_cmdline_parser_params params = {
+ .override = override,
+ .initialize = 0,
+ .check_required = 0,
+ .check_ambiguity = 0
+ };
+ server_cmdline_parser_config_file(cf, &conf, ¶ms);
conf.daemon_given = tmp;
}
/* logfile */