From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 238633858018 for ; Wed, 10 Nov 2021 00:14:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 238633858018 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id BEC8C342F6C; Wed, 10 Nov 2021 00:14:48 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH 07/12] texi2pod.pl: import support for @t{...} from gcc Date: Tue, 9 Nov 2021 19:14:26 -0500 Message-Id: <20211110001431.2212-8-vapier@gentoo.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110001431.2212-1-vapier@gentoo.org> References: <20211110001431.2212-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2021 00:14:50 -0000 From: 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/ChangeLog | 4 ++++ etc/texi2pod.pl | 1 + 2 files changed, 5 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 78e9366e349a..8742e2afc15d 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2020-01-15 Simon Marchi + + * texi2pod.pl: Handle @t{...} tags. + 2018-06-19 Simon Marchi * configure.in: Remove AC_PREREQ. 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.33.0