[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 14/14: [troff]: Reduce symbol visibility.
From: |
G. Branden Robinson |
Subject: |
[groff] 14/14: [troff]: Reduce symbol visibility. |
Date: |
Fri, 8 Dec 2023 18:15:31 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit e84dbee979805f6248e4efcbd4015f73f98700e1
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Dec 8 15:08:44 2023 -0600
[troff]: Reduce symbol visibility.
* src/roff/troff/input.cpp (nop_request, do_if_request, if_else_request)
(if_request, else_request, while_request, while_break_request)
(while_continue_request): Define functions as `static`; they require
no visibility outside this translation unit.
---
ChangeLog | 8 ++++++++
src/roff/troff/input.cpp | 16 ++++++++--------
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fd6f695f2..7a44d8261 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-12-08 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/roff/troff/input.cpp (nop_request, do_if_request)
+ (if_else_request, if_request, else_request, while_request)
+ (while_break_request, while_continue_request): Define functions
+ as `static`; they require no visibility outside this translation
+ unit.
+
2023-12-08 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/troff/input.cpp (if_else_request, if_request): Throw
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index afdce9885..d1262f445 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -5898,7 +5898,7 @@ static void begin_alternative()
tok.next();
}
-void nop_request()
+static void nop_request()
{
while (tok.is_space())
tok.next();
@@ -5906,7 +5906,7 @@ void nop_request()
static int_stack if_else_stack;
-int do_if_request()
+static int do_if_request()
{
int invert = 0;
while (tok.is_space())
@@ -6057,7 +6057,7 @@ int do_if_request()
return result;
}
-void if_else_request()
+static void if_else_request()
{
if (!has_arg()) {
warning(WARN_MISSING, "if-else request expects arguments");
@@ -6067,7 +6067,7 @@ void if_else_request()
if_else_stack.push(do_if_request());
}
-void if_request()
+static void if_request()
{
if (!has_arg()) {
warning(WARN_MISSING, "if-then request expects arguments");
@@ -6077,7 +6077,7 @@ void if_request()
do_if_request();
}
-void else_request()
+static void else_request()
{
if (if_else_stack.is_empty()) {
warning(WARN_EL, "unbalanced 'el' request");
@@ -6094,7 +6094,7 @@ void else_request()
static int while_depth = 0;
static int while_break_flag = 0;
-void while_request()
+static void while_request()
{
// We can't use `has_arg()` here. XXX: Figure out why.
macro mac;
@@ -6155,7 +6155,7 @@ void while_request()
tok.next();
}
-void while_break_request()
+static void while_break_request()
{
if (!while_depth) {
error("cannot 'break' when not in a 'while' loop");
@@ -6169,7 +6169,7 @@ void while_break_request()
}
}
-void while_continue_request()
+static void while_continue_request()
{
if (!while_depth) {
error("cannot 'continue' when not in a 'while' loop");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 14/14: [troff]: Reduce symbol visibility.,
G. Branden Robinson <=