[feedgnuplot] 08/13: minor simplification

Dima Kogan dima at secretsauce.net
Sun Oct 16 03:55:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkogan-guest pushed a commit to branch debian
in repository feedgnuplot.

commit 167e85d2a7bf6f0aef7f88518c076f1511c372ad
Author: Dima Kogan <dima at secretsauce.net>
Date:   Sat Oct 15 20:17:08 2016 -0700

    minor simplification
    
    I delete the with option after I use it. This is defensive and clarifies the
    intent
---
 bin/feedgnuplot | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/bin/feedgnuplot b/bin/feedgnuplot
index 020707b..bbe2673 100755
--- a/bin/feedgnuplot
+++ b/bin/feedgnuplot
@@ -146,6 +146,17 @@ sub interpretCommandline
   push @{$options{curvestyle}}, @{$options{style}};
   delete $options{style};
 
+  if( $options{curvestyleall} && $options{with} )
+  {
+    print STDERR "--curvestyleall and --with are mutually exclusive. Please just use one.\n";
+    exit -1;
+  }
+  if( $options{with} )
+  {
+    $options{curvestyleall} = "with $options{with}";
+    delete $options{with};
+  }
+
   # --legend and --curvestyle options are conceptually hashes, but are parsed as
   # arrays in order to preserve the ordering. I parse both of these into hashes
   # because those are useful to have later. After this I can access individual
@@ -227,17 +238,6 @@ sub interpretCommandline
     }
   }
 
-  if( $options{curvestyleall} && $options{with} )
-  {
-    print STDERR "--curvestyleall and --with are mutually exclusive. Please just use one.\n";
-    exit -1;
-  }
-  if( $options{with} )
-  {
-    $options{curvestyleall} = "with $options{with}";
-    $options{with} = '';
-  }
-
   if ($options{colormap})
   {
     # colormap styles all curves with palette. Seems like there should be a way to do this with a

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/feedgnuplot.git



More information about the debian-science-commits mailing list