Changeset 3564 for format-plugins/vformat
- Timestamp:
- 08/19/08 14:22:31 (4 months ago)
- Files:
-
- 1 modified
-
format-plugins/vformat/tools/vconvert.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
format-plugins/vformat/tools/vconvert.c
r2795 r3564 39 39 static void usage (char *name, int ecode) 40 40 { 41 fprintf (stderr, "Usage: %s <file> <switches>\n", name); 41 fprintf (stderr, "Usage: %s <file> <switches>\n\n", name); 42 fprintf (stderr, "Switches:\n"); 43 fprintf (stderr, "--help\t\tShow this help message\n"); 42 44 fprintf (stderr, "--out <file>\tStore the output in this file (No output to stdout)\n"); 43 45 fprintf (stderr, "--to-vcard21\tConvert to vcard 2.1\n"); … … 281 283 usage (argv[0], 1); 282 284 285 if (!strcmp (argv[1], "--help")) 286 usage (argv[0], 0); 287 283 288 char *filename = argv[1]; 284 289 char *output = NULL; … … 289 294 for (i = 2; i < argc; i++) { 290 295 char *arg = argv[i]; 291 if (!strcmp (arg, "--to-vcard21")) { 296 if (!strcmp (arg, "--help")) { 297 usage (argv[0], 0); 298 } else if (!strcmp (arg, "--to-vcard21")) { 292 299 type = TARGET_VCARD_21; 293 300 } else if (!strcmp (arg, "--to-vcard30")) { … … 312 319 if (!output) 313 320 usage (argv[0], 1); 314 } else if (!strcmp (arg, "--help")) {315 usage (argv[0], 0);316 321 } else if (!strcmp (arg, "--")) { 317 322 break; … … 336 341 } 337 342 343 // read file 338 344 char *buffer; 339 345 unsigned int size;
