* genini (get): Make sure that ldesc/sdesc strings are quoted with double
authorChristopher Faylor <me@cgf.cx>
Fri, 23 Feb 2007 15:31:04 +0000 (15:31 +0000)
committerChristopher Faylor <me@cgf.cx>
Fri, 23 Feb 2007 15:31:04 +0000 (15:31 +0000)
quotes.

ChangeLog
genini

index d4af33b579f81bb6a389d5944922053ce962d11c..9319e78836c597b241539aaffdc502c2e6f976fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
-2007-02-23   Servaas Goossens  <SGoossens@ortec.nl>
+2007-02-23  Christopher Faylor  <me@cgf.cx>
+            Servaas Goossens  <SGoossens@ortec.nl>
+
+       * genini (get): Make sure that ldesc/sdesc strings are quoted with double
+       quotes.
+
+2007-02-23  Servaas Goossens  <SGoossens@ortec.nl>
 
        * genini: Fix minor typo in warning.  Add new categories.  Don't output
        keys with empty values.
diff --git a/genini b/genini
index 22b42f9c57ede8f2b53894d7ee32ba03d3520ccf..fe0ad9be61cbd57bfa7d0ae45cdd832fac9955aa 100755 (executable)
--- a/genini
+++ b/genini
@@ -9,6 +9,8 @@ use File::Basename;
 use Digest::MD5;
 use Getopt::Long;
 
+use strict;
+
 sub mywarn(@);
 sub myerror(@);
 sub usage();
@@ -24,7 +26,7 @@ if (defined($outfile)) {
     open(STDOUT, '>', $outfile) or die "$0: can't open $outfile - $!\n";
 }
 
-local %pkg;
+my %pkg;
 
 for my $f (@ARGV) {
     if (-d $f) {
@@ -91,6 +93,9 @@ sub get {
            $val .= "\n" . $_;
        }
     } 
+    if (($key eq 'ldesc' || $key eq 'sdesc') and $val !~ /"/o) {
+       $pkg{$pname}{$what}{$key} = '"' . $val . '"';
+    }
     return $val;
 }
 
@@ -124,7 +129,7 @@ sub parse {
            my $key = $1;
            my $val = $2;
            if ($key !~ /^(?:prev|curr|test)/) {
-               $pkg{$pname}{$what}{$key} = get(F, $key, $val);
+               $pkg{$pname}{$what}{$key} = get(\*F, $key, $val);
            } else {
                if ($key eq 'curr') {
                    $key = '';
This page took 0.026114 seconds and 5 git commands to generate.