bugGNU troff - Bugs: bug #52983, [PATCH] troffrc: Define register...

 
 

bug #52983: [PATCH] troffrc: Define register 'F' to avoid warnings

Submitted by:  Bjarni Ingi Gislason <bjarniig>
Submitted on:  Sat 27 Jan 2018 12:25:51 AM UTC  
 
Category:  None Severity:  1 - Wish
Item Group:  New feature Status:  Wont Fix
Privacy:  Public Assigned to:  G. Branden Robinson <gbranden>
Open/Closed:  Closed Planned Release:  None

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 21 Oct 2020 08:25:49 AM UTC, comment #2: 

I agree with Ingo.  If people don't want undefined register or macro warnings, they need to check them before using them, guarantee that they're defined first, or shut the warnings off.

G. Branden Robinson <gbranden>
Project AdministratorIn charge of this item.
Fri 16 Feb 2018 11:30:36 PM UTC, comment #1: 

This should be rejected.  The purpose of the file troffrc is to provide a place for site-specific configurations, and it is already too long as it stands and should probably be cleaned up.  We certained shouldn't dump random code into it.

Besides, if you consider using an undefined register a bug, then that's a bug in pod2man(1), not in groff.  Pod::Man 4.07 actually generates code which, according to a comment in the generated code, intends to avoid the warning:

  .\" Avoid warning from groff about undefined register 'F'.
  .if !\nF .nr F 0

Arguably, it might be better for pod2man(1) to write

  .if !rF .nr F 0

instead, but i don't know whether that might be less portable.  Anyway, that's not for groff to decide.

Ingo Schwarze <schwarze>
Project Member
Sat 27 Jan 2018 12:25:51 AM UTC, original submission:  

From 513f830b2efb94e16bf9c7501f4a5c949f2d076d Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Sat, 27 Jan 2018 00:20:05 +0000
Subject: [PATCH] troffrc: Define register 'F' to avoid warnings

  It is used in the prologue of man pages created by "pod2man" (file
"Man.pm").

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
tmac/troffrc | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/tmac/troffrc b/tmac/troffrc
index 8f8e1832..07bf7f01 100644
--- a/tmac/troffrc
+++ b/tmac/troffrc
@@ -58,6 +58,13 @@ hyphenation of the words used to generate it.
.do mso pspic.tmac
.do mso pdfpic.tmac
.
+.ig
+  Avoid warnings if the register F is undefined.
+  It is used in the prologue of man pages created by "pod2man" (file
+"Man.pm").
+..
+.if !rF .nr F 0
+.
.\" ====================================================================
.\" Editor settings
.\" ====================================================================
--
2.11.0

Bjarni Ingi Gislason <bjarniig>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by bgarrigues (Updated the item)
  • -email is unavailable- added by schwarze (Posted a comment)
  • -email is unavailable- added by bjarniig (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-10-21 gbranden Severity2 - Minor => 1 - Wish
        Item GroupWarning/Suspicious behaviour => New feature
        StatusNone => Wont Fix
        Assigned toNone => gbranden
        Open/ClosedOpen => Closed
    2018-11-26 bgarrigues Severity3 - Normal => 2 - Minor
        Item GroupNew feature => Warning/Suspicious behaviour

    Back to the top


    Powered by Savane 3.5