Update of bug #66040 (group groff): Status: Confirmed => In Progress
_______________________________________________________ Follow-up Comment #4: I have a fix. diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp index d0ef4a0f1..11d58e05b 100644 --- a/src/roff/troff/input.cpp +++ b/src/roff/troff/input.cpp @@ -7291,15 +7291,22 @@ static void set_hyphenation_codes() break; tok.next(); tok.skip(); - unsigned char c = tok.ch(); if (tok.is_newline() || tok.is_eof()) { error("hyphenation codes must be specified in pairs"); break; } charinfo *ci2 = tok.get_char(true /* required */); - // nonsense redux - if (0 /* nullptr */ == ci2) - break; + unsigned char c = tok.ch(); + if (0 == c) { + if (0 /* nullptr */ == ci2) + break; + if (0 == ci2->get_hyphenation_code()) { + error("second member of hyphenation code pair must be an" + " ordinary character, or a special character already" + " assigned a hyphenation code"); + break; + } + } // TODO: What if you want to unset a hyphenation code? Accept 0? if (csdigit(c)) { error("hyphenation code cannot be digit"); Longest diagnostic message EVAR, I know. Sorry not sorry? Our documentation ("A hyphenation code must be an ordinary character (not a special character escape sequence) other than a digit or a space.") is wrong and I'll be fixing that, too. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?66040> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature