public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] texi2pod.pl: import support for @t{...} from gcc
@ 2019-09-17  3:21 Simon Marchi
  2020-01-15 17:59 ` Simon Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Marchi @ 2019-09-17  3:21 UTC (permalink / raw)
  To: gdb-patches, binutils; +Cc: Simon Marchi

GDB's man page source (in gdb.texinfo) contains:

    @t{++}

The @t{...} part is supposed to display the wrapped text with a
fixed-width font.  The texi2pod.pl script currently doesn't handle
@t{...}, so it appears as-is in the man page:

    You can use GDB to debug programs written in C, C@t{++}, Fortran and Modula-2.

gcc's version of texi2pod.pl (at contrib/texi2pod.pl in gcc's repo)
replaces @t{...} with the wrapped text as-is, which I think is an
acceptable behavior.  The fixed-width font distinction is not really
important for a man page, where the text will be displayed with whatever
font the user is using.

Import the line that does that from gcc's version.

I have verified that there is no other, unwanted change in man pages
generated in binutils' and GDB's doc, with this patch applied.

etc/ChangeLog:

	* texi2pod.pl: Handle @t{...} tags.
---
 etc/texi2pod.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/etc/texi2pod.pl b/etc/texi2pod.pl
index b0540338c8ec..8d92bcf6023b 100644
--- a/etc/texi2pod.pl
+++ b/etc/texi2pod.pl
@@ -381,6 +381,7 @@ sub postprocess
     s/\@file\{([^\}]*)\}/F<$1>/g;
     s/\@w\{([^\}]*)\}/S<$1>/g;
     s/\@(?:dmn|math)\{([^\}]*)\}/$1/g;
+    s/\@t\{([^\}]*)\}/$1/g;
 
     # keep references of the form @ref{...}, print them bold
     s/\@(?:ref)\{([^\}]*)\}/B<$1>/g;
-- 
2.23.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] texi2pod.pl: import support for @t{...} from gcc
  2019-09-17  3:21 [PATCH] texi2pod.pl: import support for @t{...} from gcc Simon Marchi
@ 2020-01-15 17:59 ` Simon Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Marchi @ 2020-01-15 17:59 UTC (permalink / raw)
  To: gdb-patches, binutils

On 2019-09-16 11:21 p.m., Simon Marchi wrote:
> GDB's man page source (in gdb.texinfo) contains:
> 
>     @t{++}
> 
> The @t{...} part is supposed to display the wrapped text with a
> fixed-width font.  The texi2pod.pl script currently doesn't handle
> @t{...}, so it appears as-is in the man page:
> 
>     You can use GDB to debug programs written in C, C@t{++}, Fortran and Modula-2.
> 
> gcc's version of texi2pod.pl (at contrib/texi2pod.pl in gcc's repo)
> replaces @t{...} with the wrapped text as-is, which I think is an
> acceptable behavior.  The fixed-width font distinction is not really
> important for a man page, where the text will be displayed with whatever
> font the user is using.
> 
> Import the line that does that from gcc's version.
> 
> I have verified that there is no other, unwanted change in man pages
> generated in binutils' and GDB's doc, with this patch applied.
> 
> etc/ChangeLog:
> 
> 	* texi2pod.pl: Handle @t{...} tags.
> ---
>  etc/texi2pod.pl | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/etc/texi2pod.pl b/etc/texi2pod.pl
> index b0540338c8ec..8d92bcf6023b 100644
> --- a/etc/texi2pod.pl
> +++ b/etc/texi2pod.pl
> @@ -381,6 +381,7 @@ sub postprocess
>      s/\@file\{([^\}]*)\}/F<$1>/g;
>      s/\@w\{([^\}]*)\}/S<$1>/g;
>      s/\@(?:dmn|math)\{([^\}]*)\}/$1/g;
> +    s/\@t\{([^\}]*)\}/$1/g;
>  
>      # keep references of the form @ref{...}, print them bold
>      s/\@(?:ref)\{([^\}]*)\}/B<$1>/g;
> -- 
> 2.23.0
> 

I've pushed this patch.

Simon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-15 17:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-17  3:21 [PATCH] texi2pod.pl: import support for @t{...} from gcc Simon Marchi
2020-01-15 17:59 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).