X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=doc%2Ftexi2pod.pl;h=9db6de1758c24f44e1e6a79d3c7a7fcc3d488968;hp=9c6d8cc27928a958afad368eadcc9f7ab364cfa2;hb=320cfdcb658e8d6556ae9dfd902c2db1db866a6b;hpb=53d0aff795316dc1a4b785632f0d4d93c861e9cb diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl index 9c6d8cc2..9db6de17 100755 --- a/doc/texi2pod.pl +++ b/doc/texi2pod.pl @@ -1,7 +1,7 @@ #! /usr/bin/env perl -# Copyright (C) 1999, 2000, 2001, 2003, 2007 Free Software -# Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2003, 2007, 2009, 2010, 2011 Free +# Software Foundation, Inc. # This file is part of GCC. @@ -23,6 +23,7 @@ # something suitable for a manpage from a Texinfo document. use warnings; +BEGIN { eval { require warnings; } and warnings->import; } $output = 0; $skipping = 0; @@ -231,7 +232,7 @@ while(<$inf>) { $file = postprocess($1); # Try cwd and $ibase. - open($inf, "<" . $file) + open($inf, "<" . $file) or open($inf, "<" . $ibase . "/" . $file) or die "cannot open $file or $ibase/$file: $!\n"; next; @@ -288,8 +289,13 @@ while(<$inf>) { /^\@itemx?\s*(.+)?$/ and do { if (defined $1) { - # Entity escapes prevent munging by the <> processing below. - $_ = "\n=item $ic\<$1\>\n"; + my $thing = $1; + if ($ic =~ /\@asis/) { + $_ = "\n=item C<$thing>\n"; + } else { + # Entity escapes prevent munging by the <> processing below. + $_ = "\n=item $ic\<$thing\>\n"; + } } else { $_ = "\n=item $ic\n"; $ic =~ y/A-Ya-y/B-Zb-z/; @@ -309,11 +315,12 @@ die "No filename or title\n" unless defined $fn && defined $tl; $sects{NAME} = "$fn \- $tl\n"; $sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES}; -for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES - BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) { +for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT EXITSTATUS + FILES BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) { if(exists $sects{$sect}) { $head = $sect; $head =~ s/SEEALSO/SEE ALSO/; + $head =~ s/EXITSTATUS/EXIT STATUS/; print "=head1 $head\n\n"; print scalar unmunge ($sects{$sect}); print "\n";