[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 55/60: src/roff/troff/node.cpp: Trivially refactor.
From: |
G. Branden Robinson |
Subject: |
[groff] 55/60: src/roff/troff/node.cpp: Trivially refactor. |
Date: |
Wed, 11 Sep 2024 03:38:35 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 04e990d3d4d3fa945acbfdb98403bfe439fa9e98
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Sep 10 23:24:34 2024 -0500
src/roff/troff/node.cpp: Trivially refactor.
* src/roff/troff/node.cpp: Rename variables to better suggest their data
types.
`suppress_start_page` -> `suppression_starting_page_number`
(suppress_node::tprint):
`current_page` -> `page_number`
---
ChangeLog | 8 ++++++++
src/roff/troff/node.cpp | 19 ++++++++++---------
2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 73a84c025..f851c80e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-09-10 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/roff/troff/node.cpp: Trivially refactor; rename variables
+ to better suggest their data types.
+ `suppress_start_page` -> `suppression_starting_page_number`
+ (suppress_node::tprint):
+ `current_page` -> `page_number`
+
2024-09-10 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/troff/env.cpp (indent, temporary_indent): Report
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 58c4ab0e2..74b66672a 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -72,7 +72,7 @@ tfont *make_tfont(tfont_spec &);
*/
int image_no = 0;
-static int suppress_start_page = 0;
+static int suppression_starting_page_number = 0;
#define STORE_WIDTH 1
@@ -4151,7 +4151,7 @@ static int subimage_counter = 0;
void suppress_node::tprint(troff_output_file *out)
{
- int current_page = topdiv->get_page_number();
+ int page_number = topdiv->get_page_number();
// Does the node have an associated position and file name?
if (is_on == 2) {
// Save them for future bounding box limits.
@@ -4239,15 +4239,16 @@ void suppress_node::tprint(troff_output_file *out)
}
else {
// postscript (or other device)
- if (suppress_start_page > 0
- && (current_page != suppress_start_page))
+ if ((suppression_starting_page_number > 0)
+ && (page_number != suppression_starting_page_number))
error("suppression limit registers span more than a page;"
" grohtml-info for image %1 will be wrong", image_no);
- // if (topdiv->get_page_number() != suppress_start_page)
+ //if (topdiv->get_page_number()
+ // != suppression_starting_page_number)
// fprintf(stderr, "end of image and topdiv page = %d and"
- // " suppress_start_page = %d\n",
- // topdiv->get_page_number(), suppress_start_page);
-
+ // " suppression_starting_page_number = %d\n",
+ // topdiv->get_page_number(),
+ // suppression_starting_page_number);
// `name` will contain a "%d" in which the image_no is placed.
fprintf(stderr,
"grohtml-info:page %d %d %d %d %d %d %s %d %d"
@@ -4269,7 +4270,7 @@ void suppress_node::tprint(troff_output_file *out)
}
else
out->off();
- suppress_start_page = current_page;
+ suppression_starting_page_number = page_number;
}
} // is_on
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 55/60: src/roff/troff/node.cpp: Trivially refactor.,
G. Branden Robinson <=