Add a New Comment (Rich Markup)
FWIW, when this was brought up on the email list at the time (http://lists.gnu.org/archive/html/groff/2015-07/msg00012.html) it elicited no responses.
Does strictly enforcing the V7 Unix troff syntax offer any compatibility benefit? That is, are there correctly formed historical constructions that would be parsed incorrectly under groff as a result of this change? I ask because changing groff's behavior 30 years on (assuming this behavior dates to groff 1.0) also poses back-compatibility concerns for those authors (perhaps unwittingly) taking advantage of this undocumented syntactical relaxation. Maybe the right solution is to document this as a GNU extension to traditional troff syntax. As long as it breaks no valid historical documents, it seems a pretty clear-cut case of DWIM.
Confirmed. Output from V7 Unix nroff and Heirloom Doctools 191015 troff is as Carsten's example of correct output, with added newlines (maybe Savannah stripped them)?
$ pdp11 PDP-11 simulator V3.8-1 sim> set cpu 11/45 Disabling XQ sim> set tto 7b sim> att rl unix_v7_rl.dsk sim> boot rl @boot New Boot, known devices are hp ht rk rl rp tm vt : rl(0,0)rl2unix mem = 177856 # Restricted rights: Use, duplication, or disclosure is subject to restrictions stated in your contract with Western Electric Company, Inc. Thu Sep 22 05:50:28 EDT 1988 login: dmr $ cat > carsten.roff .pl 5 .de A . ie \\$1 . tm \\$1: true . el . tm \\$1: false .. .A 0 .A 1 $ nroff carsten.roff 0: true 0: false 1: true 1: false $
Specification: The conditionally processed commands or text need to follow ".if expr", ".ie expr", and ".el" separated by space on the same line (i.e. .ie <expr> <anything>). Wrong behaviour: If ".if expr", ".ie expr", or ".el" is followed by nothing on a line the next line is executed conditionally. This is not compliant with the specified syntax and leads to documents where this wrong syntax is not noticed (since it works). Example: .pl 5 .de A . ie \\$1 . tm \\$1: true . el . tm \\$1: false .. .A 0 .A 1 The output is 0: false 1: true whereas the expected (stderr) output would be 0: true 0: false 1: true 1: false Since the .ie and .el statements have a wrong syntax the following line needs to be processed unconditionally. Additionally a warning could be output for the lines with wrong syntax.
(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
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.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 3 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.11