[openssl-commits] [web] master update

Rich Salz rsalz at openssl.org
Fri Aug 21 19:07:25 UTC 2015


The branch master has been updated
       via  cd8935dc250abcc389ce1228fd73020346022392 (commit)
      from  24f4b18875a9bb7d5761947cccd2256b866a1600 (commit)


- Log -----------------------------------------------------------------
commit cd8935dc250abcc389ce1228fd73020346022392
Author: Rich Salz <rsalz at akamai.com>
Date:   Fri Aug 21 15:07:22 2015 -0400

    simplify

-----------------------------------------------------------------------

Summary of changes:
 bin/mk-changelog | 50 ++++++++++++++++++--------------------------------
 1 file changed, 18 insertions(+), 32 deletions(-)

diff --git a/bin/mk-changelog b/bin/mk-changelog
index 60135c9..18902d5 100755
--- a/bin/mk-changelog
+++ b/bin/mk-changelog
@@ -1,48 +1,34 @@
 #! /usr/bin/perl -w
 use strict;
 
-# Read whole input.
-my $page;
-{
-    local $/;
-    $page .= <STDIN>;
-}
-
-# HTML entities.
-$page =~ s|&|&|sg;
-$page =~ s|<|<|sg;
-$page =~ s|>|>|sg;
-
-# Make sub-headings.
-$page =~ s|^.+?(Changes.+?\n+)|$1|s;
-$page =~ s|(Changes between.+?)\n|</pre>\n<h3>$1</h3>\n<pre>\n|sg;
-
-# Wrap it, and remove empty <pre></pre>
-$page = '<pre>' . $page . '</pre>';
-$page =~ s|<pre></pre>||g;
-
-# Make a TOC
 my $ctr = 0;
 my $toc;
 my $out;
 my $top = '  <a href="#toc"><img src="/img/up.gif"/></a>';
-for (split /^/, $page) {
-    if ( /<h3>/ ) {
-	my $name = $_;
-	$name =~ s|<h3>(.*)</h3>|$1|;
-	chop ($name);
-	$out .= '<h3><a name="x' . $ctr . '">' . $name . "</a>$top</h3>\n";
-	$toc .= '<li><a href="#x' . $ctr . '">' . $name . "</a></li>\n";
+my $skipping = 1;
+
+while ( <STDIN> ) {
+    chop;
+    # HTML entities.
+    s|&|&|sg;
+    s|<|<|sg;
+    s|>|>|sg;
+    if ( /^( Changes between.*)/ ) {
+        $out .= "</pre>\n" unless $skipping;
+        $skipping = 0;
+	$out .= "<h3><a name=\"x$ctr\">$1</a>$top</h3>\n<pre>\n";
+	$toc .= "  <li><a href=\"#x$ctr\">$1</a></li>\n";
 	$ctr++;
-    } else {
-	$out .= $_;
+    } elsif ( ! $skipping ) {
+        $out .= $_ . "\n";
     }
 }
+$out .= "</pre>\n";
 
 print "<h3><a name='toc'>Table of contents</a></h3>\n";
-print "<ul>";
+print "<ul>\n";
 print $toc;
-print "</ul>";
+print "</ul>\n";
 print $out;
 
 exit(0);


More information about the openssl-commits mailing list