Follow-up Comment #1, bug #67990 (group groff):

Applying the following patch...


$ git diff --cached
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 944f9bcd9..1fe5b1631 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -3103,6 +3103,19 @@ const char *token::description()
     return "an escaped ':'";
   case TOKEN_EOF:
     return "end of input";
+  // troff generates the following token types internally; the input
+  // can't (directly), so seeing them described likely suggests a bug in
+  // the formatter.  We consequently don't attempt to make their
+  // descriptions intelligible to the novice.
+  case TOKEN_BEGIN_TRAP:
+    return "a \"begin trap\" token";
+  case TOKEN_END_TRAP:
+    return "an \"end trap\" token";
+  // TOKEN_NODE is handled above
+  case TOKEN_PAGE_EJECTOR:
+    return "a \"page ejector\" token";
+  case TOKEN_REQUEST:
+    return "a \"request\" token";
   default:
     assert(0 == "unhandled case of `type` (token)");
     return "an undescribed token";


...makes the reproducer more revealing.


$ echo "\X'pdf: xrev'"|./build/test-groff -Tpdf -ms -Z
x T pdf
x res 72000 1 1
x init
p1
troff:<standard input>:1: warning: a "begin trap" token is not encodable in
device-independent output ('asciify' might help)
troff:<standard input>:1: error: spurious end trap token detected!
V84000
H72000
x font 5 TR
f5
s10000
md
DFd
V84000
H72000
x X .
t.
wh5000
tpdf:
wh2500
txre
H110630
tv'
n12000 0
V756000
H540000
n12000 0
x trailer
V792000
x stop


Contrast with _groff_ 1.23.0 output.


$ echo "\X'pdf: xrev'"|~/groff-1.23.0/bin/groff -Tpdf -ms -Z
x T pdf
x res 72000 1 1
x init
p1
V84000
H72000
x font 5 TR
f5
s10000
V84000
H72000
md
DFd
x X pdf: xrev
n12000 0
V768000
H540000
n12000 0
x trailer
V792000
x stop


Suspicion of input stream point mismanagement...RISING!


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?67990>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to