groff-commit
[Top][All Lists]
Advanced

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

[groff] 08/27: [tfmtodit]: Tweak usage message.


From: G. Branden Robinson
Subject: [groff] 08/27: [tfmtodit]: Tweak usage message.
Date: Tue, 3 May 2022 14:27:15 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 708591b07ab9d300fb0b40c866b67c8176e34cd6
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon May 2 09:12:20 2022 -0500

    [tfmtodit]: Tweak usage message.
    
    * src/utils/tfmtodit/tfmtodit.cpp (usage): Tweak usage message.
      Condense `-v` and `--version` into a single output line with brace and
      pipe notation, which we do not use in our man pages, but consistently
      do in our usage messages.  Use lowercase for option arguments since
      they are separated from option flag letters by space.  Call
      `fprintf()` once instead of 3 times.
    
    Also update editor aid comments; drop old-style Emacs file-local
    variable setting.
---
 ChangeLog                       |  9 +++++++++
 src/utils/tfmtodit/tfmtodit.cpp | 14 +++++++++-----
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6363940c..8b312a9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-05-02  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/utils/tfmtodit/tfmtodit.cpp (usage): Tweak usage message.
+       Condense `-v` and `--version` into a single output line with
+       brace and pipe notation, which we do not use in our man pages,
+       but consistently do in our usage messages.  Use lowercase for
+       option arguments since they are separated from option flag
+       letters by space.  Call `fprintf()` once instead of 3 times.
+
 2022-05-01  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/preproc/refer/refer.cpp (main): Tweak wording of
diff --git a/src/utils/tfmtodit/tfmtodit.cpp b/src/utils/tfmtodit/tfmtodit.cpp
index 734beebc..b809c3e7 100644
--- a/src/utils/tfmtodit/tfmtodit.cpp
+++ b/src/utils/tfmtodit/tfmtodit.cpp
@@ -1,4 +1,3 @@
-// -*- C++ -*-
 /* Copyright (C) 1989-2020 Free Software Foundation, Inc.
      Written by James Clark (jjc@jclark.com)
 
@@ -875,8 +874,13 @@ int main(int argc, char **argv)
 
 static void usage(FILE *stream)
 {
-  fprintf(stream, "usage: %s [-s] [-g GF-FILE] [-k SKEW-CHAR] TFM-FILE"
-         " MAP-FILE FONT\n", program_name);
-  fprintf(stream, "usage: %s -v\n", program_name);
-  fprintf(stream, "usage: %s --version\n", program_name);
+  fprintf(stream,
+"usage: %s [-s] [-g gf-file] [-k skew-char] tfm-file map-file font\n"
+"usage: %s { -v | --version }\n", program_name, program_name);
 }
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:



reply via email to

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