| 52 | } |
| 53 | |
| 54 | static void usage(const char* message) |
| 55 | { |
| 56 | if (*message=='-') |
| 57 | fprintf(stderr,"%s: unrecognized option '%s'\n",progname,message); |
| 58 | else |
| 59 | fprintf(stderr,"%s: %s\n",progname,message); |
| 60 | fprintf(stderr, |
| 61 | "usage: %s [options] [filenames]\n" |
| 62 | "Available options are:\n" |
| 63 | " -l list (use -l -l for full listing)\n" |
| 64 | " -o name output to file 'name' (default is \"%s\")\n" |
| 65 | " -p parse only\n" |
| 66 | " -s strip debug information\n" |
| 67 | " -v show version information\n" |
| 68 | " -- stop handling options\n" |
| 69 | " - stop handling options and process stdin\n" |
| 70 | ,progname,Output); |
| 71 | exit(EXIT_FAILURE); |
| 72 | } |
| 73 | |
| 74 | #define IS(s) (strcmp(argv[i],s)==0) |
| 75 | |