[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 96/126: [troff]: Trivially refactor.
From: |
G. Branden Robinson |
Subject: |
[groff] 96/126: [troff]: Trivially refactor. |
Date: |
Wed, 5 Jul 2023 17:03:15 -0400 (EDT) |
gbranden pushed a commit to branch branden-2023-07-05
in repository groff.
commit 4123c77a4592252068de0b71c6c6cbc89c3ca05e
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat May 6 20:41:42 2023 -0500
[troff]: Trivially refactor.
* src/roff/troff/input.cpp (top level, warnscale_request, main,
do_error): Rename global `warn_scaling_indicator` to
`warn_scaling_unit`, to align with our documentation.
---
ChangeLog | 8 ++++++++
src/roff/troff/input.cpp | 10 +++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b13619246..38eec09d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-05-06 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [troff]: Trivially refactor.
+
+ * src/roff/troff/input.cpp (top level, warnscale_request, main,
+ do_error): Rename global `warn_scaling_indicator` to
+ `warn_scaling_unit`, to align with our documentation.
+
2023-05-06 G. Branden Robinson <g.branden.robinson@gmail.com>
[troff]: Revise output warning diagnostic format.
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 59d9c2274..a51e1a545 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -116,7 +116,7 @@ bool have_multiple_params = false; // e.g., \[e aa],
\*[foo bar]
double spread_limit = -3.0 - 1.0; // negative means deactivated
double warn_scale;
-char warn_scaling_indicator;
+char warn_scaling_unit;
int debug_state = 0; // turns on debugging of the html troff state
search_path *mac_path = &safer_macro_path;
@@ -6927,7 +6927,7 @@ void warnscale_request()
"scaling unit '%1' invalid; using 'i' instead", c);
c = 'i';
}
- warn_scaling_indicator = c;
+ warn_scaling_unit = c;
}
skip_line();
}
@@ -8199,7 +8199,7 @@ int main(int argc, char **argv)
sizescale = font::sizescale;
device_has_tcommand = font::has_tcommand;
warn_scale = (double)units_per_inch;
- warn_scaling_indicator = 'i';
+ warn_scaling_unit = 'i';
if (!fflag && font::family != 0 && *font::family != '\0')
default_family = symbol(font::family);
font_size::init_size_table(font::sizes);
@@ -8818,13 +8818,13 @@ static void do_error(error_type type,
double fromtop = topdiv->get_vertical_position().to_units() \
/ warn_scale;
fprintf(stderr, "warning [page %d, %.1f%c",
- topdiv->get_page_number(), fromtop, warn_scaling_indicator);
+ topdiv->get_page_number(), fromtop, warn_scaling_unit);
if (topdiv != curdiv) {
double fromtop1 = curdiv->get_vertical_position().to_units()
/ warn_scale;
fprintf(stderr, " (diversion '%s', %.1f%c)",
curdiv->get_diversion_name(), fromtop1,
- warn_scaling_indicator);
+ warn_scaling_unit);
}
fprintf(stderr, "]: ");
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 96/126: [troff]: Trivially refactor.,
G. Branden Robinson <=