]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2351. [bug] convertxsl.pl generated very long lines. [RT #17906]
authorMark Andrews <marka@isc.org>
Wed, 2 Apr 2008 03:35:13 +0000 (03:35 +0000)
committerMark Andrews <marka@isc.org>
Wed, 2 Apr 2008 03:35:13 +0000 (03:35 +0000)
CHANGES
bin/named/convertxsl.pl

diff --git a/CHANGES b/CHANGES
index 470fc7825db5b52811ba1faeb25c6ff5a7358458..4311f15c39477b621bda6f20832df3387fd0d1a5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+2351.  [bug]           convertxsl.pl generated very long lines. [RT #17906]
+
 2350.  [port]          win32: IPv6 support. [RT #17797]
 
 2349.  [func]          Provide incremental re-signing support for secure
index b6ea4bd956277697b247d623b060abb667256eaf..605557dc7762f2fbc64efb49cbe8ca6dcd0ae34d 100755 (executable)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: convertxsl.pl,v 1.9 2007/09/14 06:14:44 marka Exp $
+# $Id: convertxsl.pl,v 1.10 2008/04/02 03:35:13 marka Exp $
 
 use strict;
 use warnings;
 
-my $rev = '$Id: convertxsl.pl,v 1.9 2007/09/14 06:14:44 marka Exp $';
+my $rev = '$Id: convertxsl.pl,v 1.10 2008/04/02 03:35:13 marka Exp $';
 $rev =~ s/\$//g;
 $rev =~ s/,v//g;
 $rev =~ s/Id: //;
@@ -34,7 +34,16 @@ while (<>) {
     $xsl = $_ if (/<!-- .Id:.* -->/);
     # convert Id string to a form not recognisable by cvs.
     $_ =~ s/<!-- .Id:(.*). -->/<!-- \\045Id: $1\\045 -->/;
-    $lines .= $_;
+    s/[\ \t]+/ /g;
+    s/\>\ \</\>\</g;
+    s/\"/\\\"/g;
+    s/^/\t\"/;
+    s/$/\\n\"/;
+    if ($lines eq "") {
+           $lines .= $_;
+    } else {
+           $lines .= "\n" . $_;
+    }
 }
 
 $xsl =~ s/\$//g;
@@ -42,12 +51,8 @@ $xsl =~ s/<!-- Id: //;
 $xsl =~ s/ -->.*//;
 $xsl =~ s/,v//;
 
-$lines =~ s/[\ \t]+/ /g;
-$lines =~ s/\>\ \</\>\</g;
-$lines =~ s/\"/\\\"/g;
-
 print "/*\n * Generated by $rev \n * From $xsl\n */\n";
-print 'static char msg[] = "';
+print 'static char msg[] =',"\n";
 print $lines;
 
-print '\\n";', "\n";
+print ';', "\n";