texi2pod.pl: import support for @t{...} from gcc
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 15 Jan 2020 17:58:08 +0000 (12:58 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 15 Jan 2020 17:58:09 +0000 (12:58 -0500)
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/ChangeLog
etc/texi2pod.pl

index 78e9366e349a204ed3599f71b5d3ec99a1bca81a..8742e2afc15dee6806f7a0303cfcae976cd7a18d 100644 (file)
@@ -1,3 +1,7 @@
+2020-01-15  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * texi2pod.pl: Handle @t{...} tags.
+
 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
 
        * configure.in: Remove AC_PREREQ.
index b0540338c8eca4aa3c5580035bd5d4a486386640..8d92bcf6023bd26ec687e8ae6b29e390b52339e6 100644 (file)
@@ -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;
This page took 0.024812 seconds and 4 git commands to generate.