bugGNU roff - Bugs: bug #54539, [PATCH] hdmisc.tmac-u: Avoid a...

 
 

bug #54539: [PATCH] hdmisc.tmac-u: Avoid a warning about a tab character in this source

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Sun 19 Aug 2018 08:39:33 PM UTC
   
 
Category:  Macro - others/general Severity:  2 - Minor
Item Group:  Warning/Suspicious behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 13 Dec 2021 06:28:07 AM UTC, comment #1: 

A couple comments on this patch:

  • Since it was posted, the file hdmisc.tmac-u was renamed to hdmisc.tmac.
  • The one line of code that this patch changes is now given two \" sequences, which is unnecessary and does not match the style of the *pop macro right above, where comments that must directly abut the code have only one \" followed by tabs to align the text of the comment.
  • As there are other uses of this idiom in the code, the three-line comment justifying it that this patch adds feels like overkill.


But the basic code change seems sound.  An alternate patch that implements it more minimally (and uses the current filename) is attached.

(file #52494)

Dave <barx>
Group Member
Sun 19 Aug 2018 08:39:33 PM UTC, original submission:  


From 6d2b89a6844382ea162795b93de7c86cfc9406ba Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Sun, 19 Aug 2018 20:29:06 +0000
Subject: [PATCH] hdmisc.tmac-u: Avoid a warning about a tab character in this
 source

  An example of the warnings:

../contrib/hdtbl/hdmisc.tmac-u:306: backtrace: macro 't*DI'
../contrib/hdtbl/hdtbl.tmac:477: backtrace: macro 'ETB'
../contrib/hdtbl/examples/common.roff:50: backtrace: macro 'H'
troff: ../contrib/hdtbl/examples/chess_board.roff:45: warning: tab character in unquoted macro argument

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 contrib/hdtbl/hdmisc.tmac-u | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/contrib/hdtbl/hdmisc.tmac-u b/contrib/hdtbl/hdmisc.tmac-u
index b001561f..ebbbddb3 100644
--- a/contrib/hdtbl/hdmisc.tmac-u
+++ b/contrib/hdtbl/hdmisc.tmac-u
@@ -303,7 +303,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 .de t*DI
 .  nr * \\n[.u]
 .  nf                \"        diversion is already formatted - output it unchanged
-.  \\$1                \"        output the diversion ...
+.\" Avoid getting a tab character added to the argument, otherwise
+.\" (with groff -ww):
+.\" troff: ... warning: tab character in unquoted macro argument
+.  \\$1\"        \"        output the diversion ...
 .  rm \\$1        \"        ... and remove it
 .  if \\n[*] \
 .    fi                \"        reactivate formatting
--
2.18.0


Bjarni Ingi Gislason <bjarniig>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #52494:  54539.patch added by barx (503B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by barx (Updated the item)
  • -email is unavailable- added by bgarrigues (Updated the item)
  • -email is unavailable- added by bjarniig (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-12-13 barx Attached File- Added 54539.patch, #52494
        Summary[PATCH] hdmisc.tmac-u: Avoid a warning about a tab character in this source [PATCH] hdmisc.tmac-u: Avoid a warning about a tab character in this source
    2018-11-26 bgarrigues Severity3 - Normal 2 - Minor
        Item GroupNone Warning/Suspicious behaviour

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code