From patchwork Tue Sep 17 03:21:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 34551 Received: (qmail 37942 invoked by alias); 17 Sep 2019 03:21:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 37929 invoked by uid 89); 17 Sep 2019 03:21:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_SOFTFAIL, TVD_SUBJ_NUM_OBFU_MINFP autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: barracuda.ebox.ca Received: from barracuda.ebox.ca (HELO barracuda.ebox.ca) (96.127.255.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Sep 2019 03:21:42 +0000 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id EHnQDfoKDf9vC2Tc (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 Sep 2019 23:21:40 -0400 (EDT) Received: from simark.lan (unknown [192.222.164.54]) by smtp.ebox.ca (Postfix) with ESMTP id 8D0CD441B21; Mon, 16 Sep 2019 23:21:40 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org, binutils@sourceware.org Cc: Simon Marchi Subject: [PATCH] texi2pod.pl: import support for @t{...} from gcc Date: Mon, 16 Sep 2019 23:21:37 -0400 Message-Id: <20190917032137.306625-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-IsSubscribed: yes 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;