gbranden pushed a commit to branch master
in repository groff.
commit 496530512d152615bc9c7f8ba1bff773b2c54be7
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Oct 4 05:05:45 2024 -0500
[tbl]: Use `\n[.R]`, not INT_MAX literal.
* src/preproc/tbl/table.cpp (table::init_output): Migrate to use of `.R`
register for a huge value in generated groff language, instead of
hard-coding (2^31)-1 as a numeric literal.
---
ChangeLog | 6 ++++++
src/preproc/tbl/table.cpp | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index eb4d70e5c..63a1fb07f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-04 G. Branden Robinson <[email protected]>
+
+ * src/preproc/tbl/table.cpp (table::init_output): Migrate to use
+ of `.R` register for a huge value in generated groff language,
+ instead of hard-coding (2^31)-1 as a numeric literal.
+
2024-10-04 G. Branden Robinson <[email protected]>
* src/preproc/tbl/table.cpp: Add C preprocessor macro storing
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index a3cbf4b4a..4a3b30b03 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -2021,7 +2021,7 @@ void table::init_output()
".nr ln 0\n"
".nr " SAVED_NUMBERING_ENABLED " \\n[.nm]\n"
".nr " SAVED_NUMBERING_SUPPRESSION_COUNT " \\n[.nn]\n"
- ".nn 2147483647\n"); // 2^31-1; inelegant but effective
+ ".nn \\n[.R]\n"); // INT_MAX as of groff 1.24
prints(".nf\n");
}
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit