commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Mailutils branch, master, updated. mu-1-2-90-separate-argp-cfg


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. mu-1-2-90-separate-argp-cfg-327-g5171c0f
Date: Thu, 20 Aug 2009 21:58:26 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=5171c0f91ea69eacd76068661db628f46f267c9e

The branch, master has been updated
       via  5171c0f91ea69eacd76068661db628f46f267c9e (commit)
      from  b9aaf724c6428fb4e0d01950d4d7113671e048e5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5171c0f91ea69eacd76068661db628f46f267c9e
Author: Sergey Poznyakoff <address@hidden>
Date:   Fri Aug 21 00:52:59 2009 +0300

    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.

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                  |    1 +
 examples/Makefile.am        |    2 +
 examples/argcv.c            |    3 +-
 examples/pop3client.c       |    1 +
 include/mailutils/gsasl.h   |    5 ++-
 include/mailutils/libcfg.h  |    3 +-
 include/mailutils/mu_auth.h |    4 +-
 include/mailutils/python.h  |   71 ++++++++++++++++++++++++++++--------------
 libmu_auth/radius.c         |    1 +
 libproto/mailer/smtp.c      |    2 +
 mail/mail.c                 |   30 ++++++++++--------
 mail/util.c                 |    2 +-
 mailbox/mu_auth.c           |    4 +-
 mh/mh.h                     |    6 ++--
 mh/mh_alias.y               |   15 +++++----
 mh/mh_list.c                |    5 ++-
 mh/mh_whatnow.c             |    6 ++--
 python/libmu_py/nls.c       |    1 -
 python/libmu_py/sieve.c     |    7 ++--
 19 files changed, 104 insertions(+), 65 deletions(-)

diff --git a/.gitignore b/.gitignore
index 6f60162..3f3f74e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,4 +24,5 @@ config.status
 configure
 libtool
 m4
+pathdefs.h
 stamp-h1
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 70ef8fe..bf378b5 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -123,12 +123,14 @@ lsf_LDADD = \
  @MU_AUTHLIBS@ \
  ${MU_LIB_MAILUTILS}
 
+muauth_CPPFLAGS = @MU_APP_COMMON_INCLUDES@
 muauth_LDADD = \
  ${MU_APP_LIBRARIES}\
  ${MU_LIB_AUTH}\
  @MU_AUTHLIBS@ \
  ${MU_LIB_MAILUTILS}
 
+muemail_CPPFLAGS = @MU_APP_COMMON_INCLUDES@
 muemail_LDADD = \
  ${MU_APP_LIBRARIES} \
  ${MU_LIB_MAILUTILS}
diff --git a/examples/argcv.c b/examples/argcv.c
index 007f62f..f25c81d 100644
--- a/examples/argcv.c
+++ b/examples/argcv.c
@@ -28,12 +28,11 @@
 #include <mailutils/errno.h>
 
 int
-main(int argc, char **argv)
+main (int argc, char **argv)
 {
   char *delim = "";
   char *comment = "#";
   char buf[512];
-  size_t n = 0;
   
   while (fgets (buf, sizeof buf, stdin))
     {
diff --git a/examples/pop3client.c b/examples/pop3client.c
index c073fe9..a404038 100644
--- a/examples/pop3client.c
+++ b/examples/pop3client.c
@@ -156,6 +156,7 @@ pop_session_str (enum pop_session_status stat)
     case pop_session_logged_in:
       return "logged in";
     }
+  return "unknown";
 }
 
 char *
diff --git a/include/mailutils/gsasl.h b/include/mailutils/gsasl.h
index fbd7094..6067746 100644
--- a/include/mailutils/gsasl.h
+++ b/include/mailutils/gsasl.h
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2007, 2008, 
+   2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -32,7 +33,7 @@ int mu_gsasl_module_init (enum mu_gocs_op, void *);
 
 struct mu_gsasl_module_data mu_gsasl_module_data;
 
-#ifdef USE_GSASL
+#ifdef WITH_GSASL
 #include <gsasl.h>
 
 int mu_gsasl_stream_create (mu_stream_t *stream, mu_stream_t transport,
diff --git a/include/mailutils/libcfg.h b/include/mailutils/libcfg.h
index acc2062..79dda00 100644
--- a/include/mailutils/libcfg.h
+++ b/include/mailutils/libcfg.h
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -51,6 +51,7 @@ extern int mu_register_cfg_capa (const char *name,
 extern void mu_libcfg_init (char **cnames);
 extern int mu_parse_config_files (struct mu_cfg_param *param,
                                  void *target_ptr);
+extern void mu_acl_cfg_init (void);
 
 #define __mu_common_cat2__(a,b) a ## b
 #define __mu_common_cat3__(a,b,c) a ## b ## c
diff --git a/include/mailutils/mu_auth.h b/include/mailutils/mu_auth.h
index 7dc7922..5bd76ed 100644
--- a/include/mailutils/mu_auth.h
+++ b/include/mailutils/mu_auth.h
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2002, 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -99,7 +99,7 @@ extern struct mu_auth_data *
 mu_get_auth_by_uid (uid_t uid);
 
 extern int
-mu_authenticate (struct mu_auth_data *auth_data, char *pass);
+mu_authenticate (struct mu_auth_data *auth_data, const char *pass);
 
 extern int mu_auth_nosupport (struct mu_auth_data **return_data,
                              const void *key,
diff --git a/include/mailutils/python.h b/include/mailutils/python.h
index e24501d..ca90c5c 100644
--- a/include/mailutils/python.h
+++ b/include/mailutils/python.h
@@ -25,107 +25,128 @@
 extern "C" {
 #endif
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_address_t addr;
 } PyAddress;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_attribute_t attr;
 } PyAttribute;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_authority_t auth;
 } PyAuthority;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_ticket_t ticket;
 } PyTicket;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_wicket_t wicket;
 } PyWicket;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   struct mu_auth_data *auth_data;
 } PyAuthData;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_body_t body;
 } PyBody;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_debug_t dbg;
 } PyDebug;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_envelope_t env;
 } PyEnvelope;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_folder_t folder;
 } PyFolder;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_header_t hdr;
 } PyHeader;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_mailbox_t mbox;
 } PyMailbox;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_mailcap_t mc;
 } PyMailcap;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_mailcap_entry_t entry;
 } PyMailcapEntry;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_mailer_t mlr;
 } PyMailer;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_message_t msg;
 } PyMessage;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_mime_t mime;
 } PyMime;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_secret_t secret;
 } PySecret;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_sieve_machine_t mach;
 } PySieveMachine;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_stream_t stm;
 } PyStream;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_url_t url;
 } PyUrl;
@@ -186,13 +207,15 @@ extern int PyMessage_Check (PyObject *x);
 extern int PySecret_Check (PyObject *x);
 extern int PyStream_Check (PyObject *x);
 
-typedef struct {
+typedef struct
+{
   char *name;
   PyObject *obj;
 } mu_py_dict;
 
-typedef struct {
-  char *module_name;
+typedef struct
+{
+  const char *module_name;
   mu_py_dict *attrs;
 } mu_py_script_data;
 
diff --git a/libmu_auth/radius.c b/libmu_auth/radius.c
index 4e7e39c..1a63d40 100644
--- a/libmu_auth/radius.c
+++ b/libmu_auth/radius.c
@@ -46,6 +46,7 @@
 #ifdef ENABLE_RADIUS
 
 #include <radius/radius.h>
+#include <radius/debug.h>
 
 static int radius_auth_enabled;
 
diff --git a/libproto/mailer/smtp.c b/libproto/mailer/smtp.c
index 1557cc4..c2e9ab2 100644
--- a/libproto/mailer/smtp.c
+++ b/libproto/mailer/smtp.c
@@ -50,6 +50,8 @@
 #include <mailutils/url.h>
 #include <mailutils/tls.h>
 #include <mailutils/md5.h>
+#include <mailutils/io.h>
+#include <mailutils/secret.h>
 #include <mailutils/cctype.h>
 #include <mailutils/cstr.h>
 
diff --git a/mail/mail.c b/mail/mail.c
index fbc08a2..64aad6c 100644
--- a/mail/mail.c
+++ b/mail/mail.c
@@ -38,20 +38,24 @@ static char args_doc[] = N_("[address...]\n-f [OPTION...] 
[file]\n--file [OPTION
 #define F_OPTION 256
 
 static struct argp_option options[] = {
-  { NULL,     'f', 0,      OPTION_HIDDEN, NULL, 0 },
-  {"file",    F_OPTION,    "FILE",   OPTION_ARG_OPTIONAL|OPTION_HIDDEN, 0},
-
-  {"exist",   'e', 0,      0, N_("Return true if mail exists"), 0},
-  {"byname",  'F', 0,      0, N_("Save messages according to sender"), 0},
-  {"headers", 'H', 0,      0, N_("Write a header summary and exit"), 0},
-  {"ignore",  'i', 0,      0, N_("Ignore interrupts"), 0},
-  {"norc",    'n', 0,      0, N_("Do not read the system mailrc file"), 0},
-  {"nosum",   'N', 0,      0, N_("Do not display initial header summary"), 0},
-  {"print",   'p', 0,      0, N_("Print all mail to standard output"), 0},
-  {"quit",    'q', 0,      0, N_("Cause interrupts to terminate program"), 0},
-  {"read",    'r', 0,      0, N_("Same as -p"), 0},
-  {"subject", 's', N_("SUBJ"), 0, N_("Send a message with a Subject of SUBJ"), 
0},
-  {"to",      't', 0,      0, N_("Precede message by a list of addresses"), 0},
+  { NULL,     'f', NULL,      OPTION_HIDDEN, NULL, 0 },
+  {"file",    F_OPTION, "FILE",   OPTION_ARG_OPTIONAL|OPTION_HIDDEN, 0},
+
+  {"exist",   'e', NULL,      0, N_("Return true if mail exists"), 0},
+  {"byname",  'F', NULL,      0, N_("Save messages according to sender"), 0},
+  {"headers", 'H', NULL,      0, N_("Write a header summary and exit"), 0},
+  {"ignore",  'i', NULL,      0, N_("Ignore interrupts"), 0},
+  {"norc",    'n', NULL,      0, N_("Do not read the system mailrc file"), 0},
+  {"nosum",   'N', NULL,      0,
+   N_("Do not display initial header summary"), 0},
+  {"print",   'p', NULL,      0, N_("Print all mail to standard output"), 0},
+  {"read",    'r', NULL,      OPTION_ALIAS },
+  {"quit",    'q', NULL,      0,
+   N_("Cause interrupts to terminate program"), 0},
+  {"subject", 's', N_("SUBJ"), 0,
+   N_("Send a message with the given SUBJECT"), 0},
+  {"to",      't', NULL,      0,
+   N_("Precede message by a list of addresses"), 0},
   {"user",    'u', N_("USER"), 0, N_("Operate on USER's mailbox"), 0},
   {"append",  'a', N_("HEADER: VALUE"), 0,
    N_("Append given header to the message being sent"), 0},
diff --git a/mail/util.c b/mail/util.c
index d2f342e..b6c3ba5 100644
--- a/mail/util.c
+++ b/mail/util.c
@@ -1084,7 +1084,7 @@ void
 util_rfc2047_decode (char **value)
 {
   char locale[32];
-  char *charset = NULL;
+  const char *charset = NULL;
   char *tmp;
   int rc;
 
diff --git a/mailbox/mu_auth.c b/mailbox/mu_auth.c
index 2dc237c..1e6c276 100644
--- a/mailbox/mu_auth.c
+++ b/mailbox/mu_auth.c
@@ -296,7 +296,7 @@ mu_get_auth_by_uid (uid_t uid)
 static mu_list_t mu_authenticate_list, _tmp_authenticate_list;
 
 int
-mu_authenticate (struct mu_auth_data *auth_data, char *pass)
+mu_authenticate (struct mu_auth_data *auth_data, const char *pass)
 {
   if (!auth_data)
     return EINVAL;
@@ -305,7 +305,7 @@ mu_authenticate (struct mu_auth_data *auth_data, char *pass)
              auth_data->name, auth_data->source);
   if (!mu_authenticate_list)
     mu_auth_begin_setup ();
-  return mu_auth_runlist (mu_authenticate_list, NULL, auth_data, pass);
+  return mu_auth_runlist (mu_authenticate_list, NULL, auth_data, (void*) pass);
 }
 
 
diff --git a/mh/mh.h b/mh/mh.h
index 7a24642..8631626 100644
--- a/mh/mh.h
+++ b/mh/mh.h
@@ -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 c34e386..06b2cc5 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 543ce1d..ac9fc59 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 ba251af..943af3e 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);
diff --git a/python/libmu_py/nls.c b/python/libmu_py/nls.c
index 8b81310..9b3aba0 100644
--- a/python/libmu_py/nls.c
+++ b/python/libmu_py/nls.c
@@ -32,7 +32,6 @@ api_nls_init (PyObject *self)
 static PyObject *
 api_nls_set_locale (PyObject *self, PyObject *args)
 {
-  int status;
   char *lset;
   const char *locale;
 
diff --git a/python/libmu_py/sieve.c b/python/libmu_py/sieve.c
index 38c1d37..feb5a3a 100644
--- a/python/libmu_py/sieve.c
+++ b/python/libmu_py/sieve.c
@@ -206,7 +206,7 @@ _sieve_error_printer (void *data, const char *fmt, va_list 
ap)
       PyObject *py_fnc = s->py_error_printer;
 
       if (mu_vasnprintf (&buf, &buflen, fmt, ap))
-       return;
+       return 0;
       PyTuple_SetItem (py_args, 0, PyString_FromString (buf ? buf : ""));
       if (buf)
        free (buf);
@@ -237,7 +237,7 @@ _sieve_parse_error_printer (void *data, const char 
*filename, int lineno,
       PyDict_SetItemString (py_dict, "lineno", PyInt_FromLong (lineno));
 
       if (mu_vasnprintf (&buf, &buflen, fmt, ap))
-       return;
+       return 0;
       PyDict_SetItemString (py_dict, "text",
                            PyString_FromString (buf ? buf : ""));
       if (buf)
@@ -259,6 +259,7 @@ _sieve_parse_error_printer (void *data, const char 
*filename, int lineno,
          Py_DECREF (py_args);
        }
     }
+  return 0;
 }
 
 static int
@@ -274,7 +275,7 @@ _sieve_debug_printer (void *data, const char *fmt, va_list 
ap)
       PyObject *py_fnc = s->py_debug_printer;
 
       if (mu_vasnprintf (&buf, &buflen, fmt, ap))
-       return;
+       return 0;
       PyTuple_SetItem (py_args, 0, PyString_FromString (buf ? buf : ""));
       if (buf)
        free (buf);


hooks/post-receive
-- 
GNU Mailutils




reply via email to

[Prev in Thread] Current Thread [Next in Thread]