chiark / gitweb /
with-lock-ex: Convert to MIT
[chiark-utils.git] / scripts / gnucap2genspic
index d7eed1ed9eb9744e1565fee3d3b588a190efd0c0..dc150a11c3dad5df8cb08e3c320155ede4ba9434 100755 (executable)
@@ -20,7 +20,7 @@
 # This program and its documentation are free software; you can
 # redistribute them and/or modify them under the terms of the GNU
 # General Public License as published by the Free Software Foundation;
-# either version 2, or (at your option) any later version.
+# either version 3, or (at your option) any later version.
 # 
 # This program and its documentation are distributed in the hope that
 # they will be useful, but WITHOUT ANY WARRANTY; without even the
@@ -28,8 +28,8 @@
 # PURPOSE.  See the GNU General Public License for more details.
 # 
 # You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# with this program; if not, consult the Free Software Foundation's
+# website at www.fsf.org, or the GNU Project website at www.gnu.org.
 
 die if @ARGV;
 
@@ -44,18 +44,18 @@ die if @ARGV;
               T 1e12);
 
 sub startplot () {
-    $logy2= 0;
+    $logxy= 0;
     for ($yn=1; $yn<=$#columns; $yn++) {
        $mmm[$yn]= 'y';
     }
     if ($kind eq 'Freq') {
-       $logy2= 1;
+       $logxy= 1;
        for ($yn=1; $yn<=$#columns; $yn++) {
            die unless $columns[$yn] =~ m/.*([MP])\(\d+\)$/i;
            $mmm[$yn]= 'y2' if uc $1 eq 'P';
        }
     }
-    printf "S %s %d", $cplot, $logy2 or die $!;
+    printf "S %s %d", $cplot, $logxy or die $!;
     for ($yn=1; $yn<=$#columns; $yn++) {
        printf " %s:%s", $mmm[$yn], $columns[$yn] or die $!;
     }
@@ -84,7 +84,7 @@ for (;;) {
        endplot();
        $kind= $1;
        @columns= split /\s+/;
-       $cplot= $kind.($counter{$kind}++);
+       $cplot= $kind;
        startplot();
        next;
     } elsif (!defined $kind) {
@@ -106,4 +106,4 @@ die "no plots" unless defined $kind;
 endplot();
 print "F\n" or die $!;
 
-# $Id: gnucap2genspic,v 1.1 2004-03-24 23:53:41 ianmdlvl Exp $
+# $Id: gnucap2genspic,v 1.4 2007-09-21 21:21:15 ianmdlvl Exp $