diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1999-05-24 02:11:42 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1999-05-24 02:11:42 +0000 |
commit | 0044de2ef658703e40c2d4ed7374243940eea6e7 (patch) | |
tree | cdfd5eebc8dec16a2030d80c26fddc078e4c4c71 /lib/libkeynote/keynote-main.c | |
parent | 543d22541329c09638033dc250e49bff4834bbaa (diff) |
Update Makefile, fix README, add a proper usage in keynote-main.c
Diffstat (limited to 'lib/libkeynote/keynote-main.c')
-rw-r--r-- | lib/libkeynote/keynote-main.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/libkeynote/keynote-main.c b/lib/libkeynote/keynote-main.c index 44115fd798e..f1c703eea3f 100644 --- a/lib/libkeynote/keynote-main.c +++ b/lib/libkeynote/keynote-main.c @@ -1,3 +1,5 @@ +/* $OpenBSD: keynote-main.c,v 1.3 1999/05/24 02:11:41 angelos Exp $ */ + /* * The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu) * @@ -36,6 +38,16 @@ extern int keynote_sign(int, char **), keynote_sigver(int, char **); extern int keynote_verify(int, char **), keynote_keygen(int, char **); +void +mainusage() +{ + fprintf(stderr, "Usage:\n"); + fprintf(stderr, "\tsign ...\n"); + fprintf(stderr, "\tsigver ...\n"); + fprintf(stderr, "\tverify ...\n"); + fprintf(stderr, "\tkeygen ...\n"); +} + #ifdef WIN32 void #else @@ -45,7 +57,7 @@ main(int argc, char *argv[]) { if (argc < 2) { - fprintf(stderr, "Insufficient number of arguments.\n"); + mainusage(); exit(-1); } @@ -61,10 +73,6 @@ main(int argc, char *argv[]) if (!strcmp(argv[1], "keygen")) keynote_keygen(argc - 1, argv + 1); - fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\tsign ...\n"); - fprintf(stderr, "\tsigver ...\n"); - fprintf(stderr, "\tverify ...\n"); - fprintf(stderr, "\tkeygen ...\n"); + mainusage(); exit(-1); } |