gbranden pushed a commit to branch master
in repository groff.

commit 8fbdfecc2c0f38eed879e73354e0d5d08e724cf3
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Apr 18 14:48:28 2026 -0500

    src/roff/troff/node.cpp: Trivially refactor.
    
    * src/roff/troff/node.cpp (read_font_identifier): Rename local variable
      `n` to `mp` to prepare for subsequent, larger change.
---
 ChangeLog               |  6 ++++++
 src/roff/troff/node.cpp | 22 +++++++++++-----------
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a3e3e6ad1..5b894462d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-04-18  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/node.cpp (read_font_identifier): Trivially
+       refactor.  Rename local variable `n` to `mp` to prepare for
+       subsequent, larger change.
+
 2026-04-18  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/env.cpp (select_font): Fix code style nit.
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 53295db10..74dd1c549 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -7004,25 +7004,25 @@ bool is_valid_font(int n)
 // requested name or position, and the position actually resolved.
 static bool read_font_identifier(font_lookup_info *finfo)
 {
-  int n;
+  int mp;
   tok.skip_spaces();
   if (tok.is_usable_as_delimiter()) {
     symbol s = read_identifier(true /* want_diagnostic */);
     finfo->requested_name = const_cast<char *>(s.contents());
     if (!s.is_null()) {
-      n = mounting_position_of_font(s);
-      if (n < 0) {
-       n = next_available_font_mounting_position();
-       if (mount_font_at_position(s, n))
-         finfo->position = n;
+      mp = mounting_position_of_font(s);
+      if (mp < 0) {
+       mp = next_available_font_mounting_position();
+       if (mount_font_at_position(s, mp))
+         finfo->position = mp;
       }
-      finfo->position = curenv->get_family()->resolve(n);
+      finfo->position = curenv->get_family()->resolve(mp);
     }
   }
-  else if (read_integer(&n)) {
-    finfo->requested_position = n;
-    if (is_valid_font_mounting_position(n))
-      finfo->position = curenv->get_family()->resolve(n);
+  else if (read_integer(&mp)) {
+    finfo->requested_position = mp;
+    if (is_valid_font_mounting_position(mp))
+      finfo->position = curenv->get_family()->resolve(mp);
   }
   return (finfo->position != FONT_NOT_MOUNTED);
 }

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to