gbranden pushed a commit to branch master
in repository groff.
commit a2782b0f78a4324559ffcad900088ab197afed38
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Dec 27 17:25:17 2023 -0600
[troff]: Fix code style nits.
* src/roff/troff/input.cpp (do_open, open_request, opena_request)
(close_request): Demote `int` arguments to `bool`. Declare functions
`static` since they do not require external linkage.
---
ChangeLog | 9 +++++++++
src/roff/troff/input.cpp | 12 ++++++------
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c25497607..a5b386cc2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-12-27 G. Branden Robinson <[email protected]>
+
+ [troff]: Fix code style nits.
+
+ * src/roff/troff/input.cpp (do_open, open_request)
+ (opena_request, close_request): Demote `int` arguments to
+ `bool`. Declare functions `static` since they do not require
+ external linkage.
+
2023-12-27 G. Branden Robinson <[email protected]>
[troff]: Revise diagnostics when opening and closing streams.
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 55cee7ede..28f7c306f 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -6951,7 +6951,7 @@ void terminal_continue()
dictionary stream_dictionary(20);
-void do_open(int append)
+static void do_open(bool append)
{
symbol stream = get_name(true /* required */);
if (!stream.is_null()) {
@@ -6975,27 +6975,27 @@ void do_open(int append)
skip_line();
}
-void open_request()
+static void open_request()
{
if (!want_unsafe_requests) {
error("'open' request is not allowed in safer mode");
skip_line();
}
else
- do_open(0);
+ do_open(false /* don't append */);
}
-void opena_request()
+static void opena_request()
{
if (!want_unsafe_requests) {
error("'opena' request is not allowed in safer mode");
skip_line();
}
else
- do_open(1);
+ do_open(true /* append */);
}
-void close_request()
+static void close_request()
{
symbol stream = get_name(true /* required */);
if (!stream.is_null()) {
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit