aboutsummaryrefslogtreecommitdiff
path: root/soxdial
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-04-09 15:59:15 -0400
committerB. Watson <urchlay@slackware.uk>2024-04-11 16:52:48 -0400
commit1056e7e4a02db9aa9e04e3124437785de57576cf (patch)
treee5729c2a7a32d7b35e14a55c5f14cb3c78e2ce97 /soxdial
parent92f1d2bf301ae3a4dab411d1fc3b8afff40b27bf (diff)
downloadsoxdial-1056e7e4a02db9aa9e04e3124437785de57576cf.tar.gz
soxdial: fix --output option, tighten up option processing in general.
Diffstat (limited to 'soxdial')
-rwxr-xr-xsoxdial16
1 files changed, 8 insertions, 8 deletions
diff --git a/soxdial b/soxdial
index d1e58f1..b5837ea 100755
--- a/soxdial
+++ b/soxdial
@@ -458,15 +458,15 @@ if(!@ARGV) {
# preprocess @ARGV, convert e.g. -b16 to -b 16, --foo=bar to --foo bar.
@newargv = ();
for(@ARGV) {
- if(/^(--?\w+)=(\S+)$/) {
+ if(/^(--?\w+)=(.+)$/) {
push @newargv, $1, $2;
- } elsif(/^(--?[blcdts])(\d+(?:ms)?)/i) {
+ } elsif(/^(--?[blcdts])([\d.]+(?:ms)?)$/i) {
push @newargv, $1, $2;
- } elsif(/^(--?[r])(\d+(?:k)?)/i) {
+ } elsif(/^(--?[r])(\d+(?:k)?)$/i) {
push @newargv, $1, $2;
- } elsif(/^(--?[D])(\w\w)/i) {
+ } elsif(/^(--?[D])(\w\w)$/i) {
push @newargv, $1, $2;
- } elsif(/^(--?o)(\S+)/) {
+ } elsif(/^(--?o)(.+)$/) {
if($2 eq 'utput') {
push @newargv, $_;
} else {
@@ -492,12 +492,12 @@ for ($argc = 0; $argc < @ARGV; $argc++) {
} elsif(/^--?(?:\?|h)/) {
exec "perldoc $0";
exit 1;
- } elsif(/^--?v(erbose)?$/) {
+ } elsif(/^--?v(?:erbose)?$/) {
$verbose = 1;
- } elsif(/^--?n(oexec)?$/) {
+ } elsif(/^--?n(?:oexec)?$/) {
$verbose = 1;
$noexec = 1;
- } elsif(/^--?o(?:output)?$/) {
+ } elsif(/^--?o(?:utput)?$/) {
$output = $ARGV[++$argc];
die "$SELF: missing argument for --output.\n" unless defined $output;
warn "$SELF: output set to '$output'\n" if $verbose;