mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
When Unix PuTTYgen gives brief usage information, it should mention "--help"!
[originally from svn r6732]
This commit is contained in:
parent
d75ab2b509
commit
b1997cc32c
11
cmdgen.c
11
cmdgen.c
@ -124,13 +124,16 @@ void showversion(void)
|
|||||||
sfree(verstr);
|
sfree(verstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void usage(void)
|
void usage(int standalone)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: puttygen ( keyfile | -t type [ -b bits ] )\n"
|
"Usage: puttygen ( keyfile | -t type [ -b bits ] )\n"
|
||||||
" [ -C comment ] [ -P ]\n"
|
" [ -C comment ] [ -P ]\n"
|
||||||
" [ -o output-keyfile ] [ -O type | -l | -L"
|
" [ -o output-keyfile ] [ -O type | -l | -L"
|
||||||
" | -p ]\n");
|
" | -p ]\n");
|
||||||
|
if (standalone)
|
||||||
|
fprintf(stderr,
|
||||||
|
"Use \"puttygen --help\" for more detail.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void help(void)
|
void help(void)
|
||||||
@ -140,7 +143,7 @@ void help(void)
|
|||||||
* start with that, plus a version heading.
|
* start with that, plus a version heading.
|
||||||
*/
|
*/
|
||||||
showversion();
|
showversion();
|
||||||
usage();
|
usage(FALSE);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
" -t specify key type when generating (rsa, dsa, rsa1)\n"
|
" -t specify key type when generating (rsa, dsa, rsa1)\n"
|
||||||
" -b specify number of bits when generating key\n"
|
" -b specify number of bits when generating key\n"
|
||||||
@ -282,7 +285,7 @@ int main(int argc, char **argv)
|
|||||||
* return success.
|
* return success.
|
||||||
*/
|
*/
|
||||||
if (argc <= 1) {
|
if (argc <= 1) {
|
||||||
usage();
|
usage(TRUE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -475,7 +478,7 @@ int main(int argc, char **argv)
|
|||||||
* ones, print the usage message and return failure.
|
* ones, print the usage message and return failure.
|
||||||
*/
|
*/
|
||||||
if (!infile && keytype == NOKEYGEN) {
|
if (!infile && keytype == NOKEYGEN) {
|
||||||
usage();
|
usage(TRUE);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user