gbranden pushed a commit to branch master
in repository groff.
commit 9aeb46d401a5126a9408f8f7f86f0279c0c0e726
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon May 25 04:02:08 2026 -0500
[tfmtodit]: Fix code style nits. (6/6)
* src/utils/tfmtodit/tfmtodit.cpp (tfm::load): Declare local variable
closer to point of use.
---
ChangeLog | 1 +
src/utils/tfmtodit/tfmtodit.cpp | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 2a7de9ea9..bba9c7fa9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -61,6 +61,7 @@
(gf::skip): Update definitions. Return Boolean, not integer,
literals.
(read_map): Demote return type from `int` to `bool`.
+ (tfm::load): Declare local variable closer to point of use.
(main): Demote local variable `special_flag` from `int` to
`bool` and rename it to `is_font_special`. Assign to it using
Boolean, not integer, literals.
diff --git a/src/utils/tfmtodit/tfmtodit.cpp b/src/utils/tfmtodit/tfmtodit.cpp
index 3a571b624..6e1ff747a 100644
--- a/src/utils/tfmtodit/tfmtodit.cpp
+++ b/src/utils/tfmtodit/tfmtodit.cpp
@@ -350,10 +350,10 @@ bool tfm::load(const char *file)
lig_kern = new lig_kern_command[nl];
kern = new int[nk];
param = new int[np];
- int i;
cs = read4(ptr);
ds = read4(ptr);
ptr += (lh - 2) * 4;
+ int i;
for (i = 0; (i < (ec - bc + 1)); i++) {
char_info[i].width_index = *ptr++;
unsigned char tem = *ptr++;
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit