diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-06-08 23:03:14 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-06-08 23:03:14 +0000 |
commit | 22cb270ca59add9f667c7f41820dfb138fe0bd2f (patch) | |
tree | 3eb875197020005d698eaa2729cc3076682d8a66 | |
parent | 299b8be2ecf3b4cfc4b804e02bc87f2ec8518330 (diff) | |
download | ffmpeg-22cb270ca59add9f667c7f41820dfb138fe0bd2f.tar.gz |
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.
Originally committed as revision 23543 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-x | doc/texi2pod.pl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl index d5ad4a6a37..07b724fa93 100755 --- a/doc/texi2pod.pl +++ b/doc/texi2pod.pl @@ -26,6 +26,7 @@ $output = 0; $skipping = 0; %sects = (); +@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 defined $fn && defined $tl; $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/; |