gbranden pushed a commit to branch master
in repository groff.
commit 2dff5c98fd111308e1b4289965e2ec7aacd420ac
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Sep 17 06:50:28 2024 -0500
[troff]: Document new `pstream` request.
---
ChangeLog | 3 ++-
NEWS | 4 ++++
doc/groff.texi.in | 11 +++++++++++
man/groff.7.man | 9 +++++++++
man/groff_diff.7.man | 10 ++++++++++
5 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index c95fba554..1ff531f4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,7 +56,8 @@
* src/roff/troff/input.cpp (class grostream): Declare.
(grostream::grostream): Declare constructor.
(grostream::~grostream): Declare (trivial) destructor.
- (print_streams): Report mode in which the stream was opened.
+ (print_streams): Report mode in which the stream was opened and
+ name of file backing it.
(open_file, close_stream, do_write_request)
(write_macro_request): Migrate to expect an object of type
`grostream` from a `stream_dictionary.lookup()` instead of a
diff --git a/NEWS b/NEWS
index c78a1b57b..f2ca8dbe0 100644
--- a/NEWS
+++ b/NEWS
@@ -119,6 +119,10 @@ o A new request, `pline`, reports to the standard error
stream the list
of output nodes (an internal data structure) corresponding to
the pending output line. The list is empty if no such nodes exist.
+o A new request, `pstream`, reports to the standard error stream the
+ name of each stream opened with the `open` or `opena` requests,
+ the name of the file backing it, and its mode (writing or appending).
+
o The `pnr` request now accepts arguments. It treats each as
identifying a register and reports its properties to the standard
error stream.
diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 79665ea1d..f809fd9d1 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -16520,6 +16520,9 @@ append to it instead of truncating it.
It is an error to use these requests in safer mode; this is the default.
Give GNU @code{troff} or a front end program the @option{-U} option to
enable unsafe mode.
+
+The @code{pstream} request dumps the list of open streams to the
+standard error stream; @ref{Debugging}.
@endDefreq
@DefreqList {write, stream [@code{"}]@Var{contents}}
@@ -17223,6 +17226,14 @@ format of each register @var{reg}, or, without
arguments, those of all
defined registers, to the standard error stream.
@endDefreq
+@Defreq {pstream, }
+@cindex dumping open streams (@code{pstream})
+@cindex open streams, dumping (@code{pstream})
+@cindex streams, open, dumping (@code{pstream})
+Report, to the standard error stream, the name of each opened stream,
+the name of the file backing it, and its mode (writing or appending).
+@endDefreq
+
@Defreq {ptr, }
@cindex dumping page location traps (@code{ptr})
@cindex listing page location traps (@code{ptr})
diff --git a/man/groff.7.man b/man/groff.7.man
index 4a86d1998..1ae2b485b 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -4134,6 +4134,15 @@ Unsafe request;
disabled by default.
.
.TPx
+.REQ .pstream
+Report,
+to the standard error stream,
+the name of each opened stream,
+the name of the file backing it,
+and its mode
+(writing or appending).
+.
+.TPx
.REQ .ptr
Report names and positions of all page location traps to the standard
error stream.
diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index 385b1d883..25aeba8a8 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -3372,6 +3372,16 @@ except that input comes from the standard output stream
of
.
.
.TP
+.B .pstream
+Report,
+to the standard error stream,
+the name of each opened stream,
+the name of the file backing it,
+and its mode
+(writing or appending).
+.
+.
+.TP
.B .ptr
Report the names and vertical positions of all page location traps
to the standard error stream.
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit