31 |
char *mh_optptr; |
char *mh_optptr; |
32 |
|
|
33 |
int |
int |
34 |
mh_getopt (int argc, char **argv, struct mh_option *mh_opt) |
mh_getopt (int argc, char **argv, struct mh_option *mh_opt, const char *doc) |
35 |
{ |
{ |
36 |
struct mh_option *p; |
struct mh_option *p; |
37 |
int optlen; |
int optlen; |
86 |
} |
} |
87 |
else if (!strcmp (mh_optptr+1, "help")) |
else if (!strcmp (mh_optptr+1, "help")) |
88 |
{ |
{ |
89 |
mh_help (mh_opt); |
mh_help (mh_opt, doc); |
90 |
exit (1); |
exit (1); |
91 |
} |
} |
92 |
return '?'; |
return '?'; |
93 |
} |
} |
94 |
|
|
95 |
void |
void |
96 |
mh_help (struct mh_option *mh_opt) |
mh_help (struct mh_option *mh_opt, const char *doc) |
97 |
{ |
{ |
98 |
struct mh_option *p; |
struct mh_option *p; |
99 |
|
|
100 |
printf ("Compatibility syntax:\n"); |
printf ("Compatibility syntax:\n"); |
101 |
printf ("%s [+folder] [msgs] [switches]\n", program_invocation_short_name); |
printf ("%s [switches] %s\n", program_invocation_short_name, doc); |
102 |
printf (" switches are:\n"); |
printf (" switches are:\n"); |
103 |
|
|
104 |
for (p = mh_opt; p->opt; p++) |
for (p = mh_opt; p->opt; p++) |
120 |
printf ("\n"); |
printf ("\n"); |
121 |
} |
} |
122 |
printf (" -help\n"); |
printf (" -help\n"); |
123 |
|
printf ("\nPlease use GNU long options instead. Run %s --help for more info on these.\n", program_invocation_short_name); |
124 |
} |
} |