- if (t->ret != -E_NO_WAV_HEADER && t->ret != -E_WAV_HEADER_SUCCESS) {
- PARA_ERROR_LOG("%s\n", PARA_STRERROR(-t->ret));
- exit(EXIT_FAILURE);
- }
- PARA_INFO_LOG("%s\n", PARA_STRERROR(-t->ret));
- unregister_task(t);
- if (t->ret == -E_WAV_HEADER_SUCCESS) {
- conf.channels_arg = cwt.channels;
- conf.sample_rate_arg = cwt.sample_rate;
- }
- idt.task.pre_select = initial_delay_pre_select;
- idt.task.private_data = &idt;
- idt.task.event_handler = idt_event_handler;
- sprintf(idt.task.status, "initial_delay");
- register_task(&idt.task);
-}
-
-static void stdin_event_handler(struct task *t)
-{
- unregister_task(t);
- if (t->ret != -E_STDIN_EOF)
- PARA_ERROR_LOG("%s\n", PARA_STRERROR(-t->ret));
- else
- PARA_INFO_LOG("%s\n", PARA_STRERROR(-t->ret));
+ 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);
+ exit(0);