33 |
#include <obstack.h> |
#include <obstack.h> |
34 |
|
|
35 |
const char *argp_program_version = "folder (" PACKAGE_STRING ")"; |
const char *argp_program_version = "folder (" PACKAGE_STRING ")"; |
36 |
static char doc[] = "GNU MH folder"; |
static char doc[] = N_("GNU MH folder\v" |
37 |
|
"Use -help to obtain the list of traditional MH options."); |
38 |
static char args_doc[] = N_("[action] [msg]"); |
static char args_doc[] = N_("[action] [msg]"); |
39 |
|
|
40 |
#define ARG_PUSH 1 |
#define ARG_PUSH 1 |
41 |
#define ARG_POP 2 |
#define ARG_POP 2 |
42 |
|
|
43 |
static struct argp_option options[] = { |
static struct argp_option options[] = { |
44 |
{N_("Actions are:"), 0, 0, OPTION_DOC, "", 0 }, |
{N_("Actions are:"), 0, 0, OPTION_DOC, NULL, 0 }, |
45 |
{"print", 'p', NULL, 0, N_("List the folders (default)"), 1 }, |
{"print", 'p', NULL, 0, N_("List the folders (default)"), 1 }, |
46 |
{"list", 'l', NULL, 0, N_("List the contents of the folder stack"), 1}, |
{"list", 'l', NULL, 0, N_("List the contents of the folder stack"), 1}, |
47 |
{"push", ARG_PUSH, N_("FOLDER"), OPTION_ARG_OPTIONAL, |
{"push", ARG_PUSH, N_("FOLDER"), OPTION_ARG_OPTIONAL, |
51 |
"stack are exchanged"), 1}, |
"stack are exchanged"), 1}, |
52 |
{"pop", ARG_POP, NULL, 0, N_("Pop the folder off the folder stack"), 1}, |
{"pop", ARG_POP, NULL, 0, N_("Pop the folder off the folder stack"), 1}, |
53 |
|
|
54 |
{N_("Options are:"), 0, 0, OPTION_DOC, "", 2 }, |
{N_("Options are:"), 0, 0, OPTION_DOC, NULL, 2 }, |
55 |
{"folder", 'f', N_("FOLDER"), 0, N_("Specify folder to operate upon"), 3}, |
{"folder", 'f', N_("FOLDER"), 0, N_("Specify folder to operate upon"), 3}, |
56 |
{"all", 'a', NULL, 0, N_("List all folders"), 3}, |
{"all", 'a', NULL, 0, N_("List all folders"), 3}, |
57 |
{"create", 'c', N_("BOOL"), OPTION_ARG_OPTIONAL, |
{"create", 'c', N_("BOOL"), OPTION_ARG_OPTIONAL, |
64 |
N_("Scan folders recursively"), 3}, |
N_("Scan folders recursively"), 3}, |
65 |
{"total", 't', N_("BOOL"), OPTION_ARG_OPTIONAL, |
{"total", 't', N_("BOOL"), OPTION_ARG_OPTIONAL, |
66 |
N_("Output the total statistics"), 3}, |
N_("Output the total statistics"), 3}, |
|
{ N_("\nUse -help switch to obtain the list of traditional MH options. "), |
|
|
0, 0, OPTION_DOC, "", 4 }, |
|
67 |
|
|
68 |
{NULL}, |
{NULL}, |
69 |
}; |
}; |
328 |
|
|
329 |
if (info->message_count) |
if (info->message_count) |
330 |
{ |
{ |
331 |
printf (info->message_count == 1 ? |
printf (ngettext(" has %4lu message (%4lu-%4lu)", |
332 |
_(" has %4lu message (%4lu-%4lu)") : |
" has %4lu messages (%4lu-%4lu)", |
333 |
_(" has %4lu messages (%4lu-%4lu)"), |
info->message_count), |
334 |
(unsigned long) info->message_count, |
(unsigned long) info->message_count, |
335 |
(unsigned long) info->min, |
(unsigned long) info->min, |
336 |
(unsigned long) info->max); |
(unsigned long) info->max); |
400 |
print_fast (); |
print_fast (); |
401 |
else |
else |
402 |
{ |
{ |
403 |
if (print_header) |
if (print_header) |
404 |
printf ("Folder # of messages ( range ) cur msg (other files)\n"); |
printf (_("Folder # of messages ( range ) cur msg (other files)\n")); |
405 |
|
|
406 |
print_all (); |
print_all (); |
407 |
|
|
408 |
if (print_total) |
if (print_total) |
409 |
printf (_("\n%24.24s=%4lu messages in %4lu folders\n"), |
{ |
410 |
_("TOTAL"), |
printf ("\n%24.24s=", _("TOTAL")); |
411 |
(unsigned long) message_count, |
printf (ngettext ("%4lu message ", "%4lu messages ", |
412 |
(unsigned long) folder_info_count); |
message_count), |
413 |
|
(unsigned long) message_count); |
414 |
|
printf (ngettext ("in %4lu folder", "in %4lu folders", |
415 |
|
folder_info_count), |
416 |
|
(unsigned long) folder_info_count); |
417 |
|
printf ("\n"); |
418 |
|
} |
419 |
} |
} |
420 |
if (push_folder) |
if (push_folder) |
421 |
mh_global_save_state (); |
mh_global_save_state (); |