groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/04: [pre-grohtml]: Update command synopsis.


From: G. Branden Robinson
Subject: [groff] 01/04: [pre-grohtml]: Update command synopsis.
Date: Mon, 27 Jun 2022 16:49:42 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 7934fbcc33014a7e652d29e186482b7be785fd1d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Jun 25 16:21:03 2022 -0500

    [pre-grohtml]: Update command synopsis.
    
    * src/preproc/html/pre-html.cpp (usage): Clarify; the proprocessor
      doesn't simply take file operands but will accept a [gt]troff command
      with options and operands.
    * src/devices/grohtml/grohtml.1.man (Synopsis): Sync with the above.
---
 src/devices/grohtml/grohtml.1.man |  4 +++-
 src/preproc/html/pre-html.cpp     | 26 ++++++++++++++------------
 2 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/src/devices/grohtml/grohtml.1.man 
b/src/devices/grohtml/grohtml.1.man
index dc27b8ac..214db9bd 100644
--- a/src/devices/grohtml/grohtml.1.man
+++ b/src/devices/grohtml/grohtml.1.man
@@ -52,7 +52,9 @@ grohtml, post\-grohtml, pre\-grohtml \- groff output driver 
for HTML
 .IR image-vertical-offset ]
 .RB [ \-x
 .IR  html-dialect ]
-.RI [ file\~ .\|.\|.]
+.RI [ troff-command ]
+.RI [ troff-argument ]
+\&.\|.\|.]
 .YS
 .
 .
diff --git a/src/preproc/html/pre-html.cpp b/src/preproc/html/pre-html.cpp
index a3e09db0..50ca4953 100644
--- a/src/preproc/html/pre-html.cpp
+++ b/src/preproc/html/pre-html.cpp
@@ -1585,7 +1585,7 @@ int char_buffer::do_image(int argc, char *argv[])
 static char_buffer inputFile;
 
 /*
- *  usage - Emit usage arguments.
+ *  usage - Emit usage message.
  */
 
 static void usage(FILE *stream)
@@ -1594,17 +1594,19 @@ static void usage(FILE *stream)
          " [-D IMAGE-DIRECTORY] [-F FONT-DIRECTORY]"
          " [-g ANTI-ALIASING-GRAPHICS-BITS] [-i RESOLUTION]"
          " [-I IMAGE-STEM] [-o IMAGE-VERTICAL-OFFSET]"
-         " [-x HTML-DIALECT] [FILE ...]\n"
-         "usage: %s -v\n"
-         "\n"
-         "This program is not intended to be called stand-alone;\n"
-         "it is part of the groff pipeline to produce HTML output.\n"
-         "\n"
-         "If there is ever the need to call it manually (e.g., for\n"
-         "debugging purposes), add command-line option '-V' while\n"
-         "calling the 'groff' program to see which arguments are\n"
-         "passed to it.\n"
-         "\n", program_name, program_name);
+         " [-x HTML-DIALECT] [TROFF-COMMAND] [TROFF-ARGUMENT] ...\n"
+         "usage: %s -v\n", program_name, program_name);
+  fputs(
+"\n"
+"This program is not intended to be executed standalone; it is\n"
+"normally part of a groff pipeline for producing HTML output.\n"
+"\n"
+"If your need to call it manually (e.g., for debugging purposes),\n"
+"give the 'groff' program the command-line option '-V' to inspect\n",
+       stream);
+  fprintf(stream, "the arguments with which '%s' is called.\n",
+      program_name);
+  fputs("\nSee grohtml(1).\n", stream);
 }
 
 /*



reply via email to

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