gbranden pushed a commit to branch master
in repository groff.
commit a84fb49a8b6a79649dce557b4a23f81230a2384d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Nov 22 01:23:02 2026 -0600
[grotty]: Reënable horiz position sanity check.
* src/devices/grotty/tty.cpp (tty_printer::add_char): Reënable sanity
check of horizontal drawing position quantization; it should be a
multiple of the horizontal motion quantum. Clark disabled this check
as "too expensive" in groff 1.05 (1992), but it no longer appears to
be.
Before:
$ time ./build/grotty 64bashes.grout >/dev/null
real 0m5.566s
user 0m5.333s
sys 0m0.232s
After:
$ time ./build/grotty 64bashes.grout >/dev/null
real 0m5.303s
user 0m5.098s
sys 0m0.204s
---
ChangeLog | 8 ++++++++
src/devices/grotty/tty.cpp | 3 ---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6328bca6d..5dcb29ab2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-11-22 G. Branden Robinson <[email protected]>
+
+ * src/devices/grotty/tty.cpp (tty_printer::add_char): Reënable
+ sanity check of horizontal drawing position quantization; it
+ should be a multiple of the horizontal motion quantum. Clark
+ disabled this check as "too expensive" in groff 1.05 (1992), but
+ it no longer appears to be.
+
2026-11-22 G. Branden Robinson <[email protected]>
* src/devices/grotty/tty.cpp (tty_printer::add_char): Make more
diff --git a/src/devices/grotty/tty.cpp b/src/devices/grotty/tty.cpp
index b6da09fdf..b0abf3245 100644
--- a/src/devices/grotty/tty.cpp
+++ b/src/devices/grotty/tty.cpp
@@ -401,11 +401,8 @@ void tty_printer::add_char(output_character c, int w,
color *fore, color *back,
unsigned char mode)
{
-#if 0
- // This is too expensive.
if (h % font::hor != 0)
fatal("horizontal position not a multiple of horizontal motion quantum");
-#endif
int hpos = h / font::hor;
// A negative horizontal drawing position is uncommon, but possible.
// "tmac/tests/e_line-numbering-works.sh" illustrates a case.
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit