[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #66040] [troff] no longer warns about unrecognized .hcode input
From: |
G. Branden Robinson |
Subject: |
[bug #66040] [troff] no longer warns about unrecognized .hcode input |
Date: |
Mon, 29 Jul 2024 03:24:34 -0400 (EDT) |
Update of bug #66040 (group groff):
Status: None => Confirmed
Assigned to: None => gbranden
_______________________________________________________
Follow-up Comment #2:
Some "improvement"! :-O
0f49e6b5ee1ec575ed42e55be388009a16320516 is the first bad commit
commit 0f49e6b5ee1ec575ed42e55be388009a16320516
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Wed Nov 29 14:20:22 2023 -0600
[troff]: Improve `hcode` request validation.
* src/roff/troff/input.cpp (set_hyphenation_codes): Throw warning
diagnostic if no arguments supplied. Throw error diagnostic if there
are an odd number of arguments. Check second arguments of pairs for
nonsense.
Also:
* Annotate null pointers with `nullptr` comment to ease any future
transition to C++11, which defines it as a keyword.
* Reorder comparison to avoid inadvertent lvalue assignment.
Input:
$ nl hcode.groff
1 .hcode
2 .hcode \:
3 .hcode a
4 .hcode a\:
5 .hcode aA
Before:
$ groff -ww hcode.groff
troff:hcode.groff:2: error: expected ordinary or special character, got an
escaped ':'
troff:hcode.groff:3: error: hyphenation code must be ordinary character
troff:hcode.groff:4: error: hyphenation code must be ordinary character
After:
$ ./build/test-groff -ww hcode.groff
troff:hcode.groff:1: warning: hyphenation code configuration request
expects arguments
troff:hcode.groff:2: error: expected ordinary or special character, got an
escaped ':'
troff:hcode.groff:3: error: hyphenation codes must be specified in pairs
troff:hcode.groff:4: error: expected ordinary or special character, got an
escaped ':'
ChangeLog | 9 +++++++++
src/roff/troff/input.cpp | 19 ++++++++++++++++---
2 files changed, 25 insertions(+), 3 deletions(-)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66040>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
- [bug #66040] groff no longer warns about unrecognized .hcode input, Dave, 2024/07/29
- [bug #66040] [troff] no longer warns about unrecognized .hcode input, G. Branden Robinson, 2024/07/29
- [bug #66040] [troff] no longer warns about unrecognized .hcode input,
G. Branden Robinson <=
- [bug #66040] [troff] no longer warns about unrecognized .hcode input, Dave, 2024/07/29
- [bug #66040] [troff] no longer warns about unrecognized .hcode input, G. Branden Robinson, 2024/07/29
- [bug #66040] [troff] no longer warns about unrecognized .hcode input, Dave, 2024/07/30
- [bug #66040] [troff] no longer warns about unrecognized .hcode input, G. Branden Robinson, 2024/07/30
- [bug #66040] [troff] no longer warns about unrecognized .hcode input, G. Branden Robinson, 2024/07/30
- [bug #66040] [troff] no longer warns about unrecognized .hcode input, Dave, 2024/07/30
- [bug #66040] [troff] no longer warns about unrecognized .hcode input, G. Branden Robinson, 2024/07/30
- [bug #66040] [troff] no longer warns about unrecognized .hcode input, G. Branden Robinson, 2024/07/30
- [bug #66040] [troff] no longer warns about unrecognized .hcode input, Dave, 2024/07/30
- [bug #66040] [troff] no longer warns about unrecognized .hcode input, G. Branden Robinson, 2024/07/31