MH: Fix MH-E compatibility
* include/mailutils/cli.h (mu_version_func): Rename to mu_version_hook. * libmailutils/cli/cli.c: Likewise. * pop3d/popauth.c: Likewise. * mh/mh_getopt.c: (mh_getopt): Initialize NLS support. Install standard version hook (needed for mh-e autodetect feature). * mh/ali.c: Update prog_doc. Remove NLS initialization. * mh/anno.c: Likewise * mh/burst.c: Likewise * mh/comp.c: Likewise * mh/fmtcheck.c: Likewise * mh/folder.c: Likewise * mh/forw.c: Likewise * mh/inc.c: Likewise * mh/install-mh.c: Likewise * mh/mark.c: Likewise * mh/mhl.c: Likewise * mh/mhn.c: Likewise * mh/mhparam.c: Likewise * mh/mhpath.c: Likewise * mh/mhseq.c: Likewise * mh/msgchk.c: Likewise * mh/pick.c: Likewise * mh/prompter.c: Likewise * mh/refile.c: Likewise * mh/repl.c: Likewise * mh/rmf.c: Likewise * mh/rmm.c: Likewise * mh/scan.c: Likewise * mh/send.c: Likewise * mh/show.c: Likewise * mh/sortm.c: Likewise * mh/whatnow.c: Likewise * mh/whom.c: Likewise
Showing
32 changed files
with
38 additions
and
135 deletions
... | @@ -54,7 +54,7 @@ struct mu_cli_setup | ... | @@ -54,7 +54,7 @@ struct mu_cli_setup |
54 | void (*prog_doc_hook) (mu_stream_t); | 54 | void (*prog_doc_hook) (mu_stream_t); |
55 | }; | 55 | }; |
56 | 56 | ||
57 | void mu_version_func (struct mu_parseopt *po, mu_stream_t stream); | 57 | void mu_version_hook (struct mu_parseopt *po, mu_stream_t stream); |
58 | void mu_cli (int argc, char **argv, struct mu_cli_setup *setup, | 58 | void mu_cli (int argc, char **argv, struct mu_cli_setup *setup, |
59 | char **capa, void *data, | 59 | char **capa, void *data, |
60 | int *ret_argc, char ***ret_argv); | 60 | int *ret_argc, char ***ret_argv); | ... | ... |
... | @@ -54,7 +54,7 @@ const char mu_version_copyright[] = | ... | @@ -54,7 +54,7 @@ const char mu_version_copyright[] = |
54 | "Copyright %s 2007-2016 Free Software Foundation, inc."; | 54 | "Copyright %s 2007-2016 Free Software Foundation, inc."; |
55 | 55 | ||
56 | void | 56 | void |
57 | mu_version_func (struct mu_parseopt *po, mu_stream_t stream) | 57 | mu_version_hook (struct mu_parseopt *po, mu_stream_t stream) |
58 | { | 58 | { |
59 | #ifdef GIT_DESCRIBE | 59 | #ifdef GIT_DESCRIBE |
60 | mu_stream_printf (stream, "%s (%s) %s [%s]\n", | 60 | mu_stream_printf (stream, "%s (%s) %s [%s]\n", |
... | @@ -428,7 +428,7 @@ mu_cli (int argc, char **argv, struct mu_cli_setup *setup, char **capa, | ... | @@ -428,7 +428,7 @@ mu_cli (int argc, char **argv, struct mu_cli_setup *setup, char **capa, |
428 | po.po_extra_info = gnu_general_help_url; | 428 | po.po_extra_info = gnu_general_help_url; |
429 | flags |= MU_PARSEOPT_EXTRA_INFO; | 429 | flags |= MU_PARSEOPT_EXTRA_INFO; |
430 | 430 | ||
431 | po.po_version_hook = mu_version_func; | 431 | po.po_version_hook = mu_version_hook; |
432 | flags |= MU_PARSEOPT_VERSION_HOOK; | 432 | flags |= MU_PARSEOPT_VERSION_HOOK; |
433 | 433 | ||
434 | if (setup->prog_extra_doc) | 434 | if (setup->prog_extra_doc) | ... | ... |
... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
23 | #include <sys/ioctl.h> | 23 | #include <sys/ioctl.h> |
24 | #include <sys/stat.h> | 24 | #include <sys/stat.h> |
25 | 25 | ||
26 | static char prog_doc[] = N_("GNU MH ali"); | 26 | static char prog_doc[] = N_("List mail aliases"); |
27 | static char args_doc[] = N_("ALIAS [ALIAS...]"); | 27 | static char args_doc[] = N_("ALIAS [ALIAS...]"); |
28 | 28 | ||
29 | static int list_mode; | 29 | static int list_mode; |
... | @@ -142,9 +142,6 @@ ali_print_name (char *name) | ... | @@ -142,9 +142,6 @@ ali_print_name (char *name) |
142 | int | 142 | int |
143 | main (int argc, char **argv) | 143 | main (int argc, char **argv) |
144 | { | 144 | { |
145 | /* Native Language Support */ | ||
146 | MU_APP_INIT_NLS (); | ||
147 | |||
148 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); | 145 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); |
149 | 146 | ||
150 | if (!nolist_mode) | 147 | if (!nolist_mode) | ... | ... |
... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
19 | 19 | ||
20 | #include <mh.h> | 20 | #include <mh.h> |
21 | 21 | ||
22 | static char prog_doc[] = N_("GNU MH anno"); | 22 | static char prog_doc[] = N_("Annotate messages"); |
23 | static char args_doc[] = N_("[MSGLIST]"); | 23 | static char args_doc[] = N_("[MSGLIST]"); |
24 | 24 | ||
25 | //static int inplace; /* Annotate the message in place */ | 25 | //static int inplace; /* Annotate the message in place */ |
... | @@ -58,8 +58,6 @@ main (int argc, char **argv) | ... | @@ -58,8 +58,6 @@ main (int argc, char **argv) |
58 | mu_msgset_t msgset; | 58 | mu_msgset_t msgset; |
59 | size_t len; | 59 | size_t len; |
60 | 60 | ||
61 | MU_APP_INIT_NLS (); | ||
62 | |||
63 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, | 61 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, |
64 | args_doc, prog_doc, NULL); | 62 | args_doc, prog_doc, NULL); |
65 | if (anno_text) | 63 | if (anno_text) | ... | ... |
... | @@ -18,7 +18,7 @@ | ... | @@ -18,7 +18,7 @@ |
18 | 18 | ||
19 | #include <mh.h> | 19 | #include <mh.h> |
20 | 20 | ||
21 | static char prog_doc[] = N_("GNU MH burst"); | 21 | static char prog_doc[] = N_("Explode digests into messages"); |
22 | static char args_doc[] = N_("[MSGLIST]"); | 22 | static char args_doc[] = N_("[MSGLIST]"); |
23 | 23 | ||
24 | /* Command line switches */ | 24 | /* Command line switches */ |
... | @@ -652,9 +652,6 @@ main (int argc, char **argv) | ... | @@ -652,9 +652,6 @@ main (int argc, char **argv) |
652 | mu_msgset_t msgset; | 652 | mu_msgset_t msgset; |
653 | const char *tempfolder = mh_global_profile_get ("Temp-Folder", ".temp"); | 653 | const char *tempfolder = mh_global_profile_get ("Temp-Folder", ".temp"); |
654 | 654 | ||
655 | /* Native Language Support */ | ||
656 | MU_APP_INIT_NLS (); | ||
657 | |||
658 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, | 655 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, |
659 | args_doc, prog_doc, NULL); | 656 | args_doc, prog_doc, NULL); |
660 | if (eb_min_length == 0) | 657 | if (eb_min_length == 0) | ... | ... |
... | @@ -21,7 +21,7 @@ | ... | @@ -21,7 +21,7 @@ |
21 | #include <sys/types.h> | 21 | #include <sys/types.h> |
22 | #include <sys/stat.h> | 22 | #include <sys/stat.h> |
23 | 23 | ||
24 | static char prog_doc[] = N_("GNU MH comp"); | 24 | static char prog_doc[] = N_("Compose a message"); |
25 | static char args_doc[] = N_("[MSG]"); | 25 | static char args_doc[] = N_("[MSG]"); |
26 | 26 | ||
27 | struct mh_whatnow_env wh_env = { 0 }; | 27 | struct mh_whatnow_env wh_env = { 0 }; |
... | @@ -131,14 +131,10 @@ copy_message (mu_mailbox_t mbox, size_t n, const char *file) | ... | @@ -131,14 +131,10 @@ copy_message (mu_mailbox_t mbox, size_t n, const char *file) |
131 | int | 131 | int |
132 | main (int argc, char **argv) | 132 | main (int argc, char **argv) |
133 | { | 133 | { |
134 | /* Native Language Support */ | ||
135 | MU_APP_INIT_NLS (); | ||
136 | |||
137 | draftfolder = mh_global_profile_get ("Draft-Folder", NULL); | 134 | draftfolder = mh_global_profile_get ("Draft-Folder", NULL); |
138 | whatnowproc = mh_global_profile_get ("whatnowproc", NULL); | 135 | whatnowproc = mh_global_profile_get ("whatnowproc", NULL); |
139 | 136 | ||
140 | mh_getopt (&argc, &argv, options, 0, | 137 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); |
141 | args_doc, prog_doc, NULL); | ||
142 | if (use_draft) | 138 | if (use_draft) |
143 | draftmessage = "cur"; | 139 | draftmessage = "cur"; |
144 | if (!formfile) | 140 | if (!formfile) | ... | ... |
... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
19 | 19 | ||
20 | #include <mh.h> | 20 | #include <mh.h> |
21 | 21 | ||
22 | static char prog_doc[] = N_("GNU MH fmtcheck"); | 22 | static char prog_doc[] = N_("Check MH format string"); |
23 | 23 | ||
24 | char *format_str; | 24 | char *format_str; |
25 | static mh_format_t format; | 25 | static mh_format_t format; |
... | @@ -59,9 +59,6 @@ action_dump (void) | ... | @@ -59,9 +59,6 @@ action_dump (void) |
59 | int | 59 | int |
60 | main (int argc, char **argv) | 60 | main (int argc, char **argv) |
61 | { | 61 | { |
62 | /* Native Language Support */ | ||
63 | MU_APP_INIT_NLS (); | ||
64 | |||
65 | mh_getopt (&argc, &argv, options, 0, NULL, prog_doc, NULL); | 62 | mh_getopt (&argc, &argv, options, 0, NULL, prog_doc, NULL); |
66 | mh_format_debug (debug_option); | 63 | mh_format_debug (debug_option); |
67 | if (format_str && mh_format_parse (format_str, &format)) | 64 | if (format_str && mh_format_parse (format_str, &format)) | ... | ... |
... | @@ -28,7 +28,7 @@ | ... | @@ -28,7 +28,7 @@ |
28 | 28 | ||
29 | #include <dirent.h> | 29 | #include <dirent.h> |
30 | 30 | ||
31 | static char prog_doc[] = N_("GNU MH folder"); | 31 | static char prog_doc[] = N_("set or list current folder or message"); |
32 | static char args_doc[] = N_("[ACTION] [MSG]"); | 32 | static char args_doc[] = N_("[ACTION] [MSG]"); |
33 | 33 | ||
34 | typedef int (*folder_action) (void); | 34 | typedef int (*folder_action) (void); |
... | @@ -889,9 +889,6 @@ main (int argc, char **argv) | ... | @@ -889,9 +889,6 @@ main (int argc, char **argv) |
889 | int index = 0; | 889 | int index = 0; |
890 | mu_msgset_t msgset; | 890 | mu_msgset_t msgset; |
891 | 891 | ||
892 | /* Native Language Support */ | ||
893 | MU_APP_INIT_NLS (); | ||
894 | |||
895 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); | 892 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); |
896 | if (recurse_option) | 893 | if (recurse_option) |
897 | max_depth = 0; | 894 | max_depth = 0; | ... | ... |
... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
19 | 19 | ||
20 | #include <mh.h> | 20 | #include <mh.h> |
21 | 21 | ||
22 | static char prog_doc[] = N_("GNU MH forw"); | 22 | static char prog_doc[] = N_("Forward messages"); |
23 | static char args_doc[] = N_("[MSGLIST]"); | 23 | static char args_doc[] = N_("[MSGLIST]"); |
24 | 24 | ||
25 | enum encap_type | 25 | enum encap_type |
... | @@ -383,9 +383,6 @@ main (int argc, char **argv) | ... | @@ -383,9 +383,6 @@ main (int argc, char **argv) |
383 | { | 383 | { |
384 | int rc; | 384 | int rc; |
385 | 385 | ||
386 | /* Native Language Support */ | ||
387 | MU_APP_INIT_NLS (); | ||
388 | |||
389 | draftfolder = mh_global_profile_get ("Draft-Folder", NULL); | 386 | draftfolder = mh_global_profile_get ("Draft-Folder", NULL); |
390 | whatnowproc = mh_global_profile_get ("whatnowproc", NULL); | 387 | whatnowproc = mh_global_profile_get ("whatnowproc", NULL); |
391 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, | 388 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, | ... | ... |
... | @@ -20,7 +20,7 @@ | ... | @@ -20,7 +20,7 @@ |
20 | #include <mh.h> | 20 | #include <mh.h> |
21 | #include "muscript.h" | 21 | #include "muscript.h" |
22 | 22 | ||
23 | static char prog_doc[] = N_("GNU MH inc"); | 23 | static char prog_doc[] = N_("Incorporate new mail"); |
24 | static char extra_doc[] = N_("Debug flags are:\n\ | 24 | static char extra_doc[] = N_("Debug flags are:\n\ |
25 | g - guile stack traces\n\ | 25 | g - guile stack traces\n\ |
26 | t - sieve trace (MU_SIEVE_DEBUG_TRACE)\n\ | 26 | t - sieve trace (MU_SIEVE_DEBUG_TRACE)\n\ |
... | @@ -345,9 +345,6 @@ main (int argc, char **argv) | ... | @@ -345,9 +345,6 @@ main (int argc, char **argv) |
345 | size_t lastseen; | 345 | size_t lastseen; |
346 | const char *unseen_seq; | 346 | const char *unseen_seq; |
347 | 347 | ||
348 | /* Native Language Support */ | ||
349 | MU_APP_INIT_NLS (); | ||
350 | |||
351 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, extra_doc); | 348 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, extra_doc); |
352 | if (!append_folder) | 349 | if (!append_folder) |
353 | append_folder = mh_global_profile_get ("Inbox", "inbox"); | 350 | append_folder = mh_global_profile_get ("Inbox", "inbox"); | ... | ... |
... | @@ -35,9 +35,6 @@ main (int argc, char **argv) | ... | @@ -35,9 +35,6 @@ main (int argc, char **argv) |
35 | char *name; | 35 | char *name; |
36 | extern int mh_auto_install; | 36 | extern int mh_auto_install; |
37 | 37 | ||
38 | /* Native Language Support */ | ||
39 | MU_APP_INIT_NLS (); | ||
40 | |||
41 | mh_auto_install = 0; | 38 | mh_auto_install = 0; |
42 | mh_getopt (&argc, &argv, options, 0, NULL, prog_doc, NULL); | 39 | mh_getopt (&argc, &argv, options, 0, NULL, prog_doc, NULL); |
43 | 40 | ... | ... |
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | 17 | ||
18 | #include <mh.h> | 18 | #include <mh.h> |
19 | 19 | ||
20 | static char prog_doc[] = N_("GNU MH mark"); | 20 | static char prog_doc[] = N_("Manipulate message sequences"); |
21 | static char args_doc[] = N_("[MSGLIST]"); | 21 | static char args_doc[] = N_("[MSGLIST]"); |
22 | 22 | ||
23 | enum action_type | 23 | enum action_type |
... | @@ -167,8 +167,6 @@ main (int argc, char **argv) | ... | @@ -167,8 +167,6 @@ main (int argc, char **argv) |
167 | mu_url_t url; | 167 | mu_url_t url; |
168 | struct mark_closure clos; | 168 | struct mark_closure clos; |
169 | 169 | ||
170 | MU_APP_INIT_NLS (); | ||
171 | |||
172 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, | 170 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, |
173 | args_doc, prog_doc, NULL); | 171 | args_doc, prog_doc, NULL); |
174 | if (public_option == -1) | 172 | if (public_option == -1) | ... | ... |
... | @@ -26,6 +26,7 @@ | ... | @@ -26,6 +26,7 @@ |
26 | #include <mailutils/stream.h> | 26 | #include <mailutils/stream.h> |
27 | #include <mailutils/wordsplit.h> | 27 | #include <mailutils/wordsplit.h> |
28 | #include <mailutils/io.h> | 28 | #include <mailutils/io.h> |
29 | #include <mailutils/cli.h> | ||
29 | 30 | ||
30 | struct getopt_data | 31 | struct getopt_data |
31 | { | 32 | { |
... | @@ -140,30 +141,6 @@ static struct mu_option folder_option[] = { | ... | @@ -140,30 +141,6 @@ static struct mu_option folder_option[] = { |
140 | MU_OPTION_END | 141 | MU_OPTION_END |
141 | }; | 142 | }; |
142 | 143 | ||
143 | void | ||
144 | mh_version_hook (struct mu_parseopt *po, mu_stream_t stream) | ||
145 | { | ||
146 | extern const char mu_version_copyright[]; | ||
147 | #ifdef GIT_DESCRIBE | ||
148 | mu_stream_printf (stream, "%s (GNU MH, %s) %s [%s]\n", | ||
149 | mu_program_name, PACKAGE_NAME, PACKAGE_VERSION, | ||
150 | GIT_DESCRIBE); | ||
151 | #else | ||
152 | mu_stream_printf (stream, "%s (GNU MH, %s) %s\n", mu_program_name, | ||
153 | PACKAGE_NAME, PACKAGE_VERSION); | ||
154 | #endif | ||
155 | /* TRANSLATORS: Translate "(C)" to the copyright symbol | ||
156 | (C-in-a-circle), if this symbol is available in the user's | ||
157 | locale. Otherwise, do not translate "(C)"; leave it as-is. */ | ||
158 | mu_stream_printf (stream, mu_version_copyright, _("(C)")); | ||
159 | mu_stream_printf (stream, _("\ | ||
160 | \n\ | ||
161 | License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\n\ | ||
162 | There is NO WARRANTY, to the extent permitted by law.\n\ | ||
163 | \n\ | ||
164 | ")); | ||
165 | } | ||
166 | |||
167 | static void | 144 | static void |
168 | fn_version (struct mu_parseopt *po, struct mu_option *opt, char const *unused) | 145 | fn_version (struct mu_parseopt *po, struct mu_option *opt, char const *unused) |
169 | { | 146 | { |
... | @@ -192,6 +169,9 @@ mh_getopt (int *pargc, char ***pargv, struct mu_option *options, | ... | @@ -192,6 +169,9 @@ mh_getopt (int *pargc, char ***pargv, struct mu_option *options, |
192 | int flags = MU_PARSEOPT_SINGLE_DASH | MU_PARSEOPT_IMMEDIATE; | 169 | int flags = MU_PARSEOPT_SINGLE_DASH | MU_PARSEOPT_IMMEDIATE; |
193 | int i; | 170 | int i; |
194 | 171 | ||
172 | /* Native Language Support */ | ||
173 | MU_APP_INIT_NLS (); | ||
174 | |||
195 | po.po_negation = "no"; | 175 | po.po_negation = "no"; |
196 | flags |= MU_PARSEOPT_NEGATION; | 176 | flags |= MU_PARSEOPT_NEGATION; |
197 | 177 | ||
... | @@ -233,7 +213,7 @@ mh_getopt (int *pargc, char ***pargv, struct mu_option *options, | ... | @@ -233,7 +213,7 @@ mh_getopt (int *pargc, char ***pargv, struct mu_option *options, |
233 | //po.po_extra_info = gnu_general_help_url; | 213 | //po.po_extra_info = gnu_general_help_url; |
234 | //flags |= MU_PARSEOPT_EXTRA_INFO; | 214 | //flags |= MU_PARSEOPT_EXTRA_INFO; |
235 | 215 | ||
236 | po.po_version_hook = mh_version_hook; | 216 | po.po_version_hook = mu_version_hook; |
237 | flags |= MU_PARSEOPT_VERSION_HOOK; | 217 | flags |= MU_PARSEOPT_VERSION_HOOK; |
238 | 218 | ||
239 | mu_set_program_name (argv[0]); | 219 | mu_set_program_name (argv[0]); | ... | ... |
... | @@ -21,7 +21,7 @@ | ... | @@ -21,7 +21,7 @@ |
21 | #include <sys/stat.h> | 21 | #include <sys/stat.h> |
22 | #include <unistd.h> | 22 | #include <unistd.h> |
23 | 23 | ||
24 | static char prog_doc[] = N_("GNU MH mhl"); | 24 | static char prog_doc[] = N_("Produce formatted listings of MH messages"); |
25 | static char args_doc[] = N_("[FILE [FILE...]]"); | 25 | static char args_doc[] = N_("[FILE [FILE...]]"); |
26 | 26 | ||
27 | static int bell_option; | 27 | static int bell_option; |
... | @@ -138,8 +138,6 @@ main (int argc, char **argv) | ... | @@ -138,8 +138,6 @@ main (int argc, char **argv) |
138 | 138 | ||
139 | interactive = isatty (1) && isatty (0); | 139 | interactive = isatty (1) && isatty (0); |
140 | 140 | ||
141 | MU_APP_INIT_NLS (); | ||
142 | |||
143 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, | 141 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, |
144 | args_doc, prog_doc, NULL); | 142 | args_doc, prog_doc, NULL); |
145 | 143 | ... | ... |
... | @@ -22,7 +22,7 @@ | ... | @@ -22,7 +22,7 @@ |
22 | #include <mailutils/mime.h> | 22 | #include <mailutils/mime.h> |
23 | #include <setjmp.h> | 23 | #include <setjmp.h> |
24 | 24 | ||
25 | static char prog_doc[] = N_("GNU MH mhn"); | 25 | static char prog_doc[] = N_("manipulate MIME messages"); |
26 | static char args_doc[] = N_("[MSGLIST]"); | 26 | static char args_doc[] = N_("[MSGLIST]"); |
27 | 27 | ||
28 | typedef struct _msg_part *msg_part_t; | 28 | typedef struct _msg_part *msg_part_t; |
... | @@ -2759,8 +2759,6 @@ main (int argc, char **argv) | ... | @@ -2759,8 +2759,6 @@ main (int argc, char **argv) |
2759 | { | 2759 | { |
2760 | int rc; | 2760 | int rc; |
2761 | 2761 | ||
2762 | MU_APP_INIT_NLS (); | ||
2763 | |||
2764 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); | 2762 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); |
2765 | if (!formfile) | 2763 | if (!formfile) |
2766 | mh_find_file ("mhl.headers", &formfile); | 2764 | mh_find_file ("mhl.headers", &formfile); | ... | ... |
... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
19 | 19 | ||
20 | #include <mh.h> | 20 | #include <mh.h> |
21 | 21 | ||
22 | static char prog_doc[] = N_("GNU MH mhparam"); | 22 | static char prog_doc[] = N_("Print GNU MH profile and context components"); |
23 | static char args_doc[] = N_("[COMPONENT [COMPONENT...]]"); | 23 | static char args_doc[] = N_("[COMPONENT [COMPONENT...]]"); |
24 | 24 | ||
25 | static int display_all; | 25 | static int display_all; |
... | @@ -87,9 +87,6 @@ mhparam (char *comp) | ... | @@ -87,9 +87,6 @@ mhparam (char *comp) |
87 | int | 87 | int |
88 | main (int argc, char **argv) | 88 | main (int argc, char **argv) |
89 | { | 89 | { |
90 | /* Native Language Support */ | ||
91 | MU_APP_INIT_NLS (); | ||
92 | |||
93 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); | 90 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); |
94 | 91 | ||
95 | if (display_all) | 92 | if (display_all) | ... | ... |
... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
19 | 19 | ||
20 | #include <mh.h> | 20 | #include <mh.h> |
21 | 21 | ||
22 | static char prog_doc[] = N_("GNU MH mhpath"); | 22 | static char prog_doc[] = N_("Print full pathnames of GNU MH messages and folders"); |
23 | static char args_doc[] = N_("[+FOLDER] [MSGLIST]"); | 23 | static char args_doc[] = N_("[+FOLDER] [MSGLIST]"); |
24 | 24 | ||
25 | static int | 25 | static int |
... | @@ -43,9 +43,6 @@ main (int argc, char **argv) | ... | @@ -43,9 +43,6 @@ main (int argc, char **argv) |
43 | int status; | 43 | int status; |
44 | const char *current_folder; | 44 | const char *current_folder; |
45 | 45 | ||
46 | /* Native Language Support */ | ||
47 | MU_APP_INIT_NLS (); | ||
48 | |||
49 | mh_getopt (&argc, &argv, NULL, MH_GETOPT_DEFAULT_FOLDER, | 46 | mh_getopt (&argc, &argv, NULL, MH_GETOPT_DEFAULT_FOLDER, |
50 | args_doc, prog_doc, NULL); | 47 | args_doc, prog_doc, NULL); |
51 | 48 | ... | ... |
... | @@ -14,11 +14,9 @@ | ... | @@ -14,11 +14,9 @@ |
14 | You should have received a copy of the GNU General Public License | 14 | You should have received a copy of the GNU General Public License |
15 | along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. */ | 15 | along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 | ||
17 | /* MH mhparam command */ | ||
18 | |||
19 | #include <mh.h> | 17 | #include <mh.h> |
20 | 18 | ||
21 | static char prog_doc[] = N_("GNU MH mhseq"); | 19 | static char prog_doc[] = N_("Print numbers of messages in GNU MH sequence"); |
22 | static char args_doc[] = N_("[SEQUENCE]"); | 20 | static char args_doc[] = N_("[SEQUENCE]"); |
23 | 21 | ||
24 | static int uid_option = 1; | 22 | static int uid_option = 1; |
... | @@ -46,9 +44,6 @@ main (int argc, char **argv) | ... | @@ -46,9 +44,6 @@ main (int argc, char **argv) |
46 | mu_mailbox_t mbox; | 44 | mu_mailbox_t mbox; |
47 | mu_msgset_t msgset; | 45 | mu_msgset_t msgset; |
48 | 46 | ||
49 | /* Native Language Support */ | ||
50 | MU_APP_INIT_NLS (); | ||
51 | |||
52 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, | 47 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, |
53 | args_doc, prog_doc, NULL); | 48 | args_doc, prog_doc, NULL); |
54 | 49 | ... | ... |
... | @@ -21,7 +21,7 @@ | ... | @@ -21,7 +21,7 @@ |
21 | #include "mailutils/datetime.h" | 21 | #include "mailutils/datetime.h" |
22 | #include <pwd.h> | 22 | #include <pwd.h> |
23 | 23 | ||
24 | static char prog_doc[] = N_("GNU MH msgchk"); | 24 | static char prog_doc[] = N_("Check for messages"); |
25 | static char args_doc[] = N_("USER [USER...]"); | 25 | static char args_doc[] = N_("USER [USER...]"); |
26 | 26 | ||
27 | int date_option = 1; | 27 | int date_option = 1; |
... | @@ -349,8 +349,6 @@ main (int argc, char **argv) | ... | @@ -349,8 +349,6 @@ main (int argc, char **argv) |
349 | { | 349 | { |
350 | int rc = 0; | 350 | int rc = 0; |
351 | 351 | ||
352 | MU_APP_INIT_NLS (); | ||
353 | |||
354 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); | 352 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); |
355 | 353 | ||
356 | if (argc == 0) | 354 | if (argc == 0) | ... | ... |
... | @@ -22,7 +22,7 @@ | ... | @@ -22,7 +22,7 @@ |
22 | #include <pick.h> | 22 | #include <pick.h> |
23 | #include <pick-gram.h> | 23 | #include <pick-gram.h> |
24 | 24 | ||
25 | static char prog_doc[] = N_("GNU MH pick"); | 25 | static char prog_doc[] = N_("Search for messages by content"); |
26 | static char args_doc[] = N_("[--COMPONENT PATTERN]... [MSGLIST]"); | 26 | static char args_doc[] = N_("[--COMPONENT PATTERN]... [MSGLIST]"); |
27 | 27 | ||
28 | static int public_option = 1; | 28 | static int public_option = 1; |
... | @@ -267,8 +267,6 @@ main (int argc, char **argv) | ... | @@ -267,8 +267,6 @@ main (int argc, char **argv) |
267 | mu_mailbox_t mbox; | 267 | mu_mailbox_t mbox; |
268 | mu_msgset_t msgset; | 268 | mu_msgset_t msgset; |
269 | 269 | ||
270 | MU_APP_INIT_NLS (); | ||
271 | |||
272 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, | 270 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, |
273 | args_doc, prog_doc, NULL); | 271 | args_doc, prog_doc, NULL); |
274 | 272 | ... | ... |
... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
19 | #include <mh.h> | 19 | #include <mh.h> |
20 | #include "prompter.h" | 20 | #include "prompter.h" |
21 | 21 | ||
22 | static char prog_doc[] = N_("GNU MH prompter"); | 22 | static char prog_doc[] = N_("Prompting editor front-end for GNU MH"); |
23 | static char args_doc[] = N_("FILE"); | 23 | static char args_doc[] = N_("FILE"); |
24 | 24 | ||
25 | char *erase_seq; | 25 | char *erase_seq; |
... | @@ -88,8 +88,6 @@ main (int argc, char **argv) | ... | @@ -88,8 +88,6 @@ main (int argc, char **argv) |
88 | mu_body_t body; | 88 | mu_body_t body; |
89 | mu_stream_t bstr; | 89 | mu_stream_t bstr; |
90 | 90 | ||
91 | MU_APP_INIT_NLS (); | ||
92 | |||
93 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); | 91 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); |
94 | 92 | ||
95 | if (argc == 0) | 93 | if (argc == 0) | ... | ... |
... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
23 | #include <errno.h> | 23 | #include <errno.h> |
24 | #include <fcntl.h> | 24 | #include <fcntl.h> |
25 | 25 | ||
26 | static char prog_doc[] = N_("GNU MH refile"); | 26 | static char prog_doc[] = N_("File messages in other folders"); |
27 | static char args_doc[] = N_("MSGLIST FOLDER [FOLDER...]"); | 27 | static char args_doc[] = N_("MSGLIST FOLDER [FOLDER...]"); |
28 | 28 | ||
29 | int link_flag = 0; | 29 | int link_flag = 0; |
... | @@ -185,9 +185,6 @@ main (int argc, char **argv) | ... | @@ -185,9 +185,6 @@ main (int argc, char **argv) |
185 | mu_mailbox_t mbox; | 185 | mu_mailbox_t mbox; |
186 | int status, i, j; | 186 | int status, i, j; |
187 | 187 | ||
188 | /* Native Language Support */ | ||
189 | MU_APP_INIT_NLS (); | ||
190 | |||
191 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); | 188 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); |
192 | /* Collect any surplus folders */ | 189 | /* Collect any surplus folders */ |
193 | for (i = j = 0; i < argc; i++) | 190 | for (i = j = 0; i < argc; i++) | ... | ... |
... | @@ -22,7 +22,7 @@ | ... | @@ -22,7 +22,7 @@ |
22 | #include <sys/stat.h> | 22 | #include <sys/stat.h> |
23 | #include <unistd.h> | 23 | #include <unistd.h> |
24 | 24 | ||
25 | static char prog_doc[] = N_("GNU MH repl"); | 25 | static char prog_doc[] = N_("Reply to a message"); |
26 | static char args_doc[] = N_("[+FOLDER] [MESSAGE]"); | 26 | static char args_doc[] = N_("[+FOLDER] [MESSAGE]"); |
27 | 27 | ||
28 | static char *format_str = NULL; | 28 | static char *format_str = NULL; |
... | @@ -307,9 +307,6 @@ main (int argc, char **argv) | ... | @@ -307,9 +307,6 @@ main (int argc, char **argv) |
307 | { | 307 | { |
308 | int rc; | 308 | int rc; |
309 | 309 | ||
310 | /* Native Language Support */ | ||
311 | MU_APP_INIT_NLS (); | ||
312 | |||
313 | draftfolder = mh_global_profile_get ("Draft-Folder", NULL); | 310 | draftfolder = mh_global_profile_get ("Draft-Folder", NULL); |
314 | whatnowproc = mh_global_profile_get ("whatnowproc", NULL); | 311 | whatnowproc = mh_global_profile_get ("whatnowproc", NULL); |
315 | 312 | ... | ... |
... | @@ -28,7 +28,7 @@ | ... | @@ -28,7 +28,7 @@ |
28 | 28 | ||
29 | #include <dirent.h> | 29 | #include <dirent.h> |
30 | 30 | ||
31 | static char prog_doc[] = N_("GNU MH rmf"); | 31 | static char prog_doc[] = N_("Remove a GNU MH folder"); |
32 | static char args_doc[] = N_("[+FOLDER]"); | 32 | static char args_doc[] = N_("[+FOLDER]"); |
33 | 33 | ||
34 | int explicit_folder; /* Was the folder explicitly given */ | 34 | int explicit_folder; /* Was the folder explicitly given */ |
... | @@ -150,9 +150,6 @@ main (int argc, char **argv) | ... | @@ -150,9 +150,6 @@ main (int argc, char **argv) |
150 | int status; | 150 | int status; |
151 | char *name; | 151 | char *name; |
152 | 152 | ||
153 | /* Native Language Support */ | ||
154 | MU_APP_INIT_NLS (); | ||
155 | |||
156 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); | 153 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); |
157 | 154 | ||
158 | cur_folder_path = current_folder_path (); | 155 | cur_folder_path = current_folder_path (); | ... | ... |
... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
19 | 19 | ||
20 | #include <mh.h> | 20 | #include <mh.h> |
21 | 21 | ||
22 | static char prog_doc[] = N_("GNU MH rmm"); | 22 | static char prog_doc[] = N_("Remove messages"); |
23 | static char args_doc[] = N_("[+FOLDER] [MSGLIST]"); | 23 | static char args_doc[] = N_("[+FOLDER] [MSGLIST]"); |
24 | 24 | ||
25 | static int | 25 | static int |
... | @@ -56,9 +56,6 @@ main (int argc, char **argv) | ... | @@ -56,9 +56,6 @@ main (int argc, char **argv) |
56 | int status; | 56 | int status; |
57 | struct seq_closure clos; | 57 | struct seq_closure clos; |
58 | 58 | ||
59 | /* Native Language Support */ | ||
60 | MU_APP_INIT_NLS (); | ||
61 | |||
62 | mh_getopt (&argc, &argv, NULL, MH_GETOPT_DEFAULT_FOLDER, | 59 | mh_getopt (&argc, &argv, NULL, MH_GETOPT_DEFAULT_FOLDER, |
63 | args_doc, prog_doc, NULL); | 60 | args_doc, prog_doc, NULL); |
64 | 61 | ... | ... |
... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ |
26 | #include <time.h> | 26 | #include <time.h> |
27 | #include <mailutils/observer.h> | 27 | #include <mailutils/observer.h> |
28 | 28 | ||
29 | static char prog_doc[] = N_("GNU MH scan"); | 29 | static char prog_doc[] = N_("Produce a one line per message scan listing"); |
30 | static char args_doc[] = N_("[+FOLDER] [MSGLIST]"); | 30 | static char args_doc[] = N_("[+FOLDER] [MSGLIST]"); |
31 | 31 | ||
32 | static int clear; | 32 | static int clear; |
... | @@ -103,9 +103,6 @@ main (int argc, char **argv) | ... | @@ -103,9 +103,6 @@ main (int argc, char **argv) |
103 | int status; | 103 | int status; |
104 | size_t total = 0; | 104 | size_t total = 0; |
105 | 105 | ||
106 | /* Native Language Support */ | ||
107 | MU_APP_INIT_NLS (); | ||
108 | |||
109 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, | 106 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, |
110 | args_doc, prog_doc, NULL); | 107 | args_doc, prog_doc, NULL); |
111 | 108 | ... | ... |
... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
23 | #include <stdarg.h> | 23 | #include <stdarg.h> |
24 | #include <pwd.h> | 24 | #include <pwd.h> |
25 | 25 | ||
26 | static char prog_doc[] = N_("GNU MH send"); | 26 | static char prog_doc[] = N_("Send messages"); |
27 | static char args_doc[] = N_("FILE [FILE...]"); | 27 | static char args_doc[] = N_("FILE [FILE...]"); |
28 | 28 | ||
29 | static const char *draftfolder; /* Use this draft folder */ | 29 | static const char *draftfolder; /* Use this draft folder */ |
... | @@ -752,8 +752,6 @@ main (int argc, char **argv) | ... | @@ -752,8 +752,6 @@ main (int argc, char **argv) |
752 | char *p; | 752 | char *p; |
753 | int rc; | 753 | int rc; |
754 | 754 | ||
755 | MU_APP_INIT_NLS (); | ||
756 | |||
757 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); | 755 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); |
758 | 756 | ||
759 | mh_read_aliases (); | 757 | mh_read_aliases (); | ... | ... |
... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
19 | 19 | ||
20 | #include <mh.h> | 20 | #include <mh.h> |
21 | 21 | ||
22 | static char prog_doc[] = N_("GNU MH show"); | 22 | static char prog_doc[] = N_("Display GNU MH messages"); |
23 | static char args_doc[] = N_("[+FOLDER] [MSGLIST]"); | 23 | static char args_doc[] = N_("[+FOLDER] [MSGLIST]"); |
24 | 24 | ||
25 | int use_draft; | 25 | int use_draft; |
... | @@ -184,9 +184,6 @@ main (int argc, char **argv) | ... | @@ -184,9 +184,6 @@ main (int argc, char **argv) |
184 | mu_msgset_t msgset; | 184 | mu_msgset_t msgset; |
185 | const char *p; | 185 | const char *p; |
186 | 186 | ||
187 | /* Native Language Support */ | ||
188 | MU_APP_INIT_NLS (); | ||
189 | |||
190 | showargmax = 2; | 187 | showargmax = 2; |
191 | showargc = 1; | 188 | showargc = 1; |
192 | showargv = mu_calloc (showargmax, sizeof showargv[0]); | 189 | showargv = mu_calloc (showargmax, sizeof showargv[0]); | ... | ... |
... | @@ -22,8 +22,7 @@ | ... | @@ -22,8 +22,7 @@ |
22 | #include <unistd.h> | 22 | #include <unistd.h> |
23 | #include <signal.h> | 23 | #include <signal.h> |
24 | 24 | ||
25 | static char prog_doc[] = N_("GNU MH sortm")"\v" | 25 | static char prog_doc[] = N_("Sort GNU MH messages"); |
26 | N_("Use -help to obtain the list of traditional MH options."); | ||
27 | static char args_doc[] = N_("[MSGLIST]"); | 26 | static char args_doc[] = N_("[MSGLIST]"); |
28 | 27 | ||
29 | static int limit; | 28 | static int limit; |
... | @@ -603,8 +602,6 @@ main (int argc, char **argv) | ... | @@ -603,8 +602,6 @@ main (int argc, char **argv) |
603 | mu_url_t url; | 602 | mu_url_t url; |
604 | mu_msgset_t msgset; | 603 | mu_msgset_t msgset; |
605 | 604 | ||
606 | MU_APP_INIT_NLS (); | ||
607 | |||
608 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, | 605 | mh_getopt (&argc, &argv, options, MH_GETOPT_DEFAULT_FOLDER, |
609 | args_doc, prog_doc, NULL); | 606 | args_doc, prog_doc, NULL); |
610 | 607 | ... | ... |
... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
19 | 19 | ||
20 | #include <mh.h> | 20 | #include <mh.h> |
21 | 21 | ||
22 | static char prog_doc[] = "GNU MH whatnow"; | 22 | static char prog_doc[] = N_("Prompting front-end for sending messages"); |
23 | static char args_doc[] = N_("[FILE]"); | 23 | static char args_doc[] = N_("[FILE]"); |
24 | 24 | ||
25 | struct mh_whatnow_env wh_env = { 0 }; | 25 | struct mh_whatnow_env wh_env = { 0 }; |
... | @@ -52,8 +52,6 @@ static struct mu_option options[] = { | ... | @@ -52,8 +52,6 @@ static struct mu_option options[] = { |
52 | int | 52 | int |
53 | main (int argc, char **argv) | 53 | main (int argc, char **argv) |
54 | { | 54 | { |
55 | MU_APP_INIT_NLS (); | ||
56 | |||
57 | mh_whatnow_env_from_environ (&wh_env); | 55 | mh_whatnow_env_from_environ (&wh_env); |
58 | 56 | ||
59 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); | 57 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); | ... | ... |
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | 17 | ||
18 | #include <mh.h> | 18 | #include <mh.h> |
19 | 19 | ||
20 | static char prog_doc[] = N_("GNU MH whom"); | 20 | static char prog_doc[] = N_("Report to whom a message would go"); |
21 | static char args_doc[] = "[FILE]"; | 21 | static char args_doc[] = "[FILE]"; |
22 | 22 | ||
23 | static int check_recipients; | 23 | static int check_recipients; |
... | @@ -65,9 +65,7 @@ int | ... | @@ -65,9 +65,7 @@ int |
65 | main (int argc, char **argv) | 65 | main (int argc, char **argv) |
66 | { | 66 | { |
67 | char *name = "draft"; | 67 | char *name = "draft"; |
68 | 68 | ||
69 | MU_APP_INIT_NLS (); | ||
70 | |||
71 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); | 69 | mh_getopt (&argc, &argv, options, 0, args_doc, prog_doc, NULL); |
72 | 70 | ||
73 | if (!use_draft && argc > 0) | 71 | if (!use_draft && argc > 0) | ... | ... |
... | @@ -149,7 +149,7 @@ popauth_version (struct mu_parseopt *po, mu_stream_t stream) | ... | @@ -149,7 +149,7 @@ popauth_version (struct mu_parseopt *po, mu_stream_t stream) |
149 | mu_iterator_t itr; | 149 | mu_iterator_t itr; |
150 | int rc; | 150 | int rc; |
151 | 151 | ||
152 | mu_version_func (po, stream); | 152 | mu_version_hook (po, stream); |
153 | mu_stream_printf (stream, _("Database formats: ")); | 153 | mu_stream_printf (stream, _("Database formats: ")); |
154 | 154 | ||
155 | rc = mu_dbm_impl_iterator (&itr); | 155 | rc = mu_dbm_impl_iterator (&itr); | ... | ... |
-
Please register or sign in to post a comment