- t->error = 0;
- ret = btr_node_status(btrn, cwt->min_iqs, BTR_NT_INTERNAL);
- if (ret <= 0)
- goto out;
- if (cwt->state != CWS_NEED_HEADER)
- goto pushdown;
- btr_merge(btrn, cwt->min_iqs);
- sz = btr_next_buffer(btrn, (char **)&a);
- if (sz < cwt->min_iqs) /* file size less than WAV_HEADER_SIZE */
- goto pushdown;
- cwt->min_iqs = 0;
- /*
- * The default byte ordering assumed for WAVE data files is
- * little-endian. Files written using the big-endian byte ordering
- * scheme have the identifier RIFX instead of RIFF.
- */
- if (a[0] != 'R' || a[1] != 'I' || a[2] != 'F' ||
- (a[3] != 'F' && a[3] != 'X')) {
- PARA_NOTICE_LOG("wav header not found\n");
- cwt->state = CWS_NO_HEADER;
- sprintf(t->status, "check wav: no header");
- goto out;
- }
- PARA_INFO_LOG("found wav header\n");
- cwt->state = CWS_HAVE_HEADER;
- sprintf(t->status, "check wav: have header");
- cwt->channels = (unsigned) a[22];
- cwt->sample_rate = a[24] + (a[25] << 8) + (a[26] << 16) + (a[27] << 24);
- bps = a[34] + ((unsigned)a[35] << 8);
- if (bps != 8 && bps != 16) {
- PARA_WARNING_LOG("%u bps not supported, assuming 16\n", bps);
- bps = 16;
- }
- /*
- * 8-bit samples are stored as unsigned bytes, ranging from 0 to 255.
- * 16-bit samples are stored as 2's-complement signed integers, ranging
- * from -32768 to 32767.
- */
- if (bps == 8)
- cwt->sample_format = SF_U8;
+ if (OPT_GIVEN(DETAILED_HELP, lpr))
+ help = lls_long_help(CMD_PTR);
+ else if (OPT_GIVEN(HELP, lpr))
+ help = lls_short_help(CMD_PTR);