[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 26/44: [troff]: Make `pnr` report interpolation format.
From: |
G. Branden Robinson |
Subject: |
[groff] 26/44: [troff]: Make `pnr` report interpolation format. |
Date: |
Tue, 3 Sep 2024 08:05:45 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 88ddddc8f87c009b3f0ba1d9704aa7f8751a5d3b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Sep 3 03:01:38 2024 -0500
[troff]: Make `pnr` report interpolation format.
* src/roff/troff/reg.cpp (dump_register_request): Report the
interpolation format of each register at a further tab stop.
* doc/groff.texi.in (Debugging):
* man/groff.7.man (Request short reference):
* man/groff_diff.7.man (New requests):
* NEWS: Document it.
---
ChangeLog | 10 ++++++++++
NEWS | 3 +++
doc/groff.texi.in | 4 ++--
man/groff.7.man | 6 ++++--
man/groff_diff.7.man | 6 ++++--
src/roff/troff/reg.cpp | 17 ++++++++++-------
6 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dfe56d175..03b6f1a3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-09-03 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/roff/troff/reg.cpp (dump_register_request): Report the
+ interpolation format of each register at a further tab stop.
+
+ * doc/groff.texi.in (Debugging):
+ * man/groff.7.man (Request short reference):
+ * man/groff_diff.7.man (New requests):
+ * NEWS: Document it.
+
2024-09-03 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/troff/reg.cpp (dump_register_request): Fix code style
diff --git a/NEWS b/NEWS
index 2ec48998b..34064e761 100644
--- a/NEWS
+++ b/NEWS
@@ -53,6 +53,9 @@ o GNU troff now implements saturating rather than wrapping
integer
arithmetic. Where before overflow would cause an error diagnostic,
the formatter now emits a warning diagnostic in the "range" category.
+o The `pnr` request now additionally reports the interpolation format of
+ each register.
+
o The formatter no longer reports warnings in the "el" category. There
was only one; it threw a warning diagnostic if enabled (which it was
not by default) if it inferred an imbalance between `ie` and `el`
diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index d878358d6..97a1451da 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -17174,8 +17174,8 @@ strings, and diversions with their sizes in bytes.
@Defreq {pnr, }
@cindex dumping registers (@code{pnr})
@cindex registers, dumping (@code{pnr})
-Report the names and contents of all defined registers to the standard
-error stream.
+Report the names, contents, and assigned formats of all defined
+registers to the standard error stream.
@endDefreq
@Defreq {ptr, }
diff --git a/man/groff.7.man b/man/groff.7.man
index bb562f56d..6f3609e44 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -4036,8 +4036,10 @@ Set next page number.
.
.TPx
.REQ .pnr
-Report the names and contents of all defined registers to the standard
-error stream.
+Report the names,
+contents,
+and assigned formats
+of all defined registers to the standard error stream.
.
.TPx
.REQ .po
diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index f92503781..d96196b6a 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -3294,8 +3294,10 @@ The list is empty if there are none.
.
.TP
.B .pnr
-Write the names and values of all currently defined registers to the
-standard error stream.
+Report the names,
+contents,
+and assigned formats
+of all defined registers to the standard error stream.
.
.
.TP
diff --git a/src/roff/troff/reg.cpp b/src/roff/troff/reg.cpp
index 8cc3ba779..0e767eca9 100644
--- a/src/roff/troff/reg.cpp
+++ b/src/roff/troff/reg.cpp
@@ -508,13 +508,16 @@ void dump_register_request()
{
object_dictionary_iterator iter(register_dictionary);
reg *r;
- symbol s;
- while (iter.get(&s, reinterpret_cast<object **>(&r))) {
- assert(!s.is_null());
- errprint("%1\t", s.contents());
- const char *p = r->get_string();
- if (p)
- errprint(p);
+ symbol identifier;
+ while (iter.get(&identifier, reinterpret_cast<object **>(&r))) {
+ assert(!identifier.is_null());
+ errprint("%1\t", identifier.contents());
+ const char *value = r->get_string();
+ if (value)
+ errprint("%1", value);
+ const char *format = r->get_format();
+ if (format)
+ errprint("\t\%1", format);
errprint("\n");
}
fflush(stderr);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 26/44: [troff]: Make `pnr` report interpolation format.,
G. Branden Robinson <=