[FFmpeg-cvslog] r23543 - trunk/doc/texi2pod.pl
stefano
subversion
Wed Jun 9 01:03:14 CEST 2010
Author: stefano
Date: Wed Jun 9 01:03:14 2010
New Revision: 23543
Log:
Tweak texi2pod.pl to make it print the various sections in the
generated document following the same order as that used in the texi
file.
Also allow rendering of *all* the sections, not only a limited
predefined subset.
Modified:
trunk/doc/texi2pod.pl
Modified: trunk/doc/texi2pod.pl
==============================================================================
--- trunk/doc/texi2pod.pl Wed Jun 9 01:03:11 2010 (r23542)
+++ trunk/doc/texi2pod.pl Wed Jun 9 01:03:14 2010 (r23543)
@@ -26,6 +26,7 @@
$output = 0;
$skipping = 0;
%sects = ();
+ at sects_sequence = ();
$section = "";
@icstack = ();
@endwstack = ();
@@ -102,7 +103,7 @@ while(<$inf>) {
# Look for blocks surrounded by @c man begin SECTION ... @c man end.
# This really oughta be @ifman ... @end ifman and the like, but such
# would require rev'ing all other Texinfo translators.
- /^\@c\s+man\s+begin\s+([A-Za-z ]+)/ and $sect = $1, $output = 1, next;
+ /^\@c\s+man\s+begin\s+([A-Za-z ]+)/ and $sect = $1, push (@sects_sequence, $sect), $output = 1, next;
/^\@c\s+man\s+end/ and do {
$sects{$sect} = "" unless exists $sects{$sect};
$sects{$sect} .= postprocess($section);
@@ -298,8 +299,8 @@ die "No filename or title\n" unless defi
$sects{NAME} = "$fn \- $tl\n";
$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
-for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES ENVIRONMENT FILES
- BUGS NOTES FOOTNOTES SEEALSO AUTHORS COPYRIGHT)) {
+unshift @sects_sequence, "NAME";
+for $sect (@sects_sequence) {
if(exists $sects{$sect}) {
$head = $sect;
$head =~ s/SEEALSO/SEE ALSO/;
More information about the ffmpeg-cvslog
mailing list