qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 03/33] texi2pod: parse @include directives outside "@c man


From: Alex Bennée
Subject: Re: [PATCH v3 03/33] texi2pod: parse @include directives outside "@c man" blocks
Date: Mon, 02 Mar 2020 11:07:28 +0000
User-agent: mu4e 1.3.9; emacs 27.0.90

Peter Maydell <address@hidden> writes:

> From: Paolo Bonzini <address@hidden>
>
> This enables splitting the huge qemu-doc.texi file and keeping parallel
> Texinfo and rST versions of the documentation.  texi2pod is not going to
> live much longer and hardly anyone cares about its upstream status,
> so the temporary fork should be acceptable.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> Message-id: address@hidden
> Reviewed-by: Peter Maydell <address@hidden>
> Signed-off-by: Peter Maydell <address@hidden>

Reviewed-by: Alex Bennée <address@hidden>

> ---
>  scripts/texi2pod.pl | 36 ++++++++++++++++++------------------
>  1 file changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/scripts/texi2pod.pl b/scripts/texi2pod.pl
> index 839b7917cf7..8bfc6f6f4c4 100755
> --- a/scripts/texi2pod.pl
> +++ b/scripts/texi2pod.pl
> @@ -143,6 +143,24 @@ while(<$inf>) {
>       next;
>      };
>  
> +    # Single line command handlers.
> +
> +    /^\@include\s+(.+)$/ and do {
> +     push @instack, $inf;
> +     $inf = gensym();
> +     $file = postprocess($1);
> +
> +     # Try cwd and $ibase, then explicit -I paths.
> +     $done = 0;
> +     foreach $path ("", $ibase, @ipath) {
> +         $mypath = $file;
> +         $mypath = $path . "/" . $mypath if ($path ne "");
> +         open($inf, "<" . $mypath) and ($done = 1, last);
> +     }
> +     die "cannot find $file" if !$done;
> +     next;
> +    };
> +
>      next unless $output;
>  
>      # Discard comments.  (Can't do it above, because then we'd never see
> @@ -242,24 +260,6 @@ while(<$inf>) {
>       s/>/&GT;/g;
>      }
>  
> -    # Single line command handlers.
> -
> -    /^\@include\s+(.+)$/ and do {
> -     push @instack, $inf;
> -     $inf = gensym();
> -     $file = postprocess($1);
> -
> -     # Try cwd and $ibase, then explicit -I paths.
> -     $done = 0;
> -     foreach $path ("", $ibase, @ipath) {
> -         $mypath = $file;
> -         $mypath = $path . "/" . $mypath if ($path ne "");
> -         open($inf, "<" . $mypath) and ($done = 1, last);
> -     }
> -     die "cannot find $file" if !$done;
> -     next;
> -    };
> -
>      /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/
>       and $_ = "\n=head2 $1\n";
>      /^\@subsection\s+(.+)$/


-- 
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]