summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2003-03-29 17:09:54 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2003-03-29 17:09:54 +0000
commit587fbc3aa0015132504f5604fdbe798895d2afcf (patch)
tree6168b7dce051fd34b4c31398f0770dcc5ed45114
parentb49ffcc453925dd43e25c2b75160efc09b9acf3b (diff)
downloadmailutils-587fbc3aa0015132504f5604fdbe798895d2afcf.tar.gz
mailutils-587fbc3aa0015132504f5604fdbe798895d2afcf.tar.bz2
(main): Use mu_argp_init.
-rw-r--r--comsat/comsat.c3
-rw-r--r--dotlock/dotlock.c5
-rw-r--r--frm/frm.c3
-rw-r--r--from/from.c3
-rw-r--r--guimb/main.c3
-rw-r--r--imap4d/imap4d.c3
-rw-r--r--mail.local/main.c3
-rw-r--r--mail.remote/mail.remote.c3
-rw-r--r--mail/mail.c3
-rw-r--r--mailbox/mailutils-config.c3
-rw-r--r--messages/messages.c3
-rw-r--r--mh/anno.c3
-rw-r--r--mh/comp.c3
-rw-r--r--mh/fmtcheck.c3
-rw-r--r--mh/folder.c3
-rw-r--r--mh/forw.c3
-rw-r--r--mh/inc.c3
-rw-r--r--mh/install-mh.c4
-rw-r--r--mh/mark.c3
-rw-r--r--mh/mhl.c3
-rw-r--r--mh/mhn.c3
-rw-r--r--mh/mhpath.c3
-rw-r--r--mh/pick.c3
-rw-r--r--mh/refile.c3
-rw-r--r--mh/repl.c3
-rw-r--r--mh/rmf.c3
-rw-r--r--mh/rmm.c3
-rw-r--r--mh/scan.c3
-rw-r--r--mh/send.c3
-rw-r--r--mh/sortm.c3
-rw-r--r--mh/whatnow.c3
-rw-r--r--mh/whom.c3
-rw-r--r--pop3d/pop3d.c3
-rw-r--r--pop3d/popauth.c3
-rw-r--r--readmsg/readmsg.c3
-rw-r--r--sieve/sieve.c3
36 files changed, 74 insertions, 37 deletions
diff --git a/comsat/comsat.c b/comsat/comsat.c
index 66949663a..441dbdcf8 100644
--- a/comsat/comsat.c
+++ b/comsat/comsat.c
@@ -50,7 +50,7 @@ typedef struct utmp UTMP;
50 50
51#define MAX_TTY_SIZE (sizeof (PATH_TTY_PFX) + sizeof (((UTMP*)0)->ut_line)) 51#define MAX_TTY_SIZE (sizeof (PATH_TTY_PFX) + sizeof (((UTMP*)0)->ut_line))
52 52
53const char *argp_program_version = "comsatd (" PACKAGE_STRING ")"; 53const char *program_version = "comsatd (" PACKAGE_STRING ")";
54static char doc[] = "GNU comsatd"; 54static char doc[] = "GNU comsatd";
55 55
56static struct argp_option options[] = 56static struct argp_option options[] =
@@ -139,6 +139,7 @@ main(int argc, char **argv)
139 /* Native Language Support */ 139 /* Native Language Support */
140 mu_init_nls (); 140 mu_init_nls ();
141 141
142 mu_argp_init (program_version, NULL);
142 mu_argp_parse (&argp, &argc, &argv, 0, comsat_argp_capa, 143 mu_argp_parse (&argp, &argc, &argv, 0, comsat_argp_capa,
143 NULL, &daemon_param); 144 NULL, &daemon_param);
144 145
diff --git a/dotlock/dotlock.c b/dotlock/dotlock.c
index b00bfab86..694e3b0e7 100644
--- a/dotlock/dotlock.c
+++ b/dotlock/dotlock.c
@@ -30,7 +30,7 @@
30#include <mailutils/locker.h> 30#include <mailutils/locker.h>
31#include <mailutils/nls.h> 31#include <mailutils/nls.h>
32 32
33const char *argp_program_version = "GNU dotlock (" PACKAGE_STRING ")"; 33const char *program_version = "GNU dotlock (" PACKAGE_STRING ")";
34static char doc[] = 34static char doc[] =
35N_("GNU dotlock -- lock mail spool files" 35N_("GNU dotlock -- lock mail spool files"
36 "\v" 36 "\v"
@@ -38,7 +38,6 @@ N_("GNU dotlock -- lock mail spool files"
38 " it's already locked, and 1 if some other kind of error occurred."); 38 " it's already locked, and 1 if some other kind of error occurred.");
39 39
40static char args_doc[] = N_("FILE"); 40static char args_doc[] = N_("FILE");
41error_t argp_err_exit_status = MU_DL_EX_ERROR;
42 41
43static struct argp_option options[] = { 42static struct argp_option options[] = {
44 {"unlock", 'u', NULL, 0, 43 {"unlock", 'u', NULL, 0,
@@ -148,6 +147,8 @@ main (int argc, char *argv[])
148 if(setegid(usergid) < 0) 147 if(setegid(usergid) < 0)
149 return MU_DL_EX_ERROR; 148 return MU_DL_EX_ERROR;
150 149
150 mu_argp_init (program_version, NULL);
151 argp_err_exit_status = MU_DL_EX_ERROR;
151 argp_parse (&argp, argc, argv, 0, NULL, NULL); 152 argp_parse (&argp, argc, argv, 0, NULL, NULL);
152 153
153 if ((err = locker_create (&locker, file, flags))) 154 if ((err = locker_create (&locker, file, flags)))
diff --git a/frm/frm.c b/frm/frm.c
index 9cc2c55b0..f009d989a 100644
--- a/frm/frm.c
+++ b/frm/frm.c
@@ -60,7 +60,7 @@ static int selected;
60 60
61static int action (observer_t, size_t); 61static int action (observer_t, size_t);
62 62
63const char *argp_program_version = "frm (" PACKAGE_STRING ")"; 63const char *program_version = "frm (" PACKAGE_STRING ")";
64static char doc[] = N_("GNU frm -- display From: lines"); 64static char doc[] = N_("GNU frm -- display From: lines");
65 65
66static struct argp_option options[] = { 66static struct argp_option options[] = {
@@ -306,6 +306,7 @@ main(int argc, char **argv)
306 /* Native Language Support */ 306 /* Native Language Support */
307 mu_init_nls (); 307 mu_init_nls ();
308 308
309 mu_argp_init (program_version, NULL);
309 mu_argp_parse (&argp, &argc, &argv, 0, frm_argp_capa, &c, NULL); 310 mu_argp_parse (&argp, &argc, &argv, 0, frm_argp_capa, &c, NULL);
310 311
311 /* have an argument */ 312 /* have an argument */
diff --git a/from/from.c b/from/from.c
index cc56590c3..379162bad 100644
--- a/from/from.c
+++ b/from/from.c
@@ -46,7 +46,7 @@
46#include <mailutils/stream.h> 46#include <mailutils/stream.h>
47#include <mailutils/nls.h> 47#include <mailutils/nls.h>
48 48
49const char *argp_program_version = "from (" PACKAGE_STRING ")"; 49const char *program_version = "from (" PACKAGE_STRING ")";
50static char doc[] = N_("GNU from -- display from and subject"); 50static char doc[] = N_("GNU from -- display from and subject");
51 51
52static struct argp_option options[] = { 52static struct argp_option options[] = {
@@ -103,6 +103,7 @@ main(int argc, char **argv)
103 103
104 { 104 {
105 int opt; 105 int opt;
106 mu_argp_init (program_version, NULL);
106 mu_argp_parse (&argp, &argc, &argv, 0, capa, &opt, NULL); 107 mu_argp_parse (&argp, &argc, &argv, 0, capa, &opt, NULL);
107 mailbox_name = argv[opt]; 108 mailbox_name = argv[opt];
108 } 109 }
diff --git a/guimb/main.c b/guimb/main.c
index 83e59b2c7..04f7c647b 100644
--- a/guimb/main.c
+++ b/guimb/main.c
@@ -116,7 +116,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
116 return 0; 116 return 0;
117} 117}
118 118
119const char *argp_program_version = "guimb (" PACKAGE_STRING ")"; 119const char *program_version = "guimb (" PACKAGE_STRING ")";
120static char doc[] = 120static char doc[] =
121N_("GNU guimb -- Process the contents of the specified mailboxes " 121N_("GNU guimb -- Process the contents of the specified mailboxes "
122"using a Scheme program or expression."); 122"using a Scheme program or expression.");
@@ -149,6 +149,7 @@ main (int argc, char *argv[])
149 mu_init_nls (); 149 mu_init_nls ();
150 150
151 append_arg (""); 151 append_arg ("");
152 mu_argp_init (program_version, NULL);
152 mu_argp_parse (&argp, &argc, &argv, 0, guimb_argp_capa, NULL, &c); 153 mu_argp_parse (&argp, &argc, &argv, 0, guimb_argp_capa, NULL, &c);
153 154
154 for (; c < argc; c++) 155 for (; c < argc; c++)
diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index 94220e312..c28870fcd 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.c
@@ -36,7 +36,7 @@ int login_disabled;
36/* Number of child processes. */ 36/* Number of child processes. */
37volatile size_t children; 37volatile size_t children;
38 38
39const char *argp_program_version = "imap4d (" PACKAGE_STRING ")"; 39const char *program_version = "imap4d (" PACKAGE_STRING ")";
40static char doc[] = N_("GNU imap4d -- the IMAP4D daemon"); 40static char doc[] = N_("GNU imap4d -- the IMAP4D daemon");
41 41
42#define ARG_LOGIN_DISABLED 1 42#define ARG_LOGIN_DISABLED 1
@@ -124,6 +124,7 @@ main (int argc, char **argv)
124 MU_AUTH_REGISTER_ALL_MODULES (); 124 MU_AUTH_REGISTER_ALL_MODULES ();
125 imap4d_capability_init (); 125 imap4d_capability_init ();
126 126
127 mu_argp_init (program_version, NULL);
127#ifdef WITH_TLS 128#ifdef WITH_TLS
128 mu_tls_init_argp (); 129 mu_tls_init_argp ();
129#endif /* WITH_TLS */ 130#endif /* WITH_TLS */
diff --git a/mail.local/main.c b/mail.local/main.c
index fc40d9b10..6da4df626 100644
--- a/mail.local/main.c
+++ b/mail.local/main.c
@@ -41,7 +41,7 @@ void guess_retval __P((int ec));
41void mailer_err __P((char *fmt, ...)); 41void mailer_err __P((char *fmt, ...));
42void notify_biff __P((mailbox_t mbox, char *name, size_t size)); 42void notify_biff __P((mailbox_t mbox, char *name, size_t size));
43 43
44const char *argp_program_version = "mail.local (" PACKAGE_STRING ")"; 44const char *program_version = "mail.local (" PACKAGE_STRING ")";
45static char doc[] = 45static char doc[] =
46N_("GNU mail.local -- the local MDA" 46N_("GNU mail.local -- the local MDA"
47 "\v" 47 "\v"
@@ -278,6 +278,7 @@ main (int argc, char *argv[])
278 278
279 mu_argp_error_code = EX_CONFIG; 279 mu_argp_error_code = EX_CONFIG;
280 MU_AUTH_REGISTER_ALL_MODULES(); 280 MU_AUTH_REGISTER_ALL_MODULES();
281 mu_argp_init (program_version, NULL);
281 sieve_argp_init (); 282 sieve_argp_init ();
282 mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, &arg_index, NULL); 283 mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, &arg_index, NULL);
283 284
diff --git a/mail.remote/mail.remote.c b/mail.remote/mail.remote.c
index aa04f4720..a4cf83c35 100644
--- a/mail.remote/mail.remote.c
+++ b/mail.remote/mail.remote.c
@@ -41,7 +41,7 @@
41#include <mailutils/error.h> 41#include <mailutils/error.h>