[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 01/32: [troff]: Boolify `character_exists()`.
From: |
G. Branden Robinson |
Subject: |
[groff] 01/32: [troff]: Boolify `character_exists()`. |
Date: |
Wed, 30 Nov 2022 07:25:50 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 790e2067c4907278842a0a9dcbbb34b57b9a7495
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Nov 25 15:07:27 2022 -0600
[troff]: Boolify `character_exists()`.
* src/roff/troff/node.h (character_exists):
* src/roff/troff/node.cpp (character_exists): Boolify.
---
ChangeLog | 5 +++++
src/roff/troff/node.cpp | 10 +++++-----
src/roff/troff/node.h | 2 +-
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b7ee67381..53ad2ece9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-11-25 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/roff/troff/node.h (character_exists):
+ * src/roff/troff/node.cpp (character_exists): Boolify.
+
2022-11-25 G. Branden Robinson <g.branden.robinson@gmail.com>
[doc]: Add make(1) dependency.
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 96697e076..bb61b257b 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -5026,21 +5026,21 @@ node *make_node(charinfo *ci, environment *env)
return make_glyph_node(ci, env);
}
-int character_exists(charinfo *ci, environment *env)
+bool character_exists(charinfo *ci, environment *env)
{
if (ci->get_special_translation() != charinfo::TRANSLATE_NONE)
- return 1;
+ return true;
charinfo *tem = ci->get_translation();
if (tem)
ci = tem;
if (ci->get_macro())
- return 1;
+ return true;
node *nd = make_glyph_node(ci, env, false /* don't want warnings */);
if (nd) {
delete nd;
- return 1;
+ return true;
}
- return 0;
+ return false;
}
node *node::add_char(charinfo *ci, environment *env,
diff --git a/src/roff/troff/node.h b/src/roff/troff/node.h
index 9b566a0ab..de82753d0 100644
--- a/src/roff/troff/node.h
+++ b/src/roff/troff/node.h
@@ -597,7 +597,7 @@ public:
class charinfo;
node *make_node(charinfo *, environment *);
-int character_exists(charinfo *, environment *);
+bool character_exists(charinfo *, environment *);
int same_node_list(node *, node *);
node *reverse_node_list(node *);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 01/32: [troff]: Boolify `character_exists()`.,
G. Branden Robinson <=