gbranden pushed a commit to branch master
in repository groff.
commit 872c934d490aa4a44a576c17508109b502d2f1d5
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Apr 9 21:07:46 2026 -0500
[troff]: Fix cosmetic code style nits.
* src/roff/troff/input.cpp (do_expr_test, do_register)
(evaluate_expression):
* src/roff/troff/reg.cpp (define_register_request): Reformat input lines
to more tightly localize annotation planning future code change.
---
src/roff/troff/input.cpp | 13 +++++++------
src/roff/troff/reg.cpp | 10 ++++++----
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 1979dc948..d8e7213b9 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -1873,8 +1873,8 @@ static const char *do_expr_test() // \B
desired_warnings = 0U;
want_errors_inhibited = true;
int dummy;
- // TODO: grochar
- bool result = read_measurement(&dummy, (unsigned char)('u'),
+ bool result = read_measurement(&dummy,
+ (unsigned char)('u'), // TODO: grochar
true /* is_mandatory */);
desired_warnings = saved_desired_warnings;
want_errors_inhibited = saved_want_errors_inhibited;
@@ -6440,8 +6440,9 @@ static void do_register() // \R
if ((0 /* nullptr */ == r) || !r->get_value(&prev_value))
prev_value = 0;
int val;
- // TODO: grochar
- if (!read_measurement(&val, (unsigned char)('u'), prev_value))
+ if (!read_measurement(&val,
+ (unsigned char)('u'), // TODO: grochar
+ prev_value))
return;
// token::description() writes to static, class-wide storage, so we
// must allocate a copy of it before issuing the next diagnostic.
@@ -9826,8 +9827,8 @@ static int evaluate_expression(const char *expr, units
*res)
{
input_stack::push(make_temp_iterator(expr));
tok.next();
- // TODO: grochar
- int success = read_measurement(res, (unsigned char)('u'));
+ int success = read_measurement(res,
+ (unsigned char)('u')); // TODO: grochar
while (input_stack::get(0 /* nullptr */) != EOF)
;
return success;
diff --git a/src/roff/troff/reg.cpp b/src/roff/troff/reg.cpp
index 0353fa476..31b2ab35c 100644
--- a/src/roff/troff/reg.cpp
+++ b/src/roff/troff/reg.cpp
@@ -374,16 +374,18 @@ static void define_register_request()
skip_line();
return;
}
- // TODO: grochar
- if (read_measurement(&v, (unsigned char)('u'), prev_value)) {
+ if (read_measurement(&v,
+ (unsigned char)('u'), // TODO: grochar
+ prev_value)) {
if (0 /* nullptr */ == r) {
r = new number_reg;
register_dictionary.define(nm, r);
}
r->set_value(v);
if (tok.is_space()) {
- // TODO: grochar
- if (has_arg() && read_measurement(&v, (unsigned char)('u')))
+ if (has_arg()
+ && read_measurement(&v,
+ (unsigned char)('u'))) // TODO: grochar
r->set_increment(v);
}
else if (has_arg() && !tok.is_tab())
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit