URL: <https://savannah.gnu.org/bugs/?67748>
Summary: [troff] `warnscale` request incompletely recovers
from invalid argument
Group: GNU roff
Submitter: gbranden
Submitted: Sun 30 Nov 2025 11:00:48 AM UTC
Category: Core
Severity: 3 - Normal
Item Group: Incorrect behaviour
Status: In Progress
Privacy: Public
Assigned to: gbranden
Open/Closed: Open
Discussion Lock: Unlocked
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sun 30 Nov 2025 11:00:48 AM UTC By: G. Branden Robinson <gbranden>
I suspect that this misbehavior has been overlooked since the feature was
implemented because no one ever tested the case where the warning scaling unit
was changed to something other than inches, then made invalid.
Exhibit:
$ cat EXPERIMENTS/exercise-warnscale.groff
.ll 5n
foobar
.br
.warnscale p
foobar
.br
.warnscale q
foobar
$ ~/groff-1.23.0/bin/groff -zww EXPERIMENTS/exercise-warnscale.groff
troff:EXPERIMENTS/exercise-warnscale.groff:2: warning [p 1, 0.0i]: cannot
adjust line
troff:EXPERIMENTS/exercise-warnscale.groff:5: warning [p 1, 24.0p]: cannot
adjust line
troff:EXPERIMENTS/exercise-warnscale.groff:7: warning: scaling unit 'q'
invalid; using 'i' instead
troff:EXPERIMENTS/exercise-warnscale.groff:8: warning [p 1, 48.0i]: cannot
adjust line
The last output line that warns is assuredly not 48 inches down an 11-inch
page.
The fix is a one-liner.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67748>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
