gbranden pushed a commit to branch master
in repository groff.
commit 707bb6fdf956924b4ad5220e76c1cef0f9947c87
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Apr 15 11:35:10 2026 -0500
src/roff/troff/div.cpp: Add warning to `dt` req.
* src/roff/troff/div.cpp (diversion_trap_request): Throw warning in
category "missing" if a `dist` argument is specified but the
then-mandatory `name` argument is omitted.
---
ChangeLog | 6 ++++++
src/roff/troff/div.cpp | 7 +++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 532410121..f499c34be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-04-15 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/div.cpp (diversion_trap_request): Throw warning
+ in category "missing" if a `dist` argument is specified but the
+ then-mandatory `name` argument is omitted.
+
2026-04-15 G. Branden Robinson <[email protected]>
* src/roff/troff/div.cpp: Trivially refactor. Rename request
diff --git a/src/roff/troff/div.cpp b/src/roff/troff/div.cpp
index 39abefa78..8a688ebdf 100644
--- a/src/roff/troff/div.cpp
+++ b/src/roff/troff/div.cpp
@@ -1001,8 +1001,11 @@ static void diversion_trap_request() // .dt
symbol s = read_identifier();
if (!s.is_null())
curdiv->set_diversion_trap(s, n);
- else
- curdiv->clear_diversion_trap();
+ else {
+ warning(WARN_MISSING, "diversion trap request expects macro"
+ " identifier argument after vertical position argument");
+ curdiv->set_diversion_trap(s, n);
+ }
}
else
curdiv->clear_diversion_trap();
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit