bugGNU roff - Bugs: bug #60589, andoc.tmac: mysterious page number...

 
 

bug #60589: andoc.tmac: mysterious page number 0a in batch rendering

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Wed 12 May 2021 07:56:11 AM UTC
   
 
Category:  Macro package - others/general Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 15 May 2021 05:09:02 AM UTC, comment #3: 

Root cause analysis: my paranoid, defensive programming style got me into trouble.  The semantics of the P and X registers (and only these) were such that they meant something different when undefined than if they were zero.

groff_mdoc(7) doesn't have use for several of the page rendering options groff_man(7) does.  In trying to prevent future mdoc development from adapting these string and register names for incompatible purposes (and making andoc.tmac's and therefore man(1)'s job much more difficult or impossible), I made our mdoc implementation assign these entities empty (string) and zero (register) values, as appropriate, if they were not already defined.

This had bad consequences when switching back and forth between man(7) and mdoc(7) pages.  When we got back to man from mdoc, P and X looked like they'd been set to zero by the user.

This had a visible impact only on the last page rendered (and probably only if that was a man(7) page) because a different bug with footer management meant that a stale an-page-string could be seen only there.

But I have a fix in the works for that, too, and sorting it out helped me understand this one.

Now, the only prohibition against adoption of those register and string names is a cautionary note in our groff_mdoc(7) page.


commit dcdd323bb7ec31ea044674c0a5da50406602276b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat May 15 14:40:37 2021 +1000

    groff_mdoc(7): Re-doc reservation of some names.

commit fba56bcf596b5ad012b5f3a829be7d1b48227bb1
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat May 15 14:34:39 2021 +1000

    Revert "[mdoc]: Reserve registers used by groff_man(7)."

    This reverts commit 8c25d2a1ed2f0046b355b640ed09626c01ac3b7d.

    The method I attempted to prevent future squatting on the page rendering
    option name space did not work, and caused problems with some batch man
    page rendering scenarios.

    Fixes <https://savannah.gnu.org/bugs/index.php?60589>.


G. Branden Robinson <gbranden>
Group administrator
Wed 12 May 2021 11:03:46 PM UTC, comment #2: 


comment #1:

> original submission:
> > I didn't fix bug #57916 as completely as I had hoped.
>
> That does not appear to be the bug you intended to cite.


Indeed not.  I meant bug #59106.

Thanks, Dave!

G. Branden Robinson <gbranden>
Group administrator
Wed 12 May 2021 08:39:46 PM UTC, comment #1: 

original submission:

> I didn't fix bug #57916 as completely as I had hoped.


That does not appear to be the bug you intended to cite.

Dave <barx>
Group Member
Wed 12 May 2021 07:56:11 AM UTC, original submission:  

Two weirdnesses have cropped up with batch man page processing using andoc.tmac.

One of my regression testing techniques turned it up.

Try the following after copying all of the build-generated groff man page sources into a directory.


../build/test-groff -dAD=l -rCHECKSTYLE=1 -Tutf8 -e -t -mandoc addftinfo.1 afmtodit.1 chem.1 ditroff.7 eqn.1 eqn2graph.1 gdiffmk.1 glilypond.1 gperl.1 gpinyin.1 grap2graph.1 grn.1 grodvi.1 groff.1 groff.7 groff_char.7 groff_diff.7 groff_filenames.5 groff_font.5 groff_hdtbl.7 groff_man.7 groff_man_style.7 groff_mdoc.7 groff_me.7 groff_mm.7 groff_mmse.7 groff_mom.7 groff_ms.7 groff_out.5 groff_rfc1345.7 groff_tmac.5 groff_trace.7 groff_www.7 grog.1 grohtml.1 grolbp.1 grolj4.1 gropdf.1 grops.1 grotty.1 gxditview.1 hpftodit.1 indxbib.1 lj4_font.5 lkbib.1 lookbib.1 mmroff.1 neqn.1 nroff.1 pdfmom.1 pdfroff.1 pfbtops.1 pic.1 pic2graph.1 preconv.1 refer.1 roff.7 soelim.1 tbl.1 tfmtodit.1 troff.1 xtotroff.1


At the end, the right-hand footer is mighty suspicious-looking.


groff 1.23.0.rc1.420-51256        7 May 2021                                0a


Since I did not define registers cR, P, or X, they are zero.  But presumably we should not be printing a page number at all if it is zero.

Also, we don't get any page footers before this last one, which I suspect means I didn't fix bug #57916 as completely as I had hoped.

But I'll file the REALLY weird bug separately.

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 barx (Posted a comment)
  • -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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-15 gbranden StatusNone Fixed
        Assigned toNone gbranden
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0

    Back to the top

    Powered by Savane 3.13-aa77.
    Corresponding source code