gbranden pushed a commit to branch master
in repository groff.
commit a5c9f1fed301d90d242fa9692bcb90d6c6e5a407
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Oct 28 04:52:30 2025 -0500
[tbl]: Rename `LEFTOVER_FACTOR_REG`.
* src/preproc/tbl/table.cpp: Rename macro storing name of *roff register
containing remainder when using the "expand" region option and
dividing the amount of unused line length by the number of
inter-column gaps, from `LEFTOVER_FACTOR_REG` to
`EXPANSION_REMAINDER_REG`.
(table::compute_separation_factor)
(table::compute_column_positions): Update interpolation sites.
---
ChangeLog | 10 ++++++++++
src/preproc/tbl/table.cpp | 8 ++++----
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3bee99d83..ad472eda4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-10-28 G. Branden Robinson <[email protected]>
+
+ * src/preproc/tbl/table.cpp: Rename macro storing name of *roff
+ register containing remainder when using the "expand" region
+ option and dividing the amount of unused line length by the
+ number of inter-column gaps, from `LEFTOVER_FACTOR_REG` to
+ `EXPANSION_REMAINDER_REG`.
+ (table::compute_separation_factor)
+ (table::compute_column_positions): Update interpolation sites.
+
2025-10-26 G. Branden Robinson <[email protected]>
* src/devices/grotty/tty.cpp (tty_printer::end_page): When using
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index 8e89eb0e6..5dd590b83 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -35,7 +35,7 @@ const int DEFAULT_COLUMN_SEPARATION = 3;
#define DELIMITER_CHAR "\\[tbl]"
#define SEPARATION_FACTOR_REG PREFIX "sep"
-#define LEFTOVER_FACTOR_REG PREFIX "leftover"
+#define EXPANSION_REMAINDER_REG PREFIX "leftover"
#define BOTTOM_REG PREFIX "bot"
#define RESET_MACRO_NAME PREFIX "init"
#define LINESIZE_REG PREFIX "lps"
@@ -2372,7 +2372,7 @@ void table::compute_separation_factor()
// Store the remainder for use in compute_column_positions().
if (flags & GAP_EXPAND) {
prints(".if n \\\n");
- prints(". nr " LEFTOVER_FACTOR_REG " \\n[.l]-\\n[.i]");
+ prints(". nr " EXPANSION_REMAINDER_REG " \\n[.l]-\\n[.i]");
for (int i = 0; i < ncolumns; i++)
printfs("-\\n[%1]", span_width_reg(i, i));
printfs("%%%1\n", as_string(total_separation));
@@ -2432,8 +2432,8 @@ void table::compute_column_positions()
// region option, put it prior to the last column so that the table
// looks as if expanded to the available line length.
if ((ncolumns > 2) && (flags & GAP_EXPAND) && (i == (ncolumns - 1)))
- printfs(".if n .if \\n[" LEFTOVER_FACTOR_REG "] .nr %1 +(1n>?\\n["
- LEFTOVER_FACTOR_REG "])\n",
+ printfs(".if n .if \\n[" EXPANSION_REMAINDER_REG "]"
+ " .nr %1 +(1n>?\\n[" EXPANSION_REMAINDER_REG "])\n",
column_start_reg(i));
printfs(".nr %1 \\n[%2]+\\n[%3]/2\n",
column_divide_reg(i),
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit