Update of bug #64155 (project groff): Status: Ready for Merge => Fixed Open/Closed: Open => Closed Planned Release: None => 1.24.0 Summary: [PATCH] specifying -fZD on command line generates warnings => specifying -fZD on command line generates warnings
_______________________________________________________ Follow-up Comment #17: commit 39ffa368dc6a1de4c11cf3f4f5b8594d3c974173 Author: G. Branden Robinson <g.branden.robin...@gmail.com> Date: Thu May 25 05:35:25 2023 -0500 [troff]: Validate a font family before using it. * src/roff/troff/env.cpp (is_family_valid): New function checks for all text styles (R, I, B, BI) and returns true only if the given family supports them all. (family_change): Call `is_family_valid()` on given argument. If invalid, throw diagnostic and ignore `fam` request. * src/roff/troff/env.h (is_family_valid): Declare; make visible. * src/roff/troff/input.cpp (main): Call `is_family_valid()` on `-f` option argument. Its invalidity is a fatal error. Fixes <https://savannah.gnu.org/bugs/?64155>. Thanks to Dave Kemper for the report. Tested with: $ echo | ./build/test-groff -fZD -z troff: fatal error: 'ZD' is not a valid font family $ echo | ./build/test-groff -fH -z $ nl ./EXPERIMENTS/validate-family.groff 1 .tm .fam=\n[.fam] 2 .fam H 3 .tm .fam=\n[.fam] 4 .fam 5 .tm .fam=\n[.fam] 6 .fam ZD 7 .fam BOGUS 8 .tm .fam=\n[.fam] 9 .fam 10 .tm .fam=\n[.fam] $ ./build/test-groff ./EXPERIMENTS/validate-family.groff .fam=T .fam=H .fam=T troff:./EXPERIMENTS/validate-family.groff:6: error: 'ZD' is not a valid font family troff:./EXPERIMENTS/validate-family.groff:7: error: 'BOGUS' is not a valid font family .fam=T .fam=H _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64155> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/