[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 09/15: [troff,grohtml,grops,grotty]: Update diag msgs.
From: |
G. Branden Robinson |
Subject: |
[groff] 09/15: [troff,grohtml,grops,grotty]: Update diag msgs. |
Date: |
Mon, 6 Jun 2022 22:26:13 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 064dc02403e9245d3b25bdf8bfab9e1d52db0140
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Jun 4 21:22:03 2022 -0500
[troff,grohtml,grops,grotty]: Update diag msgs.
[troff, grohtml, grops, grotty]: Update wording of diagnostic messages
to refer to "motion quantum" rather than "resolution" where appropriate.
* src/devices/grohtml/post-html.cpp (html_printer::html_printer):
* src/devices/grops/ps.cpp (ps_printer::ps_printer):
* src/devices/grotty/tty.cpp (tty_printer::set_char,
tty_printer::add_char, tty_printer::end_page):
* src/roff/troff/env.cpp (line_length, title_length): Do it.
---
ChangeLog | 13 +++++++++++++
src/devices/grohtml/post-html.cpp | 4 ++--
src/devices/grops/ps.cpp | 9 ++++++---
src/devices/grotty/tty.cpp | 10 ++++++----
src/roff/troff/env.cpp | 4 ++--
5 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c467f5d1..c8320535 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2022-06-04 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [troff, grohtml, grops, grotty]: Update wording of diagnostic
+ messages to refer to "motion quantum" rather than "resolution"
+ where appropriate.
+
+ * src/devices/grohtml/post-html.cpp
+ (html_printer::html_printer):
+ * src/devices/grops/ps.cpp (ps_printer::ps_printer):
+ * src/devices/grotty/tty.cpp (tty_printer::set_char,
+ tty_printer::add_char, tty_printer::end_page):
+ * src/roff/troff/env.cpp (line_length, title_length): Do it.
+
2022-06-04 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/devices/gropdf/gropdf.pl: Do more "DESC" file validation.
diff --git a/src/devices/grohtml/post-html.cpp
b/src/devices/grohtml/post-html.cpp
index 69fb0595..ba6f7e0a 100644
--- a/src/devices/grohtml/post-html.cpp
+++ b/src/devices/grohtml/post-html.cpp
@@ -4371,9 +4371,9 @@ html_printer::html_printer()
file_list.add_new_file(xtmpfile());
html.set_file(file_list.get_file());
if (font::hor != 24)
- fatal("horizontal resolution must be 24");
+ fatal("horizontal motion quantum must be 24");
if (font::vert != 40)
- fatal("vertical resolution must be 40");
+ fatal("vertical motion quantum must be 40");
#if 0
// should be sorted html..
if (font::res % (font::sizescale*72) != 0)
diff --git a/src/devices/grops/ps.cpp b/src/devices/grops/ps.cpp
index 14224772..b891169e 100644
--- a/src/devices/grops/ps.cpp
+++ b/src/devices/grops/ps.cpp
@@ -615,11 +615,14 @@ ps_printer::ps_printer(double pl)
if (linewidth < 0)
linewidth = DEFAULT_LINEWIDTH;
if (font::hor != 1)
- fatal("horizontal resolution must be 1");
+ fatal("device horizontal motion quantum must be 1, got %1",
+ font::hor);
if (font::vert != 1)
- fatal("vertical resolution must be 1");
+ fatal("device vertical motion quantum must be 1, got %1",
+ font::vert);
if (font::res % (font::sizescale*72) != 0)
- fatal("res must be a multiple of 72*sizescale");
+ fatal("device resolution must be a multiple of 72*'sizescale', got"
+ " %1 ('sizescale'=%2)", font::res, font::sizescale);
int r = font::res;
int point = 0;
while (r % 10 == 0) {
diff --git a/src/devices/grotty/tty.cpp b/src/devices/grotty/tty.cpp
index 32cdffa1..ea2f094b 100644
--- a/src/devices/grotty/tty.cpp
+++ b/src/devices/grotty/tty.cpp
@@ -341,7 +341,7 @@ void tty_printer::set_char(glyph *g, font *f, const
environment *env,
int w, const char *)
{
if (w % font::hor != 0)
- fatal("width of character not a multiple of horizontal resolution");
+ fatal("glyph width is not a multiple of horizontal motion quantum");
add_char(f->get_code(g), w,
env->hpos, env->vpos,
env->col, env->fill,
@@ -356,7 +356,7 @@ void tty_printer::add_char(output_character c, int w,
#if 0
// This is too expensive.
if (h % font::hor != 0)
- fatal("horizontal position not a multiple of horizontal resolution");
+ fatal("horizontal position not a multiple of horizontal motion quantum");
#endif
int hpos = h / font::hor;
if (hpos < SHRT_MIN || hpos > SHRT_MAX) {
@@ -368,7 +368,8 @@ void tty_printer::add_char(output_character c, int w,
vpos = cached_vpos;
else {
if (v % font::vert != 0)
- fatal("vertical position not a multiple of vertical resolution");
+ fatal("vertical position not a multiple of vertical motion"
+ " quantum");
vpos = v / font::vert;
if (vpos > nlines) {
tty_glyph **old_lines = lines;
@@ -735,7 +736,8 @@ static output_character crossings[4*4] = {
void tty_printer::end_page(int page_length)
{
if (page_length % font::vert != 0)
- error("vertical position at end of page not multiple of vertical
resolution");
+ error("vertical position at end of page not multiple of vertical"
+ " motion quantum");
int lines_per_page = page_length / font::vert;
int last_line;
for (last_line = nlines; last_line > 0; last_line--)
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 24298767..d6a9e982 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -1348,7 +1348,7 @@ void line_length()
if (has_arg() && get_hunits(&temp, 'm', curenv->line_length)) {
if (temp < minimum_length) {
warning(WARN_RANGE, "invalid line length %1u rounded to device"
- " horizontal resolution", temp.to_units());
+ " horizontal motion quantum", temp.to_units());
temp = minimum_length;
}
}
@@ -1367,7 +1367,7 @@ void title_length()
if (has_arg() && get_hunits(&temp, 'm', curenv->title_length)) {
if (temp < minimum_length) {
warning(WARN_RANGE, "invalid title length %1u rounded to device"
- " horizontal resolution", temp.to_units());
+ " horizontal motion quantum", temp.to_units());
temp = minimum_length;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 09/15: [troff,grohtml,grops,grotty]: Update diag msgs.,
G. Branden Robinson <=