gbranden pushed a commit to branch master
in repository groff.
commit a3f332cf4bab4ff37e76df659f83f4d2da977987
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Apr 8 16:56:38 2026 -0500
[troff]: Trivially refactor.
* src/roff/troff/env.h (get_fill): Rename this declaration...
(get_filling): ...to this.
* src/roff/troff/env.cpp (environment::get_fill): Rename this
definition...
(environment::get_filling): ...to this.
(init_env_requests): Update wire-uppery to `.u` register.
* src/roff/troff/input.cpp (diverted_space_node::need_reread): Update
call site.
---
ChangeLog | 13 +++++++++++++
src/roff/troff/env.cpp | 4 ++--
src/roff/troff/env.h | 2 +-
src/roff/troff/input.cpp | 2 +-
4 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4caa5121d..85c561c8d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2026-04-08 G. Branden Robinson <[email protected]>
+
+ [troff]: Trivially refactor.
+
+ * src/roff/troff/env.h (get_fill): Rename this declaration...
+ (get_filling): ...to this.
+ * src/roff/troff/env.cpp (environment::get_fill): Rename this
+ definition...
+ (environment::get_filling): ...to this.
+ (init_env_requests): Update wire-uppery to `.u` register.
+ * src/roff/troff/input.cpp (diverted_space_node::need_reread):
+ Update call site.
+
2026-04-08 G. Branden Robinson <[email protected]>
[groff]: Unit-test `fi` and `nf` requests.
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 2161e4d5e..58dbd12b7 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -1157,7 +1157,7 @@ unsigned int environment::get_adjust_mode()
return adjust_mode;
}
-int environment::get_fill()
+int environment::get_filling()
{
return is_filling;
}
@@ -4549,7 +4549,7 @@ void init_env_requests()
init_string_env_reg(".sr", get_requested_point_size_string);
init_string_env_reg(".sty", get_style_name_string);
init_string_env_reg(".tabs", get_tabs);
- init_int_env_reg(".u", get_fill);
+ init_int_env_reg(".u", get_filling);
init_int_env_reg(".ul", get_underlined_line_count);
init_vunits_env_reg(".v", get_vertical_spacing);
init_hunits_env_reg(".w", get_prev_char_width);
diff --git a/src/roff/troff/env.h b/src/roff/troff/env.h
index 8b20c9f13..812a8ad69 100644
--- a/src/roff/troff/env.h
+++ b/src/roff/troff/env.h
@@ -303,7 +303,7 @@ public:
font_family *get_family() { return family; }
hunits get_emboldening_offset(); // .b
unsigned get_adjust_mode(); // .j
- int get_fill(); // .u
+ int get_filling(); // .u
hunits get_indent(); // .i
hunits get_temporary_indent();
hunits get_line_length(); // .l
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index a7c107dbb..d4f369193 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -3478,7 +3478,7 @@ bool have_global_diverted_space = false;
bool diverted_space_node::need_reread(bool *bolp)
{
have_global_diverted_space = true;
- if (curenv->get_fill())
+ if (curenv->get_filling())
trapping_blank_line();
else
curdiv->space(n);
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit