--func-name $(subst _write.ggo,,$(<F))_cmdline_parser < $<
define ggo-opts
+$(if $(filter gui,$(*F)), --no-handle-error) \
$(if $(filter recv filter write audiod,$(*F)), --no-handle-help) \
$(if $(filter afh,$(*F)), --unamed-opts=audio_file) \
$(if $(filter client audioc,$(*F)), --unamed-opts=command) \
.override = 1,
.initialize = 1,
.check_required = 0,
- .check_ambiguity = 0
+ .check_ambiguity = 0,
+ .print_errors = 0,
};
if (!cf) {
return;
}
PARA_INFO_LOG("rereading command line options and config file");
- gui_cmdline_parser(_argc, _argv, &conf);
- gui_cmdline_parser_config_file(cf, &conf, ¶ms);
+ gui_cmdline_parser_ext(_argc, _argv, &conf, ¶ms);
+ if (gui_cmdline_parser_config_file(cf, &conf, ¶ms) != 0) {
+ PARA_EMERG_LOG("errors in config file");
+ finish(EXIT_FAILURE);
+ }
PARA_NOTICE_LOG("config file reloaded");
if (check_key_map_args() < 0)
finish(EXIT_FAILURE);
_argc = argc;
_argv = argv;
- gui_cmdline_parser(argc, argv, &conf);
+ if (gui_cmdline_parser(argc, argv, &conf) != 0)
+ exit(EXIT_FAILURE);
HANDLE_VERSION_FLAG("gui", conf);
cf = configfile_exists();
if (!cf && conf.config_file_given) {
.check_ambiguity = 0,
.print_errors = 1,
};
- gui_cmdline_parser_config_file(cf, &conf, ¶ms);
+ if (gui_cmdline_parser_config_file(cf, &conf, ¶ms) != 0)
+ exit(EXIT_FAILURE);
}
loglevel = get_loglevel_by_name(conf.loglevel_arg);
if (check_key_map_args() < 0) {