gbranden pushed a commit to branch master
in repository groff.
commit de3d667ef5a4e6dfe0a03d1ad50a59afc93fa805
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Dec 17 15:39:21 2025 -0600
src/roff/troff/input.cpp: Trivially refactor.
* src/roff/troff/input.cpp (assign_escape_character): Rename this...
(assign_escape_character_request): ...to this.
(escape_off): Rename this...
(escape_off_request): ...to this.
(save_escape_char): Rename this...
(save_escape_char_request): ...to this.
(restore_escape_char): Rename this...
(restore_escape_char_request): ...to this.
(init_input_requests): Update wire-uppery of request names to their
handlers.
---
ChangeLog | 14 ++++++++++++++
src/roff/troff/input.cpp | 18 +++++++++---------
2 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fc121d210..02a9ec565 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2025-12-17 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (assign_escape_character): Rename
+ this...
+ (assign_escape_character_request): ...to this.
+ (escape_off): Rename this...
+ (escape_off_request): ...to this.
+ (save_escape_char): Rename this...
+ (save_escape_char_request): ...to this.
+ (restore_escape_char): Rename this...
+ (restore_escape_char_request): ...to this.
+ (init_input_requests): Update wire-uppery of request names to
+ their handlers.
+
2025-12-17 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp: Add new `const` global
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 91986e242..8705e530e 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -193,7 +193,7 @@ void chop_macro(); // declare to avoid friend name
injection
static const unsigned char default_escape_char = (unsigned char)('\\');
static unsigned char escape_char = default_escape_char;
-static void assign_escape_character()
+static void assign_escape_character_request()
{
unsigned char ec = 0U;
bool is_invalid = false;
@@ -232,7 +232,7 @@ static void assign_escape_character()
skip_line();
}
-void escape_off()
+void escape_off_request()
{
escape_char = 0U;
skip_line();
@@ -240,13 +240,13 @@ void escape_off()
static unsigned char saved_escape_char = '\\';
-void save_escape_char()
+void save_escape_char_request()
{
saved_escape_char = escape_char;
skip_line();
}
-void restore_escape_char()
+void restore_escape_char_request()
{
escape_char = saved_escape_char;
skip_line();
@@ -8841,7 +8841,7 @@ charinfo *token::get_charinfo(bool required, bool
suppress_creation)
// XXX: Is this possible? token::add_to_zero_width_node_list()
// and token::process() don't add this token type if the escape
// character is null. If not, this should be an assert(). Also
- // see escape_off().
+ // see escape_off_request().
error("escaped 'e' used while escape sequences disabled");
return 0 /* nullptr */;
}
@@ -10084,12 +10084,12 @@ void init_input_requests()
init_request("do", do_request);
init_request("ds", define_string);
init_request("ds1", define_nocomp_string);
- init_request("ec", assign_escape_character);
- init_request("ecr", restore_escape_char);
- init_request("ecs", save_escape_char);
+ init_request("ec", assign_escape_character_request);
+ init_request("ecr", restore_escape_char_request);
+ init_request("ecs", save_escape_char_request);
init_request("el", else_request);
init_request("em", eoi_macro);
- init_request("eo", escape_off);
+ init_request("eo", escape_off_request);
init_request("ex", exit_request);
init_request("fchar", define_fallback_character_request);
#ifdef WIDOW_CONTROL
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit