gbranden pushed a commit to branch master
in repository groff.
commit 24407380891df27c19992cd7ba17aaf88c49063c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Aug 26 12:13:33 2024 -0500
[troff]: Make usage message more helpful.
* src/roff/troff/input.cpp (usage): If writing to the standard output
stream (the user requested `--help`), include a paragraph descriptive
of the program.
* src/roff/troff/troff.1.man: Sync language with the foregoing.
---
ChangeLog | 7 +++++++
src/roff/troff/input.cpp | 11 +++++++++++
src/roff/troff/troff.1.man | 3 ++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 5ffab3dec..4cfa9ae01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-08-26 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (usage): If writing to the standard
+ output stream (the user requested `--help`), include a paragraph
+ descriptive of the program.
+ * src/roff/troff/troff.1.man: Sync language with the foregoing.
+
2024-08-28 G. Branden Robinson <[email protected]>
* src/libs/libgroff/unicode.cpp (valid_unicode_code_sequence):
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index cf0d17acf..4adf3fa71 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -8435,6 +8435,17 @@ void usage(FILE *stream, const char *prog)
"usage: %s {-v | --version}\n"
"usage: %s {-h | --help}\n",
prog, prog, prog);
+ if (stdout == stream) {
+ fputs(
+"\n"
+"GNU troff transforms groff(7) language input into the deviceā"
+"independent output format detailed in groff_out(5); it is the heart of"
+"the GNU roff document formatting system. Many people prefer to use"
+"the groff(1) command, a front end that also runs preprocessors and"
+"output drivers in the appropriate order and with appropriate options."
+"See the troff(1) manual page.\n",
+ stream);
+ }
}
int main(int argc, char **argv)
diff --git a/src/roff/troff/troff.1.man b/src/roff/troff/troff.1.man
index 5192441a9..cd9ef16a6 100644
--- a/src/roff/troff/troff.1.man
+++ b/src/roff/troff/troff.1.man
@@ -108,7 +108,8 @@ GNU
.I troff \" GNU
transforms
.MR groff @MAN7EXT@
-language input into the device-independent output format described in
+language input into the device-independent page description language
+detailed in
.MR groff_out @MAN5EXT@ ;
.I @g@troff
is thus the heart of the GNU
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit