diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-08-21 00:52:59 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-08-21 00:57:44 +0300 |
commit | 5171c0f91ea69eacd76068661db628f46f267c9e (patch) | |
tree | d8e4ab6a41945cb78b682e212f778862b89f24bd /mh | |
parent | b9aaf724c6428fb4e0d01950d4d7113671e048e5 (diff) | |
download | mailutils-5171c0f91ea69eacd76068661db628f46f267c9e.tar.gz mailutils-5171c0f91ea69eacd76068661db628f46f267c9e.tar.bz2 |
Minor fixes.
* .gitignore: Add pathdefs.h
* examples/Makefile.am (muauth_CPPFLAGS)
(muemail_CPPFLAGS): New variables.
* examples/argcv.c (main): Remove unused local.
* include/mailutils/gsasl.h [USE_GSASL]: Change to WITH_GSASL.
* include/mailutils/libcfg.h (mu_acl_cfg_init): New prototype.
* include/mailutils/mu_auth.h (mu_authenticate): Password is const.
* include/mailutils/python.h: Fix indentation.
(mu_py_script_data): module_name is const char *.
* libmu_auth/radius.c: Include radius/debug.h
* libproto/mailer/smtp.c: Include io.h and secret.h
* mail/mail.c: Fix indentation.
* mail/util.c (util_rfc2047_decode): Fix local variable declaration.
* mailbox/mu_auth.c (mu_authenticate): Password is const.
* mh/mh.h (mh_alias_get, mh_alias_get_address)
(mh_alias_get_alias): Name is const.
* mh/mh_alias.y: Likewise.
* mh/mh_list.c (print_header_value): Fix improper use of mu_toupper.
* mh/mh_whatnow.c (invoke): Add typecasts.
* python/libmu_py/nls.c (api_nls_set_locale): Remove unused automatic.
* python/libmu_py/sieve.c (_sieve_error_printer): Provide missing
return value.
(_sieve_debug_printer): Likewise.
Diffstat (limited to 'mh')
-rw-r--r-- | mh/mh.h | 6 | ||||
-rw-r--r-- | mh/mh_alias.y | 15 | ||||
-rw-r--r-- | mh/mh_list.c | 5 | ||||
-rw-r--r-- | mh/mh_whatnow.c | 6 |
4 files changed, 18 insertions, 14 deletions
@@ -335,9 +335,9 @@ void mh_set_reply_regex (const char *str); int mh_decode_2047 (char *text, char **decoded_text); int mh_alias_read (char *name, int fail); -int mh_alias_get (char *name, mu_list_t *return_list); -int mh_alias_get_address (char *name, mu_address_t *addr, int *incl); -int mh_alias_get_alias (char *uname, mu_list_t *return_list); +int mh_alias_get (const char *name, mu_list_t *return_list); +int mh_alias_get_address (const char *name, mu_address_t *addr, int *incl); +int mh_alias_get_alias (const char *uname, mu_list_t *return_list); int mh_read_aliases (void); int mh_alias_expand (const char *str, mu_address_t *paddr, int *incl); diff --git a/mh/mh_alias.y b/mh/mh_alias.y index c34e3866e..06b2cc537 100644 --- a/mh/mh_alias.y +++ b/mh/mh_alias.y @@ -225,7 +225,7 @@ ali_list_dup (mu_list_t src) } static int -ali_member (mu_list_t list, char *name) +ali_member (mu_list_t list, const char *name) { mu_iterator_t itr; int found = 0; @@ -252,7 +252,7 @@ ali_member (mu_list_t list, char *name) } int -aliascmp (char *pattern, char *name) +aliascmp (const char *pattern, const char *name) { int len = strlen (pattern); @@ -281,7 +281,7 @@ _insert_list (mu_list_t list, void *prev, mu_list_t new_list) return 0; } -static int mh_alias_get_internal (char *name, mu_iterator_t start, +static int mh_alias_get_internal (const char *name, mu_iterator_t start, mu_list_t *return_list, int *inclusive); int @@ -311,7 +311,8 @@ alias_expand_list (mu_list_t name_list, mu_iterator_t orig_itr, int *inclusive) /* Look up the named alias. If found, return the list of recipient names associated with it */ static int -mh_alias_get_internal (char *name, mu_iterator_t start, mu_list_t *return_list, +mh_alias_get_internal (const char *name, + mu_iterator_t start, mu_list_t *return_list, int *inclusive) { mu_iterator_t itr; @@ -349,13 +350,13 @@ mh_alias_get_internal (char *name, mu_iterator_t start, mu_list_t *return_list, } int -mh_alias_get (char *name, mu_list_t *return_list) +mh_alias_get (const char *name, mu_list_t *return_list) { return mh_alias_get_internal (name, NULL, return_list, NULL); } int -mh_alias_get_address (char *name, mu_address_t *paddr, int *incl) +mh_alias_get_address (const char *name, mu_address_t *paddr, int *incl) { mu_iterator_t itr; mu_list_t list; @@ -403,7 +404,7 @@ mh_alias_get_address (char *name, mu_address_t *paddr, int *incl) /* Look up the given user name in the aliases. Return the list of alias names this user is member of */ int -mh_alias_get_alias (char *uname, mu_list_t *return_list) +mh_alias_get_alias (const char *uname, mu_list_t *return_list) { mu_iterator_t itr; int rc = 1; diff --git a/mh/mh_list.c b/mh/mh_list.c index 543ce1d72..ac9fc5974 100644 --- a/mh/mh_list.c +++ b/mh/mh_list.c @@ -629,7 +629,10 @@ print_header_value (struct eval_env *env, char *val) } if (env->bvar[B_UPPERCASE]) - mu_toupper (val); + { + for (p = val; *p; p++) + *p = mu_toupper (*p); + } if (env->bvar[B_COMPRESS]) for (p = val; *p; p++) diff --git a/mh/mh_whatnow.c b/mh/mh_whatnow.c index ba251af52..943af3e77 100644 --- a/mh/mh_whatnow.c +++ b/mh/mh_whatnow.c @@ -257,13 +257,13 @@ invoke (const char *compname, const char *defval, int argc, char **argv, return -1; } - xargv[0] = progname; + xargv[0] = (char*) progname; for (i = 1; i < argc; i++) xargv[i] = argv[i]; if (extra0) - xargv[i++] = extra0; + xargv[i++] = (char*) extra0; if (extra1) - xargv[i++] = extra1; + xargv[i++] = (char*) extra1; xargv[i++] = NULL; rc = mu_spawnvp (xargv[0], xargv, &status); free (xargv); |