summaryrefslogtreecommitdiff
path: root/movemail
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-11-07 22:32:26 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-11-07 22:32:26 +0000
commit6bd4a8b2ed555986e20ad09e11d6a95470a9be71 (patch)
treefd4460349b8bdf053639bcc9db9870ddb7350e18 /movemail
parent6c26e9b60fc16d4b4afa64f6a2128ada847c7084 (diff)
downloadmailutils-6bd4a8b2ed555986e20ad09e11d6a95470a9be71.tar.gz
mailutils-6bd4a8b2ed555986e20ad09e11d6a95470a9be71.tar.bz2
* include/mailutils/argp.h (mu_argp_set_config_param): New
function. * include/mailutils/cfg.h (mu_cfg_time): New value (struct mu_cfg_section): Rewamp using lists. (enum mu_cfg_cont_type, struct mu_cfg_cont): New types. (mu_config_create_container, mu_config_clone_container) (mu_config_destroy_container): New functions. (mu_parse_config): New function. * include/mailutils/mu_auth.h (mu_authentication_clear_list) (mu_authorization_clear_list): New functions. * mailbox/cfg_lexer.c: Add missing includes (mu_config_create_container, mu_config_clone_container) (mu_config_destroy_container): New functions. (mu_parse_config): New function. (_mu_config_register_section): New function. (mu_config_register_section): New function. (_mu_parse_config): Fully implement system-wide/per-user configuration semantics. (mu_parse_config): Take two more arguments. * mailbox/cfg_parser.h: Remove automatically generated file. * mailbox/cfg_parser.y (find_container): New function (find_subsection,find_param): Rewrite using find_container (parse_param): Implement new data type mu_cfg_time (time_t value). (_scan_tree_helper): Complain about unknown sections only if MU_CONFIG_VERBOSE environment variable is set. * mailbox/mu_argp.c (assign_string): Bugfix. (mu_argp_set_config_param): New function. (mu_argp_parse): Remove eventual `lt-' prefix from program names. * mailbox/mu_auth.c: New options --clear-authorization and --clear-authentication. (mu_authorization_clear_list,mu_authentication_clear_list): New functions. * include/mailutils/refcount.h (struct _mu_refcount): Move ro refcount.c (mu_refcount_inc,mu_refcount_dec): Change return value. (mu_refcount_value): New function. * mailbox/refcount.c (struct _mu_refcount): Moved from refcount.h (mu_refcount_value): New function. (mu_refcount_create,mu_refcount_destroy,mu_refcount_inc) (mu_refcount_dec): Fix monitor usage. (mu_refcount_inc,mu_refcount_dec): Fix return type. * mailbox/Makefile.am (libmailutils_la_SOURCES): Add refcount.c * dotlock/dotlock.c, imap4d/imap4d.c, mail.local/main.c, mail.remote/mail.remote.c, mimeview/mimeview.c, movemail/movemail.c, pop3d/pop3d.c, pop3d/signal.c, readmsg/readmsg.c, sieve/sieve.c: Implement new configuration. * testsuite/lib/mailutils.exp: Set MU_CONFIG_FLAVOR envar to `none' to avoid reading configuration files.
Diffstat (limited to 'movemail')
-rw-r--r--movemail/movemail.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/movemail/movemail.c b/movemail/movemail.c
index 892e4aca1..5f3f0bdf5 100644
--- a/movemail/movemail.c
+++ b/movemail/movemail.c
@@ -77,6 +77,14 @@ static struct argp argp = {
NULL, NULL
};
+
+struct mu_cfg_param movemail_cfg_param[] = {
+ { "preserve", mu_cfg_bool, &preserve_mail },
+ { "reverse", mu_cfg_bool, &reverse_order },
+ { NULL }
+};
+
+
static const char *mail_capa[] = {
"common",
"license",
@@ -84,7 +92,7 @@ static const char *mail_capa[] = {
#ifdef WITH_TLS
"tls",
#endif
- NULL
+ NULL
};
int
@@ -281,13 +289,14 @@ main (int argc, char **argv)
mu_register_all_mbox_formats ();
/* argument parsing */
-
+
mu_error_set_print (movemail_error_printer);
mu_argp_init (program_version, NULL);
#ifdef WITH_TLS
mu_tls_init_client_argp ();
#endif
+ mu_argp_set_config_param (movemail_cfg_param);
mu_argp_parse (&argp, &argc, &argv, 0, mail_capa, &index, NULL);
argc -= index;

Return to:

Send suggestions and report system problems to the System administrator.