[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Richard Levitte levitte at openssl.org
Wed May 16 18:50:45 UTC 2018


The branch OpenSSL_1_1_0-stable has been updated
       via  0bde96f13837825fa899573728899744a956beff (commit)
      from  7171f71ef10eb079322bbe99332f411a14f03891 (commit)


- Log -----------------------------------------------------------------
commit 0bde96f13837825fa899573728899744a956beff
Author: Richard Levitte <levitte at openssl.org>
Date:   Wed May 16 11:12:21 2018 +0200

    When producing man-pages, ensure NAME section is one line only
    
    There are *roff parsers that are strict about the NAME section being
    one line only.  The man(7) on Debian GNU/Linux suggests that this is
    appropriate, so we compensate our multi-line NAME sections by fixing
    the *roff output.
    
    Noted by Eric S. Raymond
    
    Related to #6264
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/6268)
    
    (cherry picked from commit 8d483b2de78619e8592f2558301f3295daf59690)

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

Summary of changes:
 util/process_docs.pl | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/util/process_docs.pl b/util/process_docs.pl
index e084df7..0e46a0a 100755
--- a/util/process_docs.pl
+++ b/util/process_docs.pl
@@ -115,6 +115,32 @@ foreach my $subdir (keys %{$options{subdir}}) {
                 @output = `$generate`;
                 map { s|href="http://man\.he\.net/(man\d/[^"]+)(?:\.html)?"|href="../$1.html|g; } @output
                     if $options{type} eq "html";
+                if ($options{type} eq "man") {
+                    # Because some *roff parsers are more strict than others,
+                    # multiple lines in the NAME section must be merged into
+                    # one.
+                    my $in_name = 0;
+                    my $name_line = "";
+                    my @newoutput = ();
+                    foreach (@output) {
+                        if ($in_name) {
+                            if (/^\.SH "/) {
+                                $in_name = 0;
+                                push @newoutput, $name_line."\n";
+                            } else {
+                                chomp (my $x = $_);
+                                $name_line .= " " if $name_line;
+                                $name_line .= $x;
+                                next;
+                            }
+                        }
+                        if (/^\.SH +"NAME" *$/) {
+                            $in_name = 1;
+                        }
+                        push @newoutput, $_;
+                    }
+                    @output = @newoutput;
+                }
             }
             print STDERR "DEBUG: Done processing\n" if $options{debug};
 


More information about the openssl-commits mailing list