From: Paul Eggert Date: Thu, 12 Dec 2024 03:59:24 +0000 (-0800) Subject: maint: sync help2man to latest version X-Git-Tag: v9.6~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5e1dfa122ddf7144093b64864f9e3e2d579ef74;p=thirdparty%2Fcoreutils.git maint: sync help2man to latest version * man/help2man: sync changes from version 1.48.5 through 1.49.3. This doesn't materially change the generated man pages. --- diff --git a/man/help2man b/man/help2man index 581f69ddde..331feb02d5 100755 --- a/man/help2man +++ b/man/help2man @@ -2,7 +2,7 @@ # Generate a short man page from --help and --version output. # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, -# 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2020, 2021 Free Software +# 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2020, 2021, 2022 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -29,7 +29,7 @@ use Text::Tabs qw(expand); use POSIX qw(strftime setlocale LC_ALL); my $this_program = 'help2man'; -my $this_version = '1.48.5'; +my $this_version = '1.49.3'; sub _ { $_[0] } sub configure_locale @@ -54,7 +54,7 @@ my $version_info = enc_user sprintf _(<<'EOT'), $this_program, $this_version; GNU %s %s Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, -2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2020, 2021 Free Software +2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2020, 2021, 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -180,13 +180,13 @@ while (@opt_include) $key =~ s/^\s+//; $key =~ s/\s+$//; $hash = \%include; - # Handle explicit [section] + # Handle explicit [section]. if ($key =~ s/^([<>=])\s*//) { if ($1 eq '>') { $hash = \%append; } elsif ($1 eq '=') { $hash = \%replace; } } - # NAME/SYNOPSIS replace by default + # NAME/SYNOPSIS replace by default. elsif ($key eq _('NAME') or $key eq _('SYNOPSIS')) { $hash = \%replace; @@ -222,7 +222,7 @@ while (@opt_include) # revision info. unless ($key) { - # handle options + # Handle options. if (/^-/) { local @ARGV = shellwords $_; @@ -267,7 +267,7 @@ if (exists $ENV{SOURCE_DATE_EPOCH} and $ENV{SOURCE_DATE_EPOCH} =~ /^(\d+)$/) # the English version expands to the month as a word and the full year. It # is used on the footer of the generated manual pages. If in doubt, you may # just use %x as the value (which should be the full locale-specific date). -my $date = enc strftime _("%B %Y"), localtime $epoch_secs; +my $date = strftime _("%B %Y"), localtime $epoch_secs; my $program = program_basename $ARGV[0]; my $package = $program; my $version; @@ -342,15 +342,15 @@ for ($replace{_('NAME')} || ($include{_('NAME')} ||= '')) # Man pages traditionally have the page title in caps. my $PROGRAM = uc $program; -# Set default page head/footers +# Set default page head/footers. $source ||= "$package $version"; unless ($manual) { for ($section) { - if (/^(1[Mm]|8)/) { $manual = enc _('System Administration Utilities') } - elsif (/^6/) { $manual = enc _('Games') } - else { $manual = enc _('User Commands') } + if (/^(1[Mm]|8)/) { $manual = _('System Administration Utilities') } + elsif (/^6/) { $manual = _('Games') } + else { $manual = _('User Commands') } } } @@ -545,7 +545,7 @@ while (length) { $matched .= $& if %append_match; $content = ".HP\n\x84$1\n"; - $indent = 80; # not continued + $indent = 80; # not continued } # Indented paragraph with tag. @@ -691,7 +691,7 @@ while (my ($sect, $text) = each %replace) } # Output header. -print <