groff-commit
[Top][All Lists]
Advanced

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

[groff] 52/78: [gropdf]: Add support for --help option to pdfmom.


From: G. Branden Robinson
Subject: [groff] 52/78: [gropdf]: Add support for --help option to pdfmom.
Date: Fri, 7 Apr 2023 12:17:56 -0400 (EDT)

gbranden pushed a commit to branch branden-2023-04-07
in repository groff.

commit cfb2219a00b2a2f63df7d5e837802a59e4db5a29
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Apr 1 13:19:08 2023 -0500

    [gropdf]: Add support for --help option to pdfmom.
    
    * src/devices/gropdf/pdfmom.pl: Do it.
    * src/devices/gropdf/pdfmom.1.man (Synopsis, Options): Document it.
---
 ChangeLog                       |  8 ++++++++
 src/devices/gropdf/pdfmom.1.man | 10 +++++++---
 src/devices/gropdf/pdfmom.pl    |  8 ++++++++
 3 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 34113b333..b4fc0dfb7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-04-01  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [gropdf]: Add support for "--help" option to pdfmom.
+
+       * src/devices/gropdf/pdfmom.pl: Do it.
+       * src/devices/gropdf/pdfmom.1.man (Synopsis, Options): Document
+       it.
+
 2023-03-16  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [gropdf]: Drop pdfmom's new '-roff' option, retaining '--roff'.
diff --git a/src/devices/gropdf/pdfmom.1.man b/src/devices/gropdf/pdfmom.1.man
index 1bbaaaf70..ce8d7b793 100644
--- a/src/devices/gropdf/pdfmom.1.man
+++ b/src/devices/gropdf/pdfmom.1.man
@@ -55,7 +55,7 @@ macro package for
 .SY pdfmom
 .RB [ \-\-roff ]
 .RB [ \-Tpdf ]
-.RI [ groff-options ]
+.RI [ groff-option\~ .\|.\|.\&]
 .RI [ file\~ .\|.\|.]
 .YS
 .
@@ -63,8 +63,8 @@ macro package for
 .SY pdfmom
 .RB [ \-\-roff ]
 .B \-Tps
-.RI [ pdfroff-options ]
-.RI [ groff-options ]
+.RI [ pdfroff-option\~ .\|.\|.\&]
+.RI [ groff-option\~ .\|.\|.\&]
 .RI [ file\~ .\|.\|.]
 .YS
 .
@@ -194,6 +194,10 @@ options,
 .I pdfmom
 displays its version information and exits.
 .
+Using the
+.B \-\-help
+option displays a usage message and exits.
+.
 .
 .\" ====================================================================
 .SH Authors
diff --git a/src/devices/gropdf/pdfmom.pl b/src/devices/gropdf/pdfmom.pl
index 93a04410f..74591e2bb 100644
--- a/src/devices/gropdf/pdfmom.pl
+++ b/src/devices/gropdf/pdfmom.pl
@@ -90,6 +90,14 @@ while (my $c=shift)
     {
         $mom='';
     }
+    elsif ($c eq '--help')
+    {
+       print "usage: pdfmom [--roff] [-Tpdf] [groff-option ...] [file ...]\n";
+       print "usage: pdfmom [--roff] -Tps [pdfroff-option ...] [groff-option 
...] [file ...]\n";
+       print "usage: pdfmom {-v | --version}\n";
+       print "usage: pdfmom --help\n";
+       exit;
+    }
     elsif ($c eq '-v' or $c eq '--version')
     {
        print "GNU pdfmom (groff) version @VERSION@\n";



reply via email to

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