gbranden pushed a commit to branch master
in repository groff.

commit cc220c3b299bb9b313d44b50ce2ccee4b9a9d9b2
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Apr 17 09:03:09 2026 -0500

    src/roff/troff/input.cpp: Rename enum const (3/3).
    
    * src/roff/troff/input.cpp: Trivially refactor.  Rename constant in
      `escape_sequence_parameter_cardinality` enumeration from `ALLOW_EMPTY`
      to `ARGUMENTS_OPTIONAL`.
    
      (read_long_escape_parameters)
      (token::next): Update dereference sites.
---
 ChangeLog                |  8 ++++++++
 src/roff/troff/input.cpp | 12 ++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 80bd3b9e5..16b8e5825 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-04-17  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp: Trivially refactor.  Rename
+       constant in `escape_sequence_parameter_cardinality` enumeration
+       from `ALLOW_EMPTY` to `ARGUMENTS_OPTIONAL`.
+       (read_long_escape_parameters)
+       (token::next): Update dereference sites.
+
 2026-04-17  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp: Trivially refactor.  Rename
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 29190beb5..fdced9f1e 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -183,7 +183,7 @@ static void copy_mode_error(const char *,
                            const errarg & = empty_errarg);
 
 enum escape_sequence_parameter_cardinality {
-  ALLOW_EMPTY,
+  ARGUMENTS_OPTIONAL,
   ARGUMENTS_MANDATORY,
   ARGUMENTS_FORBIDDEN
 };
@@ -1087,7 +1087,7 @@ static symbol read_long_escape_parameters(
   }
   buf[i] = '\0';
   if (0 == i) {
-    if (mode != ALLOW_EMPTY)
+    if (mode != ARGUMENTS_OPTIONAL)
       // XXX: `.device \[]` passes through as-is but `\X \[]` doesn't,
       // landing here.  Implement almost-but-not-quite-copy-mode?
       copy_mode_error("empty escape sequence argument");
@@ -2524,7 +2524,7 @@ void token::next()
                  char(cc));
          break;
        }
-       select_font(read_escape_parameter(ALLOW_EMPTY));
+       select_font(read_escape_parameter(ARGUMENTS_OPTIONAL));
        if (!want_att_compat)
          have_formattable_input = true;
        break;
@@ -2532,7 +2532,7 @@ void token::next()
        if (want_att_compat)
          warning(WARN_SYNTAX, "an escaped '%1' is not portable to"
                  " AT&T troff", char(cc));
-       curenv->set_family(read_escape_parameter(ALLOW_EMPTY));
+       curenv->set_family(read_escape_parameter(ARGUMENTS_OPTIONAL));
        have_formattable_input = true;
        break;
       case 'g':
@@ -2591,7 +2591,7 @@ void token::next()
        if (want_att_compat)
          warning(WARN_SYNTAX, "an escaped '%1' is not portable to"
                  " AT&T troff", char(cc));
-       do_stroke_color(read_escape_parameter(ALLOW_EMPTY));
+       do_stroke_color(read_escape_parameter(ARGUMENTS_OPTIONAL));
        if (!want_att_compat)
          have_formattable_input = true;
        break;
@@ -2599,7 +2599,7 @@ void token::next()
        if (want_att_compat)
          warning(WARN_SYNTAX, "an escaped '%1' is not portable to"
                  " AT&T troff", char(cc));
-       do_fill_color(read_escape_parameter(ALLOW_EMPTY));
+       do_fill_color(read_escape_parameter(ARGUMENTS_OPTIONAL));
        if (!want_att_compat)
          have_formattable_input = true;
        break;

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

Reply via email to