gbranden pushed a commit to branch master
in repository groff.
commit 12b1651b090367e77571f593fe19a5d7188c2dd7
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Jun 23 01:03:29 2025 -0500
[troff]: Revise diagnostic messages.
* src/roff/troff/input.cpp (composite_glyph_name)
(charinfo_to_node_list): Reform terminology in diagnostic messages.
Use the term "character" when dealing with input; it's up to the
output driver to elicit "glyphs" from a device.
(charinfo_to_node_list): Refer to "special", not "composite",
characters, when processing a user-defined character with a string
iterator.
Illustration of the former:
$ printf '.char \\[foo] \\[foo]\n\\[foo bar]\n' | ./build/test-groff -a
troff: backtrace: '<standard input>':2
troff: backtrace: file '<standard input>':2
troff:<standard input>:2: error: invalid base character 'foo' in composite
character name
<beginning of page>
The latter caused a confusing backtrace.
Before:
$ printf '.char \\[foo] \\[foo]\n\\[foo]\n' | groff -a
<beginning of page>
troff: backtrace: '<standard input>':1: composite character 'foo'
troff: backtrace: '<standard input>':2
troff: backtrace: file '<standard input>':2
troff:<standard input>:2: warning: special character 'foo' not defined
After:
$ printf '.char \\[foo] \\[foo]\n\\[foo]\n' | ./build/test-groff -a
<beginning of page>
troff: backtrace: '<standard input>':1: special character 'foo'
troff: backtrace: '<standard input>':2
troff: backtrace: file '<standard input>':2
troff:<standard input>:2: warning: special character 'foo' not defined
---
ChangeLog | 10 ++++++++++
src/roff/troff/input.cpp | 5 +++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d03a9879c..38b635254 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-06-23 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (composite_glyph_name)
+ (charinfo_to_node_list): Reform terminology in diagnostic
+ messages. Use the term "character" when dealing with input;
+ it's up to the output driver to elicit "glyphs" from a device.
+ (charinfo_to_node_list): Refer to "special", not "composite",
+ characters, when processing a user-defined character with a
+ string iterator.
+
2025-06-22 G. Branden Robinson <[email protected]>
* doc/groff.texi.in (Strings) <length>:
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 28fd5fe92..7d7ff16e8 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -4402,7 +4402,8 @@ static symbol composite_glyph_name(symbol nm)
if (0 /* nullptr */ == gn) {
gn = valid_unicode_code_sequence(nc);
if (0 /* nullptr */ == gn) {
- error("invalid base glyph '%1' in composite glyph name", nc);
+ error("invalid base character '%1' in composite character name",
+ nc);
return EMPTY_SYMBOL;
}
}
@@ -9692,7 +9693,7 @@ node *charinfo_to_node_list(charinfo *ci, const
environment *envp)
token old_tok = tok;
input_stack::add_boundary();
string_iterator *si =
- new string_iterator(*mac, "composite character", ci->nm);
+ new string_iterator(*mac, "special character", ci->nm);
input_stack::push(si);
// we don't use process_input_stack, because we don't want to recognise
// requests
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit