gbranden pushed a commit to branch master
in repository groff.
commit 9db1265f938ce50b1bb72a46f26a015abfb39bab
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Apr 14 08:51:39 2026 -0500
src/roff/troff/div.cpp: Drop unused code (5/5).
...introduced in initial commit 351da0dcd, 1991-06-02. Since the `.d`
register is interpolated only by its `get_string()` member function and
never `get_value()` (and nothing internally to the formatter attempts to
get at it by that means, since accessing the datum via
`curdiv->get_page_length()` is more straightforward), we can drop the
latter.
* src/roff/troff/div.cpp (class page_length_reg): Drop
`get_value()` declaration.
(page_length_reg::get_value): Delete.
---
ChangeLog | 13 +++++++++++++
src/roff/troff/div.cpp | 7 -------
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f76108d4b..3c03fdbf3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2026-04-14 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/div.cpp: Drop unused code introduced in initial
+ commit 351da0dcd, 1991-06-02. Since the `.p` register is
+ interpolated only by its `get_string()` member function and
+ never `get_value()` (and nothing internally to the formatter
+ attempts to get at it by that means, since accessing the datum
+ via `curdiv->get_page_length()` is more straightforward), we can
+ drop the latter.
+
+ (class page_length_reg): Drop `get_value()` declaration.
+ (page_length_reg::get_value): Delete.
+
2026-04-14 G. Branden Robinson <[email protected]>
* src/roff/troff/div.cpp: Drop unused code introduced in initial
diff --git a/src/roff/troff/div.cpp b/src/roff/troff/div.cpp
index c8cd47e1d..a700c69ee 100644
--- a/src/roff/troff/div.cpp
+++ b/src/roff/troff/div.cpp
@@ -1092,16 +1092,9 @@ const char *page_offset_reg::get_string()
class page_length_reg : public reg {
public:
- bool get_value(units *);
const char *get_string();
};
-bool page_length_reg::get_value(units *res)
-{
- *res = topdiv->get_page_length().to_units();
- return true;
-}
-
const char *page_length_reg::get_string()
{
return i_to_a(topdiv->get_page_length().to_units());
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit