27 |
static struct argp_option options[] = { |
static struct argp_option options[] = { |
28 |
{"folder", 'f', "FOLDER", 0, "Specify folder to operate upon"}, |
{"folder", 'f', "FOLDER", 0, "Specify folder to operate upon"}, |
29 |
{"draft", 'd', NULL, 0, "Use <mh-dir>/draft as the source message"}, |
{"draft", 'd', NULL, 0, "Use <mh-dir>/draft as the source message"}, |
30 |
{"link", 'l', "BOOL", OPTION_ARG_OPTIONAL, "Preserve the source folder copy"}, |
{"link", 'l', "BOOL", OPTION_ARG_OPTIONAL, "(not implemented) Preserve the source folder copy"}, |
31 |
{"preserve", 'p', "BOOL", OPTION_ARG_OPTIONAL, "Try to preserve message sequence numbers"}, |
{"preserve", 'p', "BOOL", OPTION_ARG_OPTIONAL, "(not implemented) Try to preserve message sequence numbers"}, |
32 |
{"source", 's', "FOLDER", 0, "Specify source folder. FOLDER will became the current folder after the program exits."}, |
{"source", 's', "FOLDER", 0, "Specify source folder. FOLDER will became the current folder after the program exits."}, |
33 |
{"src", 0, NULL, OPTION_ALIAS, NULL}, |
{"src", 0, NULL, OPTION_ALIAS, NULL}, |
34 |
{"file", 'F', "FILE", 0, "Use FILE as the source message"}, |
{"file", 'F', "FILE", 0, "Use FILE as the source message"}, |
136 |
break; |
break; |
137 |
|
|
138 |
case 'l': |
case 'l': |
139 |
link_flag = arg[0] == 'y'; |
link_flag = is_true(arg); |
140 |
break; |
break; |
141 |
|
|
142 |
case 'p': |
case 'p': |
143 |
preserve_flag = arg[0] == 'y'; |
preserve_flag = is_true(arg); |
144 |
break; |
break; |
145 |
|
|
146 |
case 's': |
case 's': |
158 |
} |
} |
159 |
|
|
160 |
void |
void |
161 |
_close_folder (void *unuses, mailbox_t mbox) |
_close_folder (void *unused, mailbox_t mbox) |
162 |
{ |
{ |
163 |
mailbox_close (mbox); |
mailbox_close (mbox); |
164 |
mailbox_destroy (&mbox); |
mailbox_destroy (&mbox); |