#include "string.h"
#include "mix.h"
#include "error.h"
+#include "ggo.h"
#include "version.h"
INIT_FADE_ERRLISTS;
exit(EXIT_FAILURE);
}
+__noreturn static void print_help_and_die(void)
+{
+ struct ggo_help h = DEFINE_GGO_HELP(fade);
+ bool d = conf.detailed_help_given;
+
+ ggo_print_help(&h, d? GPH_STANDARD_FLAGS_DETAILED : GPH_STANDARD_FLAGS);
+ exit(0);
+}
+
int main(int argc, char *argv[])
{
int ret;
struct mixer_handle *h = NULL;
fade_cmdline_parser(argc, argv, &conf);
- HANDLE_VERSION_FLAG("fade", conf);
loglevel = get_loglevel_by_name(conf.loglevel_arg);
+ version_handle_flag("fade", conf.version_given);
+ if (conf.help_given || conf.detailed_help_given)
+ print_help_and_die();
ret = configfile_exists();
if (!ret && conf.config_file_given) {
PARA_EMERG_LOG("can not read config file %s\n",