[FFmpeg-devel] [PATCH 16/19] Make texi2pod.pl process @include texinfo directives wherever they are placed, and not only if inside @c man begin/end sections.

Stefano Sabatini stefano.sabatini-lala
Tue May 4 19:52:15 CEST 2010


---
 doc/texi2pod.pl |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl
index fc342a9..3614593 100755
--- a/doc/texi2pod.pl
+++ b/doc/texi2pod.pl
@@ -100,6 +100,18 @@ while(<$inf>) {
         next;
     };
 
+    /^\@include\s+(.+)$/ and do {
+        push @instack, $inf;
+        $inf = gensym();
+
+        # Try cwd and $ibase.
+        open($inf, "<" . $1)
+            or open($inf, "<" . $ibase . "/" . $1)
+                or die "cannot open $1 or $ibase/$1: $!\n";
+        printf "Including page $1\n";
+        next;
+    };
+
     # 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.
@@ -222,17 +234,6 @@ while(<$inf>) {
 
     # Single line command handlers.
 
-    /^\@include\s+(.+)$/ and do {
-        push @instack, $inf;
-        $inf = gensym();
-
-        # Try cwd and $ibase.
-        open($inf, "<" . $1)
-            or open($inf, "<" . $ibase . "/" . $1)
-                or die "cannot open $1 or $ibase/$1: $!\n";
-        next;
-    };
-
     /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/
         and $_ = "\n=head2 $1\n";
     /^\@subsection\s+(.+)$/
-- 
1.7.0




More information about the ffmpeg-devel mailing list