gbranden pushed a commit to branch master
in repository groff.

commit dece7e31e7aa25e34b8cbcf4e67c0de8a464a830
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Mon Jun 2 15:33:12 2025 -0500

    doc/*,man/*: Clarify saturating arithmetic.
    
    AT&T troff arithmetic didn't wrap; that's historical GNU troff behavior.
    Instead, traditional troffs simply went haywire.
    
    Observe the following with Solaris 10, DWB 3.3, and Heirloom Doctools
    troffs.
    
    $ printf '.nr a 2147483647\n.tm \\na\n.nr a +1\n.tm \\na\n' \
      | DWBHOME=. ./bin/troff >/dev/null
    2147483647
    -./,),(-*,(
---
 doc/groff.texi.in | 10 +++++++---
 man/groff.7.man   | 14 +++++++-------
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 3560332b0..f0073aeba 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -6395,9 +6395,13 @@ range of 
 @cite{groff_tmac@r{(5)}} man page for the @file{62bit.tmac} macro
 package.}
 @cindex saturating arithmetic
-Arithmetic saturates rather than wrapping; if overflow would occur, GNU
-@command{troff} emits a warning in category @samp{range}
-(@pxref{Warnings}).
+Arithmetic saturates.@footnote{If overflow would
+occur,
+GNU
+@command{troff} @c GNU
+emits a warning in category
+@samp{range}.
+@xref{Warnings}.}
 
 @cindex arithmetic operators
 @cindex operators, arithmetic
diff --git a/man/groff.7.man b/man/groff.7.man
index e9928ae6c..55db13e17 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -368,8 +368,7 @@ GNU
 discards them upon reading.
 (It also emits a warning in category
 \[lq]input\[rq];
-see section \[lq]Warnings\[rq]
-of
+see section \[lq]Warnings\[rq] of
 .MR @g@troff @MAN1EXT@ .)
 .
 It processes
@@ -1083,12 +1082,13 @@ for the
 .I 62bit.tmac
 macro package.)
 .
-Arithmetic saturates rather than wrapping;
-if overflow would occur,
-.I @g@troff
+Arithmetic saturates.
+(If overflow would occur,
+GNU
+.I troff \" GNU
 emits a warning in category
-.RB \%\[lq] range \[rq]
-(see section \[lq]Warnings\[rq] of
+.RB \%\[lq] range \[rq].
+See section \[lq]Warnings\[rq] of
 .MR @g@troff 1 ).
 .
 .

_______________________________________________
groff-commit mailing list
groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to