Update of bug #68137 (group groff):
Status: In Progress => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #3:
commit 1c4c9310d0656af448bbeb645f1888ce5b8713bf
Author: G. Branden Robinson <[email protected]>
Date: Tue Mar 10 07:18:52 2026 -0500
[troff]: Make `want_att_compat` global.
This is a prerequisite to fixing Savannah #68137.
* src/roff/troff/input.cpp: Drop its `static` storage class.
* src/roff/troff/token.h: Declare it with `extern` storage class.
commit 167abeb16cbcc0d4a2b8e39a905cea16d231b55d
Author: G. Branden Robinson <[email protected]>
Date: Tue Mar 10 07:21:48 2026 -0500
[troff]: Fix Savannah #68137.
* src/roff/troff/number.cpp (is_valid_expression): When interpreting a
parenthesized sub-expression within a numeric expression while in AT&T
compatibility mode, throw a warning in category "syntax" if
encountering a space in the input, advising of non-portability to that
family of formatters. GNU troff continues to interpret the expression
as it always has.
Fixes <https://savannah.gnu.org/bugs/?68137>.
Illustration:
$ printf '.nr a (1 + 1)\n.tm \\na\n' | ~/groff-1.22.3/bin/groff
2
$ printf '.nr a (1 + 1)\n.tm \\na\n' | ./build/test-groff
2
$ printf '.nr a (1 + 1)\n.tm \\na\n' | ./build/test-groff -C
troff:<standard input>:1: warning: a space within a numeric expression is
not portable to AT&T troff
2
$ printf '.nr a (1 + 1)\n.tm \\na\n' | dwb troff >/dev/null
1
$ printf '.nr a (1 + 1)\n.tm \\na\n' | 9 troff >/dev/null
1
$ printf '.nr a (1 + 1)\n.tm \\na\n' | heirloom troff >/dev/null
2
(Heirloom Doctools troff defaults to a groff compatibility mode. But
maybe not for much longer: <https://github.com/n-t-roff/\
heirloom-doctools/issues/87#issuecomment-496761804).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68137>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
