gbranden pushed a commit to branch master in repository groff. commit 4a2510cb872709ca12a3912208d619424fd5649e Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Fri Mar 21 15:28:10 2025 -0500
[tbl]: Fix Savannah #66931 (wrong `lf` requests). * src/preproc/tbl/table.cpp (set_troff_location): Fix logic error. When writing a *roff `lf` request with a file name argument, write out the actual corresponding input file line number instead of "1". Fixes <https://savannah.gnu.org/bugs/?66931>. Thanks to Bjarni Ingi Gislason for the report. Problem introduced by me in commit 25ef9f6bda, 26 February. --- ChangeLog | 13 +++++++++++++ src/preproc/tbl/table.cpp | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f741fc026..96f3733a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2025-03-21 G. Branden Robinson <g.branden.robin...@gmail.com> + + [tbl]: Fix Savannah #66931. + + * src/preproc/tbl/table.cpp (set_troff_location): Fix logic + error. When writing a *roff `lf` request with a file name + argument, write out the actual corresponding input file line + number instead of "1". + + Fixes <https://savannah.gnu.org/bugs/?66931>. Thanks to Bjarni + Ingi Gislason for the report. Problem introduced by me in + commit 25ef9f6bda, 26 February. + 2025-03-21 G. Branden Robinson <g.branden.robin...@gmail.com> [tbl]: Regression-test Savannah #66931. diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp index a6e8d229d..5c7ee13fb 100644 --- a/src/preproc/tbl/table.cpp +++ b/src/preproc/tbl/table.cpp @@ -3208,8 +3208,8 @@ void set_troff_location(const char *fn, int ln) string filename(fn); filename += '\0'; normalize_for_lf(filename); - printfs(".lf 1 %1%2\n", ('"' == filename[0]) ? "" : "\"", - filename.contents()); + printfs(".lf %1 %2%3\n", as_string(ln), + ('"' == filename[0]) ? "" : "\"", filename.contents()); last_filename = fn; location_force_filename = 0; _______________________________________________ groff-commit mailing list groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit