Changeset 8f335a8
- Timestamp:
- Apr 19, 2013, 3:22:54 AM (11 years ago)
- Branches:
- master, release-1.10
- Children:
- 0625919
- Parents:
- 5175cf8
- git-author:
- Anders Kaseorg <andersk@mit.edu> (04/10/13 00:19:44)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (04/19/13 03:22:54)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zcrypt.c
r5175cf8 r8f335a8 16 16 #include <sys/wait.h> 17 17 #include <ctype.h> 18 #include <limits.h> 18 19 #include <getopt.h> 19 20 … … 117 118 } 118 119 120 void usage(FILE *file, const char *progname) 121 { 122 fprintf(file, "Usage: %s [-Z|-D|-E|-R|-S] [-F Keyfile] [-c class] [-i instance]\n", progname); 123 fprintf(file, " [-advqtluon] [-s signature] [-f arg] [-m message]\n"); 124 fprintf(file, " One or more of class, instance, and keyfile must be specified.\n"); 125 } 126 119 127 int main(int argc, char *argv[]) 120 128 { … … 135 143 enum { 136 144 OPT_VERSION = CHAR_MAX + 1, 145 OPT_HELP, 137 146 }; 138 147 static const struct option options[] = { 139 148 {"version", no_argument, NULL, OPT_VERSION}, 149 {"help", no_argument, NULL, OPT_HELP}, 140 150 {NULL, 0, NULL, 0} 141 151 }; … … 148 158 /* Version */ 149 159 printf("This is zcrypt version %s\n", OWL_VERSION_STRING); 160 exit(0); 161 case OPT_HELP: 162 /* Help */ 163 usage(stdout, argv[0]); 150 164 exit(0); 151 165 case 'Z': … … 280 294 if (error || !cryptspec) 281 295 { 282 fprintf(stderr, "Usage: %s [-Z|-D|-E|-R|-S] [-F Keyfile] [-c class] [-i instance]\n", argv[0]); 283 fprintf(stderr, " [-advqtluon] [-s signature] [-f arg] [-m message]\n"); 284 fprintf(stderr, " One or more of class, instance, and keyfile must be specified.\n"); 296 usage(stderr, argv[0]); 285 297 exit(1); 286 298 }
Note: See TracChangeset
for help on using the changeset viewer.