From 7a16ce2ccee1abad5914ec94305cd1ddcc133204 Mon Sep 17 00:00:00 2001 From: jsm28 Date: Wed, 14 Nov 2001 00:47:47 +0000 Subject: contrib: * texi2pod.pl: Handle @ifnottex, @iftex and @display. Handle @var in verbatim blocks specially. Handle @unnumbered, @unnumberedsec and @center. Allow [a-z] after @enumerate. Handle 0 and numbers greater than 9 in enumerations. gcc: * Makefile.in (POD2MAN): Don't include --section=1. (manext): Rename to man1ext. All users changed. (man7ext): New. (man7dir): New. (generated-manpages): Also depend on $(docdir)/gfdl.7, $(docdir)/gpl.7, and $(docdir)/fsf-funding.7. ($(docdir)/gcov.1, $(docdir)/cpp.1, $(docdir)/gcc.1): Include --section=1 in calls to $(POD2MAN). ($(docdir)/gfdl.7, $(docdir)/gpl.7, $(docdir)/fsf-funding.7): New. (maintainer-clean, install, uninstall): Handle the new man pages. ($(docdir)/cpp.info, cpp.dvi): Depend on fdl.texi. (installdirs): Create man7dir. * doc/cpp.texi: Include GFDL in this manual. In the man page, refer to gfdl(7) for the GFDL. Apply Front Cover and Back Cover texts to man page. Include gpl(7), gfdl(7) and fsf-funding(7) in the SEE ALSO man page section. * doc/gcov.texi: Apply GFDL to man page. Include gpl(7), gfdl(7) and fsf-funding(7) in the SEE ALSO man page section. * doc/invoke.texi: Apply GFDL to man page. Include gpl(7), gfdl(7) and fsf-funding(7) in the SEE ALSO man page section. * doc/include/fdl.texi, doc/include/funding.texi, doc/include/gpl.texi: Adjust for conversion by texi2pod.pl. * doc/.cvsignore: Add gfdl.7, gpl.7 and fsf-funding.7. gcc/cp: * Make-lang.in: Change all uses of $(manext) to $(man1ext). gcc/f: * Make-lang.in: Change all uses of $(manext) to $(man1ext). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46998 138bc75d-0d04-0410-961f-82ee72b054a4 --- contrib/ChangeLog | 7 +++++++ contrib/texi2pod.pl | 24 ++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) (limited to 'contrib') diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 802fb594670..c61d1e371fd 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,10 @@ +2001-11-14 Joseph S. Myers + + * texi2pod.pl: Handle @ifnottex, @iftex and @display. Handle @var + in verbatim blocks specially. Handle @unnumbered, @unnumberedsec + and @center. Allow [a-z] after @enumerate. Handle 0 and numbers + greater than 9 in enumerations. + 2001-11-07 Laurent Guerby * gcc_update (files_and_dependencies): Add Ada dependencies. diff --git a/contrib/texi2pod.pl b/contrib/texi2pod.pl index 7a930eed595..8c8b4f98593 100755 --- a/contrib/texi2pod.pl +++ b/contrib/texi2pod.pl @@ -71,6 +71,7 @@ while() |(?:end\s+)?group # @group .. @end group: ditto |page # @page: ditto |node # @node: useful only in .info file + |(?:end\s+)?ifnottex # @ifnottex .. @end ifnottex: use contents )\b/x and next; chomp; @@ -102,17 +103,17 @@ while() # Ignore @end foo, where foo is not an operation which may # cause us to skip, if we are presently skipping. my $ended = $1; - next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu)$/; + next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex)$/; die "\@end $ended without \@$ended at line $.\n" unless defined $endw; die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw; $endw = pop @endwstack; - if ($ended =~ /^(?:ifset|ifclear|ignore|menu)$/) { + if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) { $skipping = pop @skstack; next; - } elsif ($ended =~ /^(?:example|smallexample)$/) { + } elsif ($ended =~ /^(?:example|smallexample|display)$/) { $shift = ""; $_ = ""; # need a paragraph break } elsif ($ended =~ /^(?:itemize|enumerate|table)$/) { @@ -142,7 +143,7 @@ while() next; }; - /^\@(ignore|menu)\b/ and do { + /^\@(ignore|menu|iftex)\b/ and do { push @endwstack, $endw; push @skstack, $skipping; $endw = $1; @@ -171,6 +172,12 @@ while() s/\@\{/{/g; s/\@\}/}/g; s/\@\@/&at;/g; + + # Inside a verbatim block, handle @var specially. + if ($shift ne "") { + s/\@var\{([^\}]*)\}/<$1>/g; + } + # POD doesn't interpret E<> inside a verbatim block. if ($shift eq "") { s/) /^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and $defs{$1} = $2, next; /^\@clear\s+([a-zA-Z0-9_-]+)/ and delete $defs{$1}, next; - /^\@section\s+(.+)$/ and $_ = "\n=head2 $1\n"; + /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/ and $_ = "\n=head2 $1\n"; /^\@subsection\s+(.+)$/ and $_ = "\n=head3 $1\n"; # Block command handlers: @@ -196,7 +203,7 @@ while() $endw = "itemize"; }; - /^\@enumerate(?:\s+([A-Z0-9]+))?/ and do { + /^\@enumerate(?:\s+([a-zA-Z0-9]+))?/ and do { push @endwstack, $endw; push @icstack, $ic; if (defined $1) { @@ -220,7 +227,7 @@ while() $endw = "table"; }; - /^\@((?:small)?example)/ and do { + /^\@((?:small)?example|display)/ and do { push @endwstack, $endw; $endw = $1; $shift = "\t"; @@ -233,7 +240,8 @@ while() $_ = "\n=item $ic\<$1\>\n"; } else { $_ = "\n=item $ic\n"; - $ic =~ y/A-Ya-y1-8/B-Zb-z2-9/; + $ic =~ y/A-Ya-y/B-Zb-z/; + $ic =~ s/(\d+)/$1 + 1/eg; } }; -- cgit v1.2.1