gbranden pushed a commit to branch master
in repository groff.
commit 7d402da4aa6e2d5282d564da1943447179c162c0
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Jan 1 23:36:58 2026 -0600
[troff]: Rename `ptr` request to `pwh`.
* src/roff/troff/div.cpp (init_div_requests): Do it.
* tmac/troffrc (ptr): Define macro advising user to migrate. Invoke
`pwh`.
* doc/groff.texi.in (Page Location Traps, The Implicit Page Trap,
Debugging):
* man/groff.7.man (Request short reference, Page location traps,
Debugging):
* man/groff_diff.7.man (New requests, Debugging): Update documentation.
Fixes <https://savannah.gnu.org/bugs/?67880>.
---
ChangeLog | 17 +++++++++++++++++
doc/groff.texi.in | 18 +++++++++---------
man/groff.7.man | 6 +++---
man/groff_diff.7.man | 4 ++--
src/roff/troff/div.cpp | 2 +-
tmac/troffrc | 7 +++++++
6 files changed, 39 insertions(+), 15 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2f774209e..a61fdd83f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2026-01-01 G. Branden Robinson <[email protected]>
+
+ [troff]: Rename `ptr` request to `pwh`.
+
+ * src/roff/troff/div.cpp (init_div_requests): Do it.
+ * tmac/troffrc (ptr): Define macro advising user to migrate.
+ Invoke `pwh`.
+
+ * doc/groff.texi.in (Page Location Traps, The Implicit Page
+ Trap, Debugging):
+ * man/groff.7.man (Request short reference, Page location traps,
+ Debugging):
+ * man/groff_diff.7.man (New requests, Debugging): Update
+ documentation.
+
+ Fixes <https://savannah.gnu.org/bugs/?67880>.
+
2026-01-09 G. Branden Robinson <[email protected]>
[pic]: Fix Savannah #67899.
diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 3edfa3f0e..ae1b9041e 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -17530,7 +17530,7 @@ the formatter does not convert it to an absolute
vertical position.
@cindex page location traps, debugging
@cindex debugging page location traps
We can use the
-@code{ptr}
+@code{pwh}
request to dump page location traps to the standard error stream
(@pxref{Debugging}).
GNU
@@ -17547,10 +17547,10 @@ device example follows.
@Example
.pl 5i
.wh -1i xx
-.ptr
+.pwh
@error{} xx -240
.pl 100i
-.ptr
+.pwh
@error{} xx -240
@endExample
@@ -17749,7 +17749,7 @@ not the expected behaviour.
@cindex page ejection
@cindex ejection, page
If, after starting GNU @code{troff} without loading a macro package, you
-use the @code{ptr} request to dump a list of the active traps to the
+use the @code{pwh} request to dump a list of the active traps to the
standard error stream,@footnote{@xref{Debugging}.} nothing is reported.
Yet the @code{.t} register will report a steadily decreasing value with
every output line your document produces, and once the value of
@@ -20567,11 +20567,11 @@ a pair of empty brackets
represents an empty list.
@endDefreq
-@Defreq {ptr, }
-@cindex dumping page location traps (@code{ptr})
-@cindex listing page location traps (@code{ptr})
-@cindex traps, page location, dumping (@code{ptr})
-@cindex traps, page location, listing (@code{ptr})
+@Defreq {pwh, }
+@cindex dumping page location traps (@code{pwh})
+@cindex listing page location traps (@code{pwh})
+@cindex traps, page location, dumping (@code{pwh})
+@cindex traps, page location, listing (@code{pwh})
Report the names and positions of all page location traps to the
standard error stream. GNU @command{troff} reports empty slots in the
list, where a trap had been planted but subsequently (re)moved, because
diff --git a/man/groff.7.man b/man/groff.7.man
index 1835351a3..a52ae74e5 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -4710,7 +4710,7 @@ and its mode
(writing or appending).
.
.TPx
-.REQ .ptr
+.REQ .pwh
Report names and positions of all page location traps to the standard
error stream.
.
@@ -8736,7 +8736,7 @@ page length;
the formatter does not convert it to an absolute vertical position.
.
We can use the
-.B ptr
+.B pwh
request to dump page location traps to the standard error stream;
see section \[lq]Debugging\[rq] below.
.
@@ -9542,7 +9542,7 @@ open streams
.RB ( pstream );
and
page location traps
-.RB ( ptr ).
+.RB ( pwh ).
.
Requests can also disclose
to the standard error stream
diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index 385a9b16a..0879c35d9 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -4018,7 +4018,7 @@ and its mode
.
.
.TP
-.B .ptr
+.B .pwh
Report the names and vertical positions,
in basic units,
of all page location traps
@@ -6182,7 +6182,7 @@ open streams
.RB ( pstream ),
and
page location traps
-.RB ( ptr ).
+.RB ( pwh ).
.
Requests can also disclose
to the standard error stream
diff --git a/src/roff/troff/div.cpp b/src/roff/troff/div.cpp
index 15a7f653e..cdd6c8916 100644
--- a/src/roff/troff/div.cpp
+++ b/src/roff/troff/div.cpp
@@ -1280,7 +1280,7 @@ void init_div_requests()
init_request("pl", configure_page_length_request);
init_request("pn", page_number);
init_request("po", configure_page_offset_request);
- init_request("ptr", print_traps);
+ init_request("pwh", print_traps);
init_request("rs", restore_spacing);
init_request("rt", return_request);
init_request("sp", space_request);
diff --git a/tmac/troffrc b/tmac/troffrc
index ca73b977f..198955c76 100644
--- a/tmac/troffrc
+++ b/tmac/troffrc
@@ -68,6 +68,13 @@ troffrc!html
.do mso pspic.tmac
.do mso pdfpic.tmac
.
+.do de ptr
+. tmc troffrc: groff 1.25 renamed the 'ptr' request to 'pwh';
+. tm1 " please migrate
+. pwh
+..
+.
+.
.\" Local Variables:
.\" mode: nroff
.\" fill-column: 72
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit