[bug #42675] [troff] \} treated as macro argument
"G. Branden Robinson" <[email protected]> Sun, 7 Jun 2026 14:50:14 -0400 (EDT)
| Newsgroups | gmane.comp.printing.groff.bugs |
|---|---|
| Message-ID | <[email protected]> |
Follow-up Comment #16, bug #42675 (group groff):
[comment #15 comment #15:]
> Oops, I didn't read thoroughly enough: comment #8 used erroneous input and
> comment #10 has the corrected output, and it seems to have omitted Solaris 10
> (though which nroff was used for one of the examples is ambiguous).
Right. Back then I didn't have a copy of Solaris 10 _troff_ compiled for my
local host.
Interested folks can find [https://github.com/n-t-roff/Solaris10-ditroff
Solaris 10 _troff_ at GitHub].
However, in the spirit of information gathering, here's what happens on a real
Solaris 10 host.
$ uname -a
SunOS gcc-solaris10 5.10 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise
$ cat count-args.roff
.de CA
\\n(.$
..
.if n \{.CA\}
.if n \{.CA \}
.if n \{.CA foo\}
.if n \{.CA foo \}
.pl \n(nlu
$ nroff ./count-args.roff | gcat -s
1 1 1 2
So that's interesting. This makes Plan 9 _troff_ less of an outlier.
Maybe something in the guts of the formatter is sensitive to machine
endianness in a way that affects macro argument processing?
Or maybe Carsten Kunze fixed something when updating Solaris 10 troff to build
on modern systems?
Maybe the most that can be said in _groff_ documentation is that various
_troff_s count arguments differently when right-brace escape sequences are
involved.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?42675>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaiW9ZgAKCRCqLAuaBUf3 TrHqAP9igE4fuHt0D8txTmXXIXe3tClDcmfhomxfIhidjUiYBAD7BCPuQIBvyjcl l8EKYEhtO3Na798XvuxlrKzkvV9sDAc= =Fzbf -----END PGP SIGNATURE-----