gbranden pushed a commit to branch master
in repository groff.

commit d2c4f398b0c1a4f839897edc75ecc45a24abe940
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Dec 8 03:30:51 2025 -0600

    src/roff/troff/input.cpp: Fix code style nit (1).
    
    * src/roff/troff/input.cpp (read_rgb, read_cmy, read_cmyk, read_gray):
      Call `do_get_long_name()`, which takes a `bool` as its first
      parameter, using Boolean, not integer, literals.
---
 ChangeLog                | 7 +++++++
 src/roff/troff/input.cpp | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bd6957333..b724cdd00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-12-08  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (read_rgb, read_cmy, read_cmyk)
+       (read_gray): Fix code style nit.  Call `do_get_long_name()`,
+       which takes a `bool` as its first parameter, using Boolean, not
+       integer, literals.
+
 2025-12-07  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (read_delimited_identifier): Update
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index be424bb28..360062bf6 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -1418,7 +1418,7 @@ static unsigned int get_color_element(const char *scheme, 
const char *col)
 
 static color *read_rgb(char end = 0)
 {
-  symbol component = do_get_long_name(0, end);
+  symbol component = do_get_long_name(false /* required */, end);
   if (component.is_null()) {
     warning(WARN_COLOR, "missing rgb color values");
     return 0 /* nullptr */;
@@ -1448,7 +1448,7 @@ static color *read_rgb(char end = 0)
 
 static color *read_cmy(char end = 0)
 {
-  symbol component = do_get_long_name(0, end);
+  symbol component = do_get_long_name(false /* required */, end);
   if (component.is_null()) {
     warning(WARN_COLOR, "missing cmy color values");
     return 0 /* nullptr */;
@@ -1478,7 +1478,7 @@ static color *read_cmy(char end = 0)
 
 static color *read_cmyk(char end = 0)
 {
-  symbol component = do_get_long_name(0, end);
+  symbol component = do_get_long_name(false /* required */, end);
   if (component.is_null()) {
     warning(WARN_COLOR, "missing cmyk color values");
     return 0 /* nullptr */;
@@ -1509,7 +1509,7 @@ static color *read_cmyk(char end = 0)
 
 static color *read_gray(char end = 0)
 {
-  symbol component = do_get_long_name(0, end);
+  symbol component = do_get_long_name(false /* required */, end);
   if (component.is_null()) {
     warning(WARN_COLOR, "missing gray value");
     return 0 /* nullptr */;

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

Reply via email to