gbranden pushed a commit to branch master
in repository groff.

commit 02c814ff245f8a9858e00cab73eaff9042c62dd5
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Aug 13 11:39:14 2024 -0500

    [me]: Fix latent bug in `n1` and `n2` macros.
    
    * tmac/e.tmac (n1, n2): Invoke the renamed `po` request directly, not
      our wrapper for it.
    
    Fixes a latent issue with saturating arithmetic.
    
    Also annotate a test case.
---
 ChangeLog                            | 7 +++++++
 tmac/e.tmac                          | 4 ++--
 tmac/tests/e_line-numbering-works.sh | 2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 68149c4e3..4dba2196c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-08-13  G. Branden Robinson <[email protected]>
+
+       * tmac/e.tmac (n1, n2): Invoke the renamed `po` request
+       directly, not our wrapper for it.
+
+       Fixes a latent issue with saturating arithmetic.
+
 2024-08-13  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/div.cpp
diff --git a/tmac/e.tmac b/tmac/e.tmac
index 6d2b0582d..7f55c0be3 100644
--- a/tmac/e.tmac
+++ b/tmac/e.tmac
@@ -608,7 +608,7 @@
 .              ll -\\n(nou
 .\}
 .if !\\n(?N \
-.      po -\\n(nou
+.      @O -\\n(nou
 .nr ?n 1
 .do nr _#p \\n(.s
 .do nr _#f \\n(.f
@@ -658,7 +658,7 @@
 .              nr ?N 0
 .\}
 .      el \
-.              po +\\n(nou
+.              @O +\\n(nou
 .      nr ?n 0
 .      nr ln 0
 .\}
diff --git a/tmac/tests/e_line-numbering-works.sh 
b/tmac/tests/e_line-numbering-works.sh
index 427840e54..e33dd6b88 100755
--- a/tmac/tests/e_line-numbering-works.sh
+++ b/tmac/tests/e_line-numbering-works.sh
@@ -29,7 +29,7 @@ input='.nr pp 18 \\" to make troff output consistent with 
nroff
 Feck, vex loping bad jazz: quench my thirst.
 Feck, vex loping bad jazz: quench my thirst.
 .pp
-.n1 \\*C
+.n1 \\*C \\" we expect this to warn about a negative page offset
 Jackdaws love my big sphinx of quartz.
 Jackdaws love my big sphinx of quartz.
 Jackdaws love my big sphinx of quartz.

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to