changeset 349:6687ac83bb48 misc

Improve -s option handling and description.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 10 Aug 2016 17:18:21 +0300
parents 53bae7dd7abc
children 14b3b8dfc797
files magestats.pl
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 <cachefile>    Specify a cache file to restore from
  -p <prefix>       Output filename prefix ('$opt_prefix')
  -t <png|gif>      Image format to be used ('$opt_imgfmt')
- -s <WxH>          Graph dimensions in pixels ($opt_width x $opt_height)
+ -s <W>x<H>        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 {