[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 16/45: [libdriver]: Update diagnostic messages.
From: |
G. Branden Robinson |
Subject: |
[groff] 16/45: [libdriver]: Update diagnostic messages. |
Date: |
Thu, 20 Jan 2022 10:17:50 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit e5e72144155b9fb66d398cf51711c5368729065e
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Jan 16 17:54:48 2022 +1100
[libdriver]: Update diagnostic messages.
* src/libs/libdriver/printer.cpp (printer::find_font): Describe the
problem encountered instead of saying lamely "sorry, I can't
continue".
(printer::set_char_and_width, printer::set_numbered_char):
Characterize input as "invalid", not "bad"; see commit bb7512b5, 17
September. When referring to font mounting position, say so.
(printer::set_char_and_width): Describe required input character as
"ordinary", not "ascii". Apart from the incorrect casing, doing so
better aligns with our terminology in groff_char(7), groff_out(5), our
Texinfo manual, and other diagnostic messages; moreover, the use of
"ascii" is potentially confusing to those whose environments use
another encoding, like UTF-8 or IBM code page 1047.
Fixes <https://savannah.gnu.org/bugs/?61829>.
---
ChangeLog | 20 ++++++++++++++++++++
src/libs/libdriver/printer.cpp | 12 ++++++------
2 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ef058fc6..eb3fc839 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2022-01-15 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [libdriver]: Update diagnostic messages.
+
+ * src/libs/libdriver/printer.cpp (printer::find_font): Describe
+ the problem encountered instead of saying lamely "sorry, I can't
+ continue".
+ (printer::set_char_and_width, printer::set_numbered_char):
+ Characterize input as "invalid", not "bad"; see commit bb7512b5,
+ 17 September. When referring to font mounting position, say so.
+ (printer::set_char_and_width): Describe required input character
+ as "ordinary", not "ascii". Apart from the incorrect casing,
+ doing so better aligns with our terminology in groff_char(7),
+ groff_out(5), our Texinfo manual, and other diagnostic messages;
+ moreover, the use of "ascii" is potentially confusing to those
+ whose environments use another encoding, like UTF-8 or IBM code
+ page 1047.
+
+ Fixes <https://savannah.gnu.org/bugs/?61829>.
+
2022-01-15 G. Branden Robinson <g.branden.robinson@gmail.com>
[grotty]: Check basic Latin ("ASCII") glyph mappings.
diff --git a/src/libs/libdriver/printer.cpp b/src/libs/libdriver/printer.cpp
index c7b48026..d7877eda 100644
--- a/src/libs/libdriver/printer.cpp
+++ b/src/libs/libdriver/printer.cpp
@@ -130,7 +130,7 @@ font *printer::find_font(const char *nm)
return p->p;
font *f = make_font(nm);
if (0 /* nullptr */ == f)
- fatal("sorry, I can't continue");
+ fatal("cannot find font '%1'", nm);
font_list = new font_pointer_list(f, font_list);
return f;
}
@@ -203,17 +203,17 @@ glyph *printer::set_char_and_width(const char *nm,
glyph *g = name_to_glyph(nm);
int fn = env->fontno;
if (fn < 0 || fn >= nfonts) {
- error("bad font position '%1'", fn);
+ error("invalid font position '%1'", fn);
return UNDEFINED_GLYPH;
}
*f = font_table[fn];
if (*f == 0) {
- error("no font mounted at '%1'", fn);
+ error("no font mounted at position %1", fn);
return UNDEFINED_GLYPH;
}
if (!(*f)->contains(g)) {
if (nm[0] != '\0' && nm[1] == '\0')
- error("font '%1' does not contain ascii character '%2'",
+ error("font '%1' does not contain ordinary character '%2'",
(*f)->get_name(), nm[0]);
else
error("font '%1' does not contain special character '%2'",
@@ -232,12 +232,12 @@ void printer::set_numbered_char(int num, const
environment *env, int
glyph *g = number_to_glyph(num);
int fn = env->fontno;
if (fn < 0 || fn >= nfonts) {
- error("bad font position '%1'", fn);
+ error("invalid font position '%1'", fn);
return;
}
font *f = font_table[fn];
if (f == 0) {
- error("no font mounted at '%1'", fn);
+ error("no font mounted at position %1", fn);
return;
}
if (!f->contains(g)) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 16/45: [libdriver]: Update diagnostic messages.,
G. Branden Robinson <=