# HG changeset patch # User Matti Hamalainen # Date 1470838701 -10800 # Node ID 6687ac83bb48f66bc562615e6b37ca6c0a252edd # Parent 53bae7dd7abc666ce10d32ce3f4f6eab6f880938 Improve -s option handling and description. diff -r 53bae7dd7abc -r 6687ac83bb48 magestats.pl --- a/magestats.pl Wed Aug 10 01:37:49 2016 +0300 +++ b/magestats.pl Wed Aug 10 17:18:21 2016 +0300 @@ -74,7 +74,7 @@ -c Specify a cache file to restore from -p Output filename prefix ('$opt_prefix') -t Image format to be used ('$opt_imgfmt') - -s Graph dimensions in pixels ($opt_width x $opt_height) + -s x Graph dimensions in pixels ($opt_width x $opt_height) -n No input (only handle cache, if specified) -g Assume GgrTF mangled logfiles @@ -108,7 +108,7 @@ $opt_ignore = 1; } elsif ($opt eq "-s") { my $tmp = shift or die("-s option requires an argument.\n"); - if ($tmp =~ /^(\d+)[x:](\d+)$/) { + if ($tmp =~ /^(\d+)\s*[x:]\s*(\d+)$/) { $opt_width = $1; $opt_height = $2; } else {