gbranden pushed a commit to branch master
in repository groff.

commit 635e3cac085a46a27b7c2b6e0b1e8b0f631f858b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Dec 9 02:51:07 2024 -0600

    [afmtodit]: Adjust usage message.
    
    * src/utils/afmtodit/afmtodit.pl: Use $0 in the usage message for
      consistency with groff's C++ programs.  This also informs the user
      with multiple versions available which they are running.
---
 ChangeLog                      | 7 +++++++
 src/utils/afmtodit/afmtodit.pl | 9 ++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2a7304025..e19decbe2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-12-09  G. Branden Robinson <[email protected]>
+
+       * src/utils/afmtodit/afmtodit.pl: Use $0 in the usage message
+       for consistency with groff's C++ programs.  This also informs
+       the user with multiple versions available which they are
+       running.
+
 2024-12-09  G. Branden Robinson <[email protected]>
 
        * src/utils/afmtodit/afmtodit.am: Simplify.
diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl
index 519fb8df9..b06768a97 100644
--- a/src/utils/afmtodit/afmtodit.pl
+++ b/src/utils/afmtodit/afmtodit.pl
@@ -67,17 +67,20 @@ sub whine {
   print STDERR "$prog: warning: $msg\n";
 }
 
+# Use $0 in the usage message for consistency with groff's C++ programs.
+# This also informs the user with multiple versions available which they
+# are running.
 sub usage {
     my $stream = *STDOUT;
     my $had_error = shift;
     $stream = *STDERR if $had_error;
-    print $stream "usage: $prog [-ckmnsx] [-a slant]" .
+    print $stream "usage: $0 [-ckmnsx] [-a slant]" .
        " [-d device-description-file] [-e encoding-file]" .
        " [-f internal-name] [-i italic-correction-factor]" .
        " [-o output-file] [-w space-width] afm-file map-file" .
        " font-description-file\n" .
-       "usage: $prog {-v | --version}\n" .
-       "usage: $prog --help\n";
+       "usage: $0 {-v | --version}\n" .
+       "usage: $0 --help\n";
     unless ($had_error) {
        print $stream "\n" .
 "Adapt an Adobe Font Metric file, afm-file, for use with the 'ps'\n" .

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to