pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp/doc get-commands.pl ChangeLog


From: Ben Pfaff
Subject: [Pspp-cvs] pspp/doc get-commands.pl ChangeLog
Date: Wed, 18 Jul 2007 03:17:04 +0000

CVSROOT:        /cvsroot/pspp
Module name:    pspp
Changes by:     Ben Pfaff <blp> 07/07/18 03:17:04

Modified files:
        doc            : get-commands.pl ChangeLog 

Log message:
        Use strict and all warnings.  Simplify parsing.  Add "@c End:" line to
        output to suppress Emacs warning.  From bug #19335.  Reviewed by John
        Darrington.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/doc/get-commands.pl?cvsroot=pspp&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/pspp/doc/ChangeLog?cvsroot=pspp&r1=1.46&r2=1.47

Patches:
Index: get-commands.pl
===================================================================
RCS file: /cvsroot/pspp/pspp/doc/get-commands.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- get-commands.pl     28 Nov 2006 09:39:37 -0000      1.2
+++ get-commands.pl     18 Jul 2007 03:17:03 -0000      1.3
@@ -1,32 +1,25 @@
 #!/usr/bin/perl
 # Creates Texinfo documentation from the source 
 
-$file = $ARGV[0]; 
+use strict;
+use warnings 'all';
+
+my ($file) = $ARGV[0]; 
 open(INFO, $file) || die "Cannot open \"$file\"\n" ;   
 print "address@hidden Generated from $file by get-commands.pl\n";
 print "address@hidden Do not modify!\n\n";
 
 print "address@hidden address@hidden";
-while ($line = <INFO>)
+while (<INFO>)
 {
-    if ( $line =~ /^UNIMPL_CMD/ ) 
-    {
-       @fields = split(/,/,$line); 
-       $_ = $fields[0];
-       s/^UNIMPL_CMD//;
-       s/ *\(\"// ;
-       s/\"//;
-       $command = $_;
-       $_=$fields[1];
-       s/^ *\"//;
-       s/\"\)//;
-       chomp;
-       $description = $_;
+    my ($command, $description)
+      = /^\s*UNIMPL_CMD\s*\(\s*"([^"]*)"\s*,\s*"([^"]*)"\)\s*$/
+       or next;
        print "address@hidden $command\n$description\n\n";
-    }
 }
 print "address@hidden table\n";
 
 print "address@hidden Local Variables:\n";
 print "address@hidden buffer-read-only: t\n";
+print "address@hidden End:\n";
 close(INFO);                   # Close the file

Index: ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/doc/ChangeLog,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- ChangeLog   6 Jun 2007 05:17:49 -0000       1.46
+++ ChangeLog   18 Jul 2007 03:17:04 -0000      1.47
@@ -1,3 +1,9 @@
+2007-07-17  Ben Pfaff  <address@hidden>
+
+       * get-commands.pl: Use strict and all warnings.  Simplify
+       parsing.  Add "@c End:" line to output to suppress Emacs warning.
+       From bug #19335.  Reviewed by John Darrington.
+
 2007-06-05  Ben Pfaff  <address@hidden>
 
        * Removed next, prev, up node names from @node lines, to make




reply via email to

[Prev in Thread] Current Thread [Next in Thread]