gbranden pushed a commit to branch master
in repository groff.
commit 15c4712fceeaea95f1a986f446688420565e9132
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Nov 16 10:17:39 2026 -0600
[pic]: Boolify.
Demote `look_up_variable()` function from `int` to `bool`.
* src/preproc/pic/object.h: Update declaration.
* src/preproc/pic/pic.ypp: Update definition.
(look_up_variable): Return Boolean, not integer, literals.
Continues the long process of fixing Savannah #66672.
---
ChangeLog | 11 +++++++++++
src/preproc/pic/object.h | 2 +-
src/preproc/pic/pic.ypp | 6 +++---
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 85bfd4a41..832cd0f65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2026-11-16 G. Branden Robinson <[email protected]>
+
+ [pic]: Boolify. Demote `look_up_variable()` function from `int`
+ to `bool`.
+
+ * src/preproc/pic/object.h: Update declaration.
+ * src/preproc/pic/pic.ypp: Update definition.
+ (look_up_variable): Return Boolean, not integer, literals.
+
+ Continues the long process of fixing Savannah #66672.
+
2026-11-16 G. Branden Robinson <[email protected]>
[pic]: Trivially refactor. Rename `lookup_variable()` function
diff --git a/src/preproc/pic/object.h b/src/preproc/pic/object.h
index 0422c6922..7e017394b 100644
--- a/src/preproc/pic/object.h
+++ b/src/preproc/pic/object.h
@@ -232,7 +232,7 @@ object *make_object(object_spec *, position *, direction *);
object *make_mark_object();
object *make_command_object(char *, const char *, int);
-int look_up_variable(const char *name, double *val);
+bool look_up_variable(const char *name, double *val);
void define_variable(const char *name, double val);
void print_picture(object *);
diff --git a/src/preproc/pic/pic.ypp b/src/preproc/pic/pic.ypp
index e8b217297..aa427b425 100644
--- a/src/preproc/pic/pic.ypp
+++ b/src/preproc/pic/pic.ypp
@@ -1830,14 +1830,14 @@ void define_label(const char *label, const place *pl)
current_table->define(label, p);
}
-int look_up_variable(const char *name, double *val)
+bool look_up_variable(const char *name, double *val)
{
place *pl = lookup_label(name);
if (pl) {
*val = pl->x;
- return 1;
+ return true;
}
- return 0;
+ return false;
}
void define_variable(const char *name, double val)
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit