gbranden pushed a commit to branch master
in repository groff.

commit 9798e98aa527bf246f554f78baa324cfe79a18a8
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Jun 5 05:22:10 2025 -0500

    [grohtml]: Rename `none` to `none_tag`.
    
    * src/devices/grohtml/post-html.cpp: Rename `none` enumeration constant
      to `none_tag` for conformity with other constants in the same
      (anonymous) enum.  C++ enums weren't name-spaced or properly
      type-checked until C++11, and C's still aren't.  (Ada had proper sum
      types back in 1983.)
---
 ChangeLog                         | 8 ++++++++
 src/devices/grohtml/post-html.cpp | 8 ++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d0d0cf218..4c5eda689 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-06-05  G. Branden Robinson <[email protected]>
+
+       * src/devices/grohtml/post-html.cpp: Rename `none` enumeration
+       constant to `none_tag` for conformity with other constants in
+       the same (anonymous) enum.  C++ enums weren't name-spaced or
+       properly type-checked until C++11, and C's still aren't.  (Ada
+       had proper sum types back in 1983.)
+
 2025-06-05  G. Branden Robinson <[email protected]>
 
        * src/devices/grohtml/post-html.cpp (main): Spell null pointer
diff --git a/src/devices/grohtml/post-html.cpp 
b/src/devices/grohtml/post-html.cpp
index cef6dac32..44ed33d38 100644
--- a/src/devices/grohtml/post-html.cpp
+++ b/src/devices/grohtml/post-html.cpp
@@ -64,7 +64,7 @@ extern "C" const char *Version_string;
                                      /* either encoded by their glyph names or 
if */
                                      /* there is no name then we use &#nnn;    
   */
 typedef enum {CENTERED, LEFT, RIGHT, INLINE} TAG_ALIGNMENT;
-typedef enum {col_tag, tab_tag, tab0_tag, none} colType;
+typedef enum {col_tag, tab_tag, tab0_tag, none_tag} colType;
 
 #undef DEBUG_TABLES
 // #define DEBUG_TABLES
@@ -3926,7 +3926,7 @@ void html_printer::lookahead_for_tables (void)
   text_glob  *start_of_line  = 0 /* nullptr */;
   text_glob  *start_of_table = 0 /* nullptr */;
   text_glob  *last           = 0 /* nullptr */;
-  colType     type_of_col    = none;
+  colType     type_of_col    = none_tag;
   int         found_col      = FALSE;
   int         ncol           = 0;
   int         colmin         = 0;              // pacify compiler
@@ -4041,7 +4041,7 @@ void html_printer::lookahead_for_tables (void)
            start_of_table->remember_table(tbl);
            tbl = new html_table(&html, -1);
            start_of_table = 0 /* nullptr */;
-           type_of_col = none;
+           type_of_col = none_tag;
            last = 0 /* nullptr */;
          }
          tbl->tab_stops->init(tab_defs);
@@ -4059,7 +4059,7 @@ void html_printer::lookahead_for_tables (void)
          start_of_table->remember_table(tbl);
          tbl = new html_table(&html, -1);
          start_of_table = 0 /* nullptr */;
-         type_of_col = none;
+         type_of_col = none_tag;
          last = 0 /* nullptr */;
        }
       }

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

Reply via email to