groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 16/26: [soelim]: Expand usage message.


From: G. Branden Robinson
Subject: [groff] 16/26: [soelim]: Expand usage message.
Date: Thu, 14 Nov 2024 11:54:11 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 405c9e9b3293142b28947e8d9d1aff33bf327f69
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Nov 12 10:10:26 2024 -0600

    [soelim]: Expand usage message.
    
    ...with an actual description.
---
 ChangeLog                     |  1 +
 src/preproc/soelim/soelim.cpp | 17 ++++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index a769960ae..6295b7b3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
        `success` to Boolean `is_filename_valid`.  Use Boolean literals
        for assignments.
        (do_file): Adjust language of diagnostic message.
+       (usage): Expand usage message with an actual description.
 
 2024-11-12  G. Branden Robinson <g.branden.robinson@gmail.com>
 
diff --git a/src/preproc/soelim/soelim.cpp b/src/preproc/soelim/soelim.cpp
index 0b7fe8d4c..5b7d966fa 100644
--- a/src/preproc/soelim/soelim.cpp
+++ b/src/preproc/soelim/soelim.cpp
@@ -48,10 +48,25 @@ int do_file(const char *);
 
 void usage(FILE *stream)
 {
-  fprintf(stream, "usage: %s [-Crt] [-I dir] [file ...]\n"
+  fprintf(stream, "usage: %s [-Crt] [-I dir] [input-file ...]\n"
          "usage: %s {-v | --version}\n"
          "usage: %s --help\n",
          program_name, program_name, program_name);
+  if (stdout == stream)
+    fputs(
+"\n"
+"GNU soelim eliminates source requests in roff(7) input; it replaces\n"
+"lines of the form \".so included‐file\" within each text input-file\n"
+"with the contents of included-file, recursively.  By default, it\n"
+"writes \"lf\" requests as well to record the name and line number of\n"
+"each input-file and included-file, so that any diagnostics produced\n"
+"by later processing can be accurately traced to the original input.\n"
+"\n"
+"Use the -t option to produce TeX comments instead of roff requests.\n"
+"\n"
+"Use the -r option to process general text files, to flatten a tree\n"
+"of input documents.  See the soelim(1) manual page.\n",
+         stream);
 }
 
 int main(int argc, char **argv)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]