When Unix PuTTYgen gives brief usage information, it should mention "--help"!
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sat, 17 Jun 2006 13:01:04 +0000 (13:01 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sat, 17 Jun 2006 13:01:04 +0000 (13:01 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@6732 cda61777-01e9-0310-a592-d414129be87e

cmdgen.c

index 36da55e..e46e697 100644 (file)
--- a/cmdgen.c
+++ b/cmdgen.c
@@ -124,13 +124,16 @@ void showversion(void)
     sfree(verstr);
 }
 
-void usage(void)
+void usage(int standalone)
 {
     fprintf(stderr,
            "Usage: puttygen ( keyfile | -t type [ -b bits ] )\n"
            "                [ -C comment ] [ -P ]\n"
            "                [ -o output-keyfile ] [ -O type | -l | -L"
            " | -p ]\n");
+    if (standalone)
+       fprintf(stderr,
+               "Use \"puttygen --help\" for more detail.\n");
 }
 
 void help(void)
@@ -140,7 +143,7 @@ void help(void)
      * start with that, plus a version heading.
      */
     showversion();
-    usage();
+    usage(FALSE);
     fprintf(stderr,
            "  -t    specify key type when generating (rsa, dsa, rsa1)\n"
            "  -b    specify number of bits when generating key\n"
@@ -282,7 +285,7 @@ int main(int argc, char **argv)
      * return success.
      */
     if (argc <= 1) {
-       usage();
+       usage(TRUE);
        return 0;
     }
 
@@ -475,7 +478,7 @@ int main(int argc, char **argv)
      * ones, print the usage message and return failure.
      */
     if (!infile && keytype == NOKEYGEN) {
-       usage();
+       usage(TRUE);
        return 1;
     }