summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-11-06 17:38:07 +0000
committerJim Meyering <jim@meyering.net>2000-11-06 17:38:07 +0000
commit17d7e0206dc909cec282fc4d2bf673a325bcfc5c (patch)
treecb9c1f0b0ef1daf6617bad03278bd28bb34b0122 /man
parentc968981077106ad97feecb825561841486efe915 (diff)
downloadcoreutils-17d7e0206dc909cec282fc4d2bf673a325bcfc5c.tar.xz
Update from latest version: 1.23.
Diffstat (limited to 'man')
-rwxr-xr-xman/help2man30
1 files changed, 17 insertions, 13 deletions
diff --git a/man/help2man b/man/help2man
index 2c8164789..d6f7a6567 100755
--- a/man/help2man
+++ b/man/help2man
@@ -27,7 +27,7 @@ use Text::Tabs qw(expand);
use POSIX qw(strftime setlocale LC_TIME);
my $this_program = 'help2man';
-my $this_version = '1.022';
+my $this_version = '1.23';
my $version_info = <<EOT;
GNU $this_program $this_version
@@ -269,9 +269,11 @@ s/^\n+//;
s/\n*$/\n/;
s/\n\n+/\n\n/g;
-# Temporarily exchange leading dots and backslashes for tokens.
+# Temporarily exchange leading dots, apostrophes and backslashes for
+# tokens.
s/^\./\x80/mg;
-s/\\/\x81/g;
+s/^'/\x81/mg;
+s/\\/\x82/g;
# Start a new paragraph (if required) for these.
s/([^\n])\n(Report +bugs|Email +bug +reports +to|Written +by)/$1\n\n$2/g;
@@ -366,7 +368,7 @@ while (length)
{
$matched .= $& if %append;
$indent = length ($4 || "$1$3");
- $content = ".TP\n\x82$2\n\x82$5\n";
+ $content = ".TP\n\x83$2\n\x83$5\n";
unless ($4)
{
# Indent may be different on second line.
@@ -378,7 +380,7 @@ while (length)
elsif (s/^ {1,10}([+-]\S.*)\n//)
{
$matched .= $& if %append;
- $content = ".HP\n\x82$1\n";
+ $content = ".HP\n\x83$1\n";
$indent = 80; # not continued
}
@@ -387,7 +389,7 @@ while (length)
{
$matched .= $& if %append;
$indent = length $1;
- $content = ".TP\n\x82$2\n\x82$3\n";
+ $content = ".TP\n\x83$2\n\x83$3\n";
}
# Indented paragraph.
@@ -395,7 +397,7 @@ while (length)
{
$matched .= $& if %append;
$indent = length $1;
- $content = ".IP\n\x82$2\n";
+ $content = ".IP\n\x83$2\n";
}
# Left justified paragraph.
@@ -411,7 +413,7 @@ while (length)
while (s/^ {$indent}(\S.*)\n//)
{
$matched .= $& if %append;
- $content .= "\x82$1\n"
+ $content .= "\x83$1\n"
}
# Move to next paragraph.
@@ -419,9 +421,10 @@ while (length)
for ($content)
{
- # Leading dot protection.
- s/\x82\./\x80/g;
- s/\x82//g;
+ # Leading dot and apostrophe protection.
+ s/\x83\./\x80/g;
+ s/\x83'/\x81/g;
+ s/\x83//g;
# Convert options.
s/(^| )(-[][\w=-]+)/$1 . convert_option $2/mge;
@@ -485,9 +488,10 @@ for (@pre, (grep ! /^($filter)$/o, @include), @post)
for ($include{$_})
{
- # Replace leading dot an backslash tokens.
+ # Replace leading dot, apostrophe and backslash tokens.
s/\x80/\\&./g;
- s/\x81/\\e/g;
+ s/\x81/\\&'/g;
+ s/\x82/\\e/g;
print;
}
}