bugGNU roff - Bugs: bug #62773, [man] warn if `TH` macro not called

 
 

bug #62773: [man] warn if `TH` macro not called

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Sat 16 Jul 2022 10:38:30 AM UTC
   
 
Category:  Macro man Severity:  1 - Wish
Item Group:  Warning/Suspicious behaviour Status:  Invalid
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 23 Aug 2022 09:40:08 PM UTC, comment #1: 


original submission:

> ...and try to degrade gracefully.
>
> groff 1.22.4 trucked along just fine if `TH` was omitted, even though this is expressly out of spec.


Turns out this was a filthy lie.  I forgot that an.tmac in groff 1.22.4 was a wrapper for andoc.tmac.

Here's what REALLY happens.


$ groff -ww -Tutf8 -man-old ./EXPERIMENTS/no-TH.man
troff: ./EXPERIMENTS/no-TH.man:1: warning: number register 'PD' not defined
troff: ./EXPERIMENTS/no-TH.man:1: warning: number register 'PS' not defined
troff: ./EXPERIMENTS/no-TH.man:1: warning: number register 'VS' not defined
troff: ./EXPERIMENTS/no-TH.man:1: warning: number register 'an-margin' not defined
troff: ./EXPERIMENTS/no-TH.man:1: warning: number register 'IN' not defined
troff: ./EXPERIMENTS/no-TH.man:3: warning: number register 'PS-SH' not defined
troff: ./EXPERIMENTS/no-TH.man:3: warning: number register 'an-div?' not defined
troff: warning: macro 'an-title' not defined
troff: warning: macro 'an-section' not defined
Bar.ription                                                                 ()


So this is no regression and not a big deal for 1.23.0.  However, we might look into clearing an-extra[123] in the end-of-input trap.  See bug #62447 for a similar mdoc issue.

G. Branden Robinson <gbranden>
Group administrator
Sat 16 Jul 2022 10:38:30 AM UTC, original submission:  

...and try to degrade gracefully.

groff 1.22.4 trucked along just fine if `TH` was omitted, even though this is expressly out of spec.


$ cat EXPERIMENTS/no-TH.man
.P
Foo.
.SH Description
Bar.
$ groff -Tutf8 -man EXPERIMENTS/no-TH.man | cat -s
troff: EXPERIMENTS/no-TH.man:1: warning: macro 'P' not defined
troff: EXPERIMENTS/no-TH.man:3: warning: macro 'SH' not defined
Foo.  Bar.

$ ./build/test-groff -ww -Tutf8 -mandoc EXPERIMENTS/no-TH.man | cat -s
troff:EXPERIMENTS/no-TH.man:1: warning: macro 'P' not defined
troff:EXPERIMENTS/no-TH.man:3: warning: macro 'SH' not defined
Foo.  Bar.

$ ./build/test-groff -ww -Tutf8 -man EXPERIMENTS/no-TH.man | cat -s
troff:EXPERIMENTS/no-TH.man:1: warning: register 'PS' not defined
troff:EXPERIMENTS/no-TH.man:1: warning: register 'VS' not defined
troff:EXPERIMENTS/no-TH.man:1: warning: register 'PD' not defined
troff:EXPERIMENTS/no-TH.man:1: warning: register 'an-margin' not defined
troff:EXPERIMENTS/no-TH.man:3: warning: register 'PS-SH' not defined
troff:EXPERIMENTS/no-TH.man:3: warning: register 'an-is-in-diversion' not defined
grotty:<standard input>:10: error: output above first line discarded
grotty:<standard input>:11: error: output above first line discarded
grotty:<standard input>:12: error: output above first line discarded
grotty:<standard input>:12: error: output above first line discarded
grotty:<standard input>:12: error: output above first line discarded
grotty:<standard input>:12: error: output above first line discarded
grotty:<standard input>:21: error: output above first line discarded
grotty:<standard input>:21: error: output above first line discarded
grotty:<standard input>:21: error: output above first line discarded
grotty:<standard input>:21: error: output above first line discarded
grotty:<standard input>:21: error: output above first line discarded
grotty:<standard input>:21: error: output above first line discarded
grotty:<standard input>:21: error: output above first line discarded
grotty:<standard input>:21: error: output above first line discarded
grotty:<standard input>:21: error: output above first line discarded
grotty:<standard input>:21: error: output above first line discarded
grotty:<standard input>:21: error: output above first line discarded
grotty:<standard input>:30: error: output above first line discarded
grotty:<standard input>:30: error: output above first line discarded
grotty:<standard input>:30: error: output above first line discarded
grotty:<standard input>:30: error: output above first line discarded


G. Branden Robinson <gbranden>
Group administrator

 

(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 (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-08-23 gbranden StatusNone Invalid
        Assigned toNone gbranden
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code