URL: <https://savannah.gnu.org/bugs/?67935>
Summary: some macro packages pessimistic about major groff
changes
Group: GNU roff
Submitter: barx
Submitted: Mon 19 Jan 2026 03:43:30 PM CST
Category: Macro package - others/general
Severity: 3 - Normal
Item Group: Lint
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Unlocked
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Mon 19 Jan 2026 03:43:30 PM CST By: Dave <barx>
tmac/an.tmac, tmac/doc.tmac, and contrib/mom/om.tmac contain this test:
.if (\n[.x]\n[.y] < 118)
While the integer concatenation, which most languages would disallow, is
clever, this test will begin returning incorrect results upon release of groff
2.0.
At the risk of exhibiting the same lack of foresight that birthed the Y2K bug,
if we assume that no element of a groff version number will ever exceed three
digits, a safe replacement for this test would be:
.if ((\n[.x]*1000)+\n[.y] < 1018)
The inner set of parentheses is unnecessary, but the roff family's quirky
arithmetic precedence rules tend to make me overparenthesize all arithmetic
expressions for clarity.
(This came to my attention when the offending lines of an.tmac and doc.tmac
were mentioned in http://lists.gnu.org/r/groff/2026-01/msg00073.html)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67935>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
