[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 11/39: [afmtodit]: Recognize --version as synonym of -v.
From: |
G. Branden Robinson |
Subject: |
[groff] 11/39: [afmtodit]: Recognize --version as synonym of -v. |
Date: |
Sun, 9 Oct 2022 23:53:36 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit b5e690cef1aa46e77ad9e5bb9bfe06d4b1f2a66f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Oct 9 01:08:26 2022 -0500
[afmtodit]: Recognize --version as synonym of -v.
* src/utils/afmtodit/afmtodit.pl: Recognize "--version" as synonym for
"-v". To achieve this, use Getopt::Long instead of Getopt::Std.
* src/utils/afmtodit/afmtodit.1.man (Synopsis, Options): Document it.
---
ChangeLog | 8 ++++++++
src/utils/afmtodit/afmtodit.1.man | 14 +++++++++-----
src/utils/afmtodit/afmtodit.pl | 8 +++++---
3 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 04c9a8470..9a64d8e21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-10-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/utils/afmtodit/afmtodit.pl: Recognize "--version" as
+ synonym for "-v". To achieve this, use Getopt::Long instead of
+ Getopt::Std.
+ * src/utils/afmtodit/afmtodit.1.man (Synopsis, Options):
+ Document it.
+
2022-10-09 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/devices/gropdf/pdfmom.pl: Recognize "--version" as synonym
diff --git a/src/utils/afmtodit/afmtodit.1.man
b/src/utils/afmtodit/afmtodit.1.man
index 1dca70201..c820df7ef 100644
--- a/src/utils/afmtodit/afmtodit.1.man
+++ b/src/utils/afmtodit/afmtodit.1.man
@@ -56,6 +56,9 @@ afmtodit \- adapt Adobe Font Metrics files for groff \-Tps
and \-Tpdf
.
.SY afmtodit
.B \-v
+.
+.SY afmtodit
+.B \-\-version
.YS
.
.
@@ -265,6 +268,12 @@ will automatically mount it when it is first used.
.SH Options
.\" ====================================================================
.
+.B \-v
+and
+.B \-\-version
+show version information and exit afterward.
+.
+.
.TP
.BI \-a\~ slant
Use
@@ -427,11 +436,6 @@ directive to the font description file.
.
.
.TP
-.B \-v
-Write version information to the standard output stream and exit.
-.
-.
-.TP
.B \-x
Don't use the built-in Adobe Glyph List.
.
diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl
index 79b2b9340..8778a27d5 100644
--- a/src/utils/afmtodit/afmtodit.pl
+++ b/src/utils/afmtodit/afmtodit.pl
@@ -28,12 +28,14 @@ $prog =~ s@.*/@@;
my $groff_sys_fontdir = "@FONTDIR@";
-use Getopt::Std;
-getopts('a:cd:e:f:i:kmno:svx');
-
our ($opt_a, $opt_c, $opt_d, $opt_e, $opt_f, $opt_i, $opt_k,
$opt_m, $opt_n, $opt_o, $opt_s, $opt_v, $opt_x);
+use Getopt::Long qw(:config gnu_getopt);
+GetOptions( "a=s", "c", "d=s", "e=s", "f=s", "i=s", "k", "m", "n",
+ "o=s", "s", "v", "x", "version" => \$opt_v
+);
+
my $afmtodit_version = "GNU afmtodit (groff) version @VERSION@";
if ($opt_v) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 11/39: [afmtodit]: Recognize --version as synonym of -v.,
G. Branden Robinson <=