- PARA_ERROR_LOG("task %p, ret: %d\n", t, t->ret);
- if (t->ret < 0) {
- PARA_ERROR_LOG("%s\n", PARA_STRERROR(-t->ret));
- if (t->ret != -E_NO_WAV_HEADER && t->ret != -E_PRE_EOF)
- exit(EXIT_FAILURE);
- if (t->ret == -E_PRE_EOF) {
- conf.channels_arg = cwt.channels;
- conf.sample_rate_arg = cwt.sample_rate;
- }
- }
- unregister_task(t);
- idt.task.pre_select = initial_delay_pre_select;
- idt.task.private_data = &idt;
- idt.task.error_handler = idt_error_handler;
- idt.task.flags = PRE_EOF_IS_ERROR;
- register_task(&idt.task);
-}
-
-static void stdin_error_handler(struct task *t)
-{
- unregister_task(t);
- PARA_INFO_LOG("task %p, ret: %d\n", t, t->ret);
- if (t->ret < 0)
- PARA_ERROR_LOG("%s\n", PARA_STRERROR(-t->ret));
- wng->eof = 1;
+ 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);