[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 96/115: src/roff/troff/node.cpp: Trivially refactor (1/2).
From: |
G. Branden Robinson |
Subject: |
[groff] 96/115: src/roff/troff/node.cpp: Trivially refactor (1/2). |
Date: |
Thu, 1 Jun 2023 10:46:16 -0400 (EDT) |
gbranden pushed a commit to branch branden-2022-06-01
in repository groff.
commit b1f57e83958b367ed48f05d580339b061bcdc920
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat May 13 05:35:26 2023 -0500
src/roff/troff/node.cpp: Trivially refactor (1/2).
* src/roff/troff/node.cpp (font_translate, font_position, style)
(underline_font, define_font_special_character)
(remove_font_special_character, font_special_request, special_request)
(font_zoom_request, bold_font, track_kern, constant_space, ligature)
(kern_request, set_soft_hyphen_char): Declare functions as `static`.
---
ChangeLog | 9 +++++++++
src/roff/troff/node.cpp | 32 +++++++++++++++-----------------
2 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ddb5b600b..0c5dcb4d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-05-13 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/roff/troff/node.cpp (font_translate, font_position, style)
+ (underline_font, define_font_special_character)
+ (remove_font_special_character, font_special_request)
+ (special_request, font_zoom_request, bold_font, track_kern)
+ (constant_space, ligature, kern_request, set_soft_hyphen_char):
+ Declare functions as `static`.
+
2023-05-13 G. Branden Robinson <g.branden.robinson@gmail.com>
[troff]: Fix Savannah #64166.
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 304d25cc0..5fda6088b 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -6022,9 +6022,7 @@ bool mount_style(int n, symbol name)
return true;
}
-/* global functions */
-
-void font_translate()
+static void font_translate()
{
symbol from = get_name(true /* required */);
if (!from.is_null()) {
@@ -6037,7 +6035,7 @@ void font_translate()
skip_line();
}
-void font_position()
+static void font_position()
{
int n;
if (get_integer(&n)) {
@@ -6149,7 +6147,7 @@ void font_family::invalidate_fontno(int n)
}
}
-void style()
+static void style()
{
int n;
if (get_integer(&n)) {
@@ -6205,7 +6203,7 @@ static bool has_font(font_lookup_info *finfo)
static int underline_fontno = 2;
-void underline_font()
+static void underline_font()
{
font_lookup_info finfo;
if (!has_font(&finfo))
@@ -6220,7 +6218,7 @@ int get_underline_fontno()
return underline_fontno;
}
-void define_font_special_character()
+static void define_font_special_character()
{
font_lookup_info finfo;
if (!has_font(&finfo)) {
@@ -6236,7 +6234,7 @@ void define_font_special_character()
}
}
-void remove_font_special_character()
+static void remove_font_special_character()
{
font_lookup_info finfo;
if (!has_font(&finfo))
@@ -6287,7 +6285,7 @@ static void read_special_fonts(special_font_list **sp)
}
}
-void font_special_request()
+static void font_special_request()
{
font_lookup_info finfo;
if (!has_font(&finfo))
@@ -6298,13 +6296,13 @@ void font_special_request()
skip_line();
}
-void special_request()
+static void special_request()
{
read_special_fonts(&global_special_fonts);
skip_line();
}
-void font_zoom_request()
+static void font_zoom_request()
{
font_lookup_info finfo;
if (!has_font(&finfo))
@@ -6420,7 +6418,7 @@ hunits env_narrow_space_width(environment *env)
// units" (really one unit), or "stop conditionally emboldening font 2
// when font 1 is selected"?
-void bold_font()
+static void bold_font()
{
font_lookup_info finfo;
if (!(has_arg()))
@@ -6511,7 +6509,7 @@ hunits track_kerning_function::compute(int size)
return H0;
}
-void track_kern()
+static void track_kern()
{
font_lookup_info finfo;
if (!has_font(&finfo))
@@ -6535,7 +6533,7 @@ void track_kern()
skip_line();
}
-void constant_space()
+static void constant_space()
{
font_lookup_info finfo;
if (!has_font(&finfo))
@@ -6557,7 +6555,7 @@ void constant_space()
skip_line();
}
-void ligature()
+static void ligature()
{
int lig;
if (has_arg() && get_integer(&lig) && lig >= 0 && lig <= 2)
@@ -6567,7 +6565,7 @@ void ligature()
skip_line();
}
-void kern_request()
+static void kern_request()
{
int k;
if (has_arg() && get_integer(&k))
@@ -6577,7 +6575,7 @@ void kern_request()
skip_line();
}
-void set_soft_hyphen_char()
+static void set_soft_hyphen_char()
{
soft_hyphen_char = get_optional_char();
if (!soft_hyphen_char)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 96/115: src/roff/troff/node.cpp: Trivially refactor (1/2).,
G. Branden Robinson <=