39 |
|
|
40 |
/* Number of child processes. */ |
/* Number of child processes. */ |
41 |
volatile size_t children; |
volatile size_t children; |
42 |
|
/* Should all the messages be undeleted on startup */ |
43 |
|
int undelete_on_startup; |
44 |
|
|
45 |
static int pop3d_mainloop __P ((int fd, FILE *, FILE *)); |
static int pop3d_mainloop __P ((int fd, FILE *, FILE *)); |
46 |
static void pop3d_daemon_init __P ((void)); |
static void pop3d_daemon_init __P ((void)); |
52 |
const char *program_version = "pop3d (" PACKAGE_STRING ")"; |
const char *program_version = "pop3d (" PACKAGE_STRING ")"; |
53 |
static char doc[] = N_("GNU pop3d -- the POP3 daemon"); |
static char doc[] = N_("GNU pop3d -- the POP3 daemon"); |
54 |
|
|
55 |
|
static struct argp_option options[] = { |
56 |
|
{"undelete", 'u', NULL, 0, |
57 |
|
N_("undelete all messages on startup"), 0}, |
58 |
|
{NULL, 0, NULL, 0, NULL, 0} |
59 |
|
}; |
60 |
|
|
61 |
static struct argp argp = { |
static struct argp argp = { |
62 |
NULL, |
options, |
63 |
pop3d_parse_opt, |
pop3d_parse_opt, |
64 |
NULL, |
NULL, |
65 |
doc, |
doc, |
88 |
case ARGP_KEY_INIT: |
case ARGP_KEY_INIT: |
89 |
astate->child_inputs[0] = astate->input; |
astate->child_inputs[0] = astate->input; |
90 |
break; |
break; |
91 |
|
|
92 |
|
case 'u': |
93 |
|
undelete_on_startup = 1; |
94 |
|
break; |
95 |
|
|
96 |
default: |
default: |
97 |
return ARGP_ERR_UNKNOWN; |
return ARGP_ERR_UNKNOWN; |