26 |
options = OPTION_DETAILS_NORMAL; |
options = OPTION_DETAILS_NORMAL; |
27 |
account.logfile[0] = 0; |
account.logfile[0] = 0; |
28 |
|
|
29 |
while ((c = getopt(argc, argv, "hl:qtvc:L")) != -1) { |
while ((c = getopt(argc, argv, "c:hl:qstv")) != -1) { |
30 |
switch (c) { |
switch (c) { |
31 |
|
case 'c': |
32 |
|
config = optarg; |
33 |
|
break; |
34 |
case 'h': |
case 'h': |
35 |
usage(); |
usage(); |
36 |
exit(1); |
exit(1); |
42 |
options &= OPTION_DETAILS_CLEAR; |
options &= OPTION_DETAILS_CLEAR; |
43 |
options |= OPTION_DETAILS_QUITE; |
options |= OPTION_DETAILS_QUITE; |
44 |
break; |
break; |
45 |
|
case 's': |
46 |
|
options |= OPTION_SHOW_HEADERS; |
47 |
|
break; |
48 |
case 't': |
case 't': |
49 |
options |= OPTION_TEST_MODE; |
options |= OPTION_TEST_MODE; |
50 |
break; |
break; |
52 |
options &= OPTION_DETAILS_CLEAR; |
options &= OPTION_DETAILS_CLEAR; |
53 |
options |= OPTION_DETAILS_VERBOSE; |
options |= OPTION_DETAILS_VERBOSE; |
54 |
break; |
break; |
|
case 'c': |
|
|
config = optarg; |
|
|
break; |
|
|
case 'L': |
|
|
options |= OPTION_LOGGING_DISABLED; |
|
|
break; |
|
55 |
default: |
default: |
56 |
usage(); |
usage(); |
57 |
exit(1); |
exit(1); |
107 |
|
|
108 |
|
|
109 |
/* |
/* |
110 |
* Prints a summary of prorgam's options. |
* Prints a very brief usage message. |
111 |
*/ |
*/ |
112 |
void usage(void) |
void usage(void) |
113 |
{ |
{ |
114 |
fprintf(stderr, |
fprintf(stderr, |
115 |
"usage: imapfilter [-hqtvL] [-c configfile] [-l logfile]\n"); |
"usage: imapfilter [-hqstv] [-c configfile] [-l logfile]\n"); |
116 |
} |
} |