gbranden pushed a commit to branch master
in repository groff.
commit 7896976c9d9b2f6f629ba86ff7a793d681cf53a8
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Feb 3 20:56:30 2024 -0600
[troff]: Fix code style nit (`n` -> `cc`).
* src/roff/troff/input.cpp
(non_interpreted_char_node::non_interpreted_char_node): Rename
parameter from `n` to `cc`; it is of `unsigned char` type, and GNU
troff's code uses `n` as a pointer to `node` type ubiquitously. It
also uses `c` for an `unsigned char` type pretty reliably, but that is
already a private member variable for this class.
Doubling the single letter is already idiomatic for GNU troff's style,
though I consider it an old-fashioned convention.
---
ChangeLog | 10 ++++++++++
src/roff/troff/input.cpp | 4 ++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 781ef88e8..9131b3556 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-02-03 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp
+ (non_interpreted_char_node::non_interpreted_char_node): Rename
+ parameter from `n` to `cc`; it is of `unsigned char` type, and
+ GNU troff's code uses `n` as a pointer to `node` type
+ ubiquitously. It also uses `c` for an `unsigned char` type
+ pretty reliably, but that is already a private member variable
+ for this class.
+
2024-02-02 G. Branden Robinson <[email protected]>
* tmac/an.tmac (TH): Set up end macro unconditionally here...
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index d3f3b9dc3..78a93b27d 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -1279,9 +1279,9 @@ bool non_interpreted_char_node::is_tag()
return false;
}
-non_interpreted_char_node::non_interpreted_char_node(unsigned char n) : c(n)
+non_interpreted_char_node::non_interpreted_char_node(unsigned char cc) : c(cc)
{
- assert(n != 0);
+ assert(cc != 0);
}
node *non_interpreted_char_node::copy()
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit