Update of bug #66932 (group groff): Status: Confirmed => In Progress
_______________________________________________________ Follow-up Comment #4: Okay, this seems to be straightforward. It's all to do with the fact that we can overset lines when the input doesn't permit a breakpoint, compounded by the fact that we don't apply shrinking/squeezing to adjustable spaces (bug #44018). The compounding fact is not fundamental; a user's output line need not **have** any adjustable spaces, as can happen with perverse inputs (unhyphenable character sequences and/or short line lengths) and more commonly when adjustment is explicitly disabled. I have a patch ready to go that removes this assertion and improves our diagnostics. $ printf '.ll 2n\n\\~AB\n' | ./build/test-groff -a <beginning of page> troff: warning [page 1, 0.0i]: cannot break line troff: warning [page 1, 0.0i]: cannot adjust line; overset by 6390 units AB $ printf '.ll 2n\n\\~AB\n' | ./build/test-groff -a -T ascii <beginning of page> troff: warning [page 1, line 1]: cannot break line troff: warning [page 1, line 1]: cannot adjust line; overset by 24 units AB $ printf '.ll 2n\nABC\n' | ./build/test-groff -a <beginning of page> troff:<standard input>:2: warning [page 1, 0.0i]: cannot break line ABC I played with trying to coalesce these 2 warnings into one. That did not fly for very long. 1. They are thrown at different points in the code--different functions, even. I think right now that if adjustment is disabled `distribute_space()` is never even called. But that's the only function that knows the magnitude of overset, or how many adjustable spaces (`nspaces`) are on the output line. 2. They are logically distinct operations, as noted and illustrated above. In the final example, no adjustment can take place because no adjustable spaces exist. 3. I settled for annotating the places in the code that I can see will be involved in a future resolution of bug #44018. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?66932> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature