/*
- * Copyright (C) 2005-2013 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2014 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
__noreturn static void print_help_and_die(void)
{
- int d = conf.detailed_help_given;
- const char **p = d? write_args_info_detailed_help
- : write_args_info_help;
-
- printf_or_die("%s\n\n", WRITE_CMDLINE_PARSER_PACKAGE "-"
- WRITE_CMDLINE_PARSER_VERSION);
- printf_or_die("%s\n\n", write_args_info_usage);
- for (; *p; p++)
- printf_or_die("%s\n", *p);
- print_writer_helps(d);
+ struct ggo_help h = DEFINE_GGO_HELP(write);
+ bool d = conf.detailed_help_given;
+
+ ggo_print_help(&h, d? GPH_STANDARD_FLAGS_DETAILED : GPH_STANDARD_FLAGS);
+ print_writer_helps(d? GPH_MODULE_FLAGS_DETAILED : GPH_MODULE_FLAGS);
exit(0);
}
sit.btrn = btr_new_node(&(struct btr_node_description)
EMBRACE(.name = "stdin"));
- stdin_set_defaults(&sit);
- register_task(&s, &sit.task);
+ stdin_task_register(&sit, &s);
COPY_WAV_PARMS(&wp, &conf);
wt.cwc = check_wav_init(sit.btrn, NULL, &wp, &cw_btrn);
}
free(wns);
check_wav_shutdown(wt.cwc);
+ sched_shutdown(&s);
return ret;
}
write_cmdline_parser(argc, argv, &conf);
loglevel = get_loglevel_by_name(conf.loglevel_arg);
writer_init();
- HANDLE_VERSION_FLAG("write", conf);
+ version_handle_flag("write", conf.version_given);
if (conf.help_given || conf.detailed_help_given)
print_help_and_die();