[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 24/44: src/roff/troff/reg.cpp: Trivially refactor.
From: |
G. Branden Robinson |
Subject: |
[groff] 24/44: src/roff/troff/reg.cpp: Trivially refactor. |
Date: |
Tue, 3 Sep 2024 08:05:45 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 06514d04303aa419890c046df9611354510eee3a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Sep 3 02:09:54 2024 -0500
src/roff/troff/reg.cpp: Trivially refactor.
* src/roff/troff/reg.cpp: Rename all functions implementing request
handlers such that they end with "_request", a practice already
fitfully adopted elsewhere in GNU troff. The idea is to help
contributing developers navigate the source code more easily.
(define_register, alter_format, remove_reg, alias_reg, rename_reg)
(print_registers): Rename these...
(define_register_request, assign_register_format_request)
(remove_register_request, alias_register_request)
(rename_register_request, dump_register_request): ...to these.
---
ChangeLog | 13 +++++++++++++
src/roff/troff/reg.cpp | 24 ++++++++++++------------
2 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fd78226bc..1ecaf0480 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2024-09-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/roff/troff/reg.cpp: Trivially refactor. Rename all
+ functions implementing request handlers such that they end with
+ "_request", a practice already fitfully adopted elsewhere in GNU
+ troff. The idea is to help contributing developers navigate the
+ source code more easily.
+ (define_register, alter_format, remove_reg, alias_reg)
+ (rename_reg, print_registers): Rename these...
+ (define_register_request, assign_register_format_request)
+ (remove_register_request, alias_register_request)
+ (rename_register_request, dump_register_request): ...to these.
+
2024-09-03 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/troff/reg.cpp (define_register, alter_format)
diff --git a/src/roff/troff/reg.cpp b/src/roff/troff/reg.cpp
index e1c77b8e3..d8b9047a0 100644
--- a/src/roff/troff/reg.cpp
+++ b/src/roff/troff/reg.cpp
@@ -305,7 +305,7 @@ bool variable_reg::get_value(units *res)
return true;
}
-void define_register()
+void define_register_request()
{
if (!has_arg()) {
warning(WARN_MISSING, "register definition request expects"
@@ -409,7 +409,7 @@ reg *look_up_register(symbol nm)
return r;
}
-void alter_format()
+void assign_register_format_request()
{
if (!has_arg()) {
warning(WARN_MISSING, "register interpolation format assignment"
@@ -445,7 +445,7 @@ void alter_format()
skip_line();
}
-void remove_reg()
+void remove_register_request()
{
if (!has_arg()) {
warning(WARN_MISSING, "register removal request expects arguments");
@@ -461,7 +461,7 @@ void remove_reg()
skip_line();
}
-void alias_reg()
+void alias_register_request()
{
if (!has_arg()) {
warning(WARN_MISSING, "register aliasing request expects"
@@ -484,7 +484,7 @@ void alias_reg()
skip_line();
}
-void rename_reg()
+void rename_register_request()
{
if (!has_arg()) {
warning(WARN_MISSING, "register renaming request expects"
@@ -504,7 +504,7 @@ void rename_reg()
skip_line();
}
-void print_registers()
+void dump_register_request()
{
object_dictionary_iterator iter(register_dictionary);
reg *r;
@@ -523,12 +523,12 @@ void print_registers()
void init_reg_requests()
{
- init_request("rr", remove_reg);
- init_request("nr", define_register);
- init_request("af", alter_format);
- init_request("aln", alias_reg);
- init_request("rnn", rename_reg);
- init_request("pnr", print_registers);
+ init_request("rr", remove_register_request);
+ init_request("nr", define_register_request);
+ init_request("af", assign_register_format_request);
+ init_request("aln", alias_register_request);
+ init_request("rnn", rename_register_request);
+ init_request("pnr", dump_register_request);
}
// Local Variables:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 24/44: src/roff/troff/reg.cpp: Trivially refactor.,
G. Branden Robinson <=