gbranden pushed a commit to branch master
in repository groff.
commit 07cdb3532e0825a02af5e8d2da10b023e005df18
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Jun 26 13:49:49 2026 -0500
[tbl]: Tighten symbol visibility. (1/2)
* src/preproc/tbl/main.cpp (strieq, process_options)
(free_input_entry_format_list, process_format, process_data): Define
functions as `static`; they do not require external linkage.
---
ChangeLog | 7 +++++++
src/preproc/tbl/main.cpp | 14 +++++++-------
src/preproc/tbl/table.cpp | 4 ++--
3 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f9613de9f..04c896701 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-06-26 G. Branden Robinson <[email protected]>
+
+ * src/preproc/tbl/main.cpp (strieq, process_options)
+ (free_input_entry_format_list, process_format, process_data):
+ Define functions as `static`; they do not require external
+ linkage.
+
2026-06-26 G. Branden Robinson <[email protected]>
* src/libs/libgroff/string.cpp (put_string): Make `NDEBUG`-safe.
diff --git a/src/preproc/tbl/main.cpp b/src/preproc/tbl/main.cpp
index 216143c0d..918b36e59 100644
--- a/src/preproc/tbl/main.cpp
+++ b/src/preproc/tbl/main.cpp
@@ -373,8 +373,8 @@ options::options()
}
// Return non-zero if p and q are the same ignoring case.
-
-int strieq(const char *p, const char *q)
+// TODO: boolify
+static int strieq(const char *p, const char *q)
{
for (; cmlower(*p) == cmlower(*q); p++, q++)
if (*p == '\0')
@@ -384,7 +384,7 @@ int strieq(const char *p, const char *q)
// Handle region options. Return a null pointer if we should give up on
// this table.
-options *process_options(table_input &in)
+static options *process_options(table_input &in)
{
options *opt = new options;
string line;
@@ -748,7 +748,7 @@ input_entry_format::~input_entry_format()
{
}
-void free_input_entry_format_list(input_entry_format *list)
+static void free_input_entry_format_list(input_entry_format *list)
{
while (list) {
input_entry_format *tem = list;
@@ -785,8 +785,8 @@ void input_entry_format::debug_print()
// pointer if we should give up on this table. If this is a
// continuation format line, `current_format` will be the current format
// line.
-format *process_format(table_input &in, options *opt,
- format *current_format = 0)
+static format *process_format(table_input &in, options *opt,
+ format *current_format = 0 /* nullptr */)
{
input_entry_format *list = 0 /* nullptr */;
bool have_expand = false;
@@ -1315,7 +1315,7 @@ format *process_format(table_input &in, options *opt,
return f;
}
-table *process_data(table_input &in, format *f, options *opt)
+static table *process_data(table_input &in, format *f, options *opt)
{
char tab_char = opt->tab_char;
int ncolumns = f->ncolumns;
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index 5b75dfcc6..a3ff27704 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -2150,7 +2150,7 @@ string row_top_reg(int row)
return string(name);
}
-void init_span_reg(int start_col, int end_col)
+static void init_span_reg(int start_col, int end_col)
{
printfs(".nr %1 \\n(.H\n.nr %2 0\n.nr %3 0\n.nr %4 0\n",
span_width_reg(start_col, end_col),
@@ -2159,7 +2159,7 @@ void init_span_reg(int start_col, int end_col)
span_right_numeric_width_reg(start_col, end_col));
}
-void compute_span_width(int start_col, int end_col)
+static void compute_span_width(int start_col, int end_col)
{
printfs(".nr %1 \\n[%1]>?(\\n[%2]+\\n[%3])\n"
".if \\n[%4] .nr %1 \\n[%1]>?(\\n[%4]+2n)\n",
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit