gbranden pushed a commit to branch master
in repository groff.
commit 65dafddd414e54d24a4defe29c3c41f9e0276059
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri May 22 11:03:45 2026 -0500
[troff]: Trivially refactor; fix code style nits.
* src/roff/troff/input.cpp: Trivially refactor and fix code style nits.
(next_file)
(shift)
(compatible): Rename these...
(next_file_request)
(shift_request)
(configure_att_compatibility_mode_request): ...to these, and declare
them as `static`; external linkage is not required.
(init_input_requests): Update wire-uppery of request names to handler
functions.
---
ChangeLog | 14 ++++++++++++++
src/roff/troff/input.cpp | 12 ++++++------
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 96e5b14bd..2450b710a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2026-05-22 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp: Trivially refactor and fix code
+ style nits.
+ (next_file)
+ (shift)
+ (compatible): Rename these...
+ (next_file_request)
+ (shift_request)
+ (configure_att_compatibility_mode_request): ...to these, and
+ declare them as `static`; external linkage is not required.
+ (init_input_requests): Update wire-uppery of request names to
+ handler functions.
+
2026-05-21 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp: Fix code style nits.
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index bbcecb4d2..fa3480e42 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -983,7 +983,7 @@ void backtrace_request()
skip_line();
}
-void next_file()
+static void next_file_request() // .nx
{
char *filename = 0 /* nullptr */;
if (has_arg(true /* peeking */)) {
@@ -1004,7 +1004,7 @@ void next_file()
tok.next();
}
-void shift()
+static void shift_request() // .shift
{
int n;
if (!has_arg() || !read_integer(&n))
@@ -3226,7 +3226,7 @@ void skip_line()
tok.next();
}
-void compatible()
+static void configure_att_compatibility_mode_request() // .cp
{
int n;
if (has_arg() && read_integer(&n))
@@ -10354,7 +10354,7 @@ void init_input_requests()
init_request("color", activate_color);
init_request("composite", map_composite_character);
init_request("continue", while_continue_request);
- init_request("cp", compatible);
+ init_request("cp", configure_att_compatibility_mode_request);
init_request("de", define_macro);
init_request("de1", define_nocomp_macro);
init_request("defcolor", define_color);
@@ -10388,7 +10388,7 @@ void init_input_requests()
init_request("msoquiet", macro_source_quietly_request);
init_request("nop", nop_request);
init_request("nroff", nroff_request);
- init_request("nx", next_file);
+ init_request("nx", next_file_request);
init_request("open", open_request);
init_request("opena", opena_request);
init_request("output", output_request);
@@ -10407,7 +10407,7 @@ void init_input_requests()
init_request("rm", remove_macro);
init_request("rn", rename_macro);
init_request("schar", define_special_character_request);
- init_request("shift", shift);
+ init_request("shift", shift_request);
init_request("so", source_request);
init_request("soquiet", source_quietly_request);
init_request("spreadwarn", spreadwarn_request);
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit