commit-mailutils
[Top][All Lists]
Advanced

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

[SCM] GNU Mailutils branch, master, updated. release-2.2-248-g8800998


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-248-g8800998
Date: Thu, 02 Dec 2010 11:29:07 +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=88009983722512ea36ce3112ffb0cf657ca18d67

The branch, master has been updated
       via  88009983722512ea36ce3112ffb0cf657ca18d67 (commit)
      from  38d688c17f9545c032e22f117189b970e858697d (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 88009983722512ea36ce3112ffb0cf657ca18d67
Author: Sergey Poznyakoff <address@hidden>
Date:   Thu Dec 2 13:26:32 2010 +0200

    Minor change.
    
    * configure.ac: Remove checks for strtok_r, strchrnul, strndup,
    asprintf, vasprintf: none of these is used any more.
    * maidag/lmtp.c (lmtp_reply): Use mu_vasnprintf.
    * mh/mh.h (strchrnul): Remove proto.
    * mh/mh_list.c (want_header): Rewrite.
    (print): Use strcspn.

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

Summary of changes:
 configure.ac                    |   11 +----------
 libmailutils/stream/streamref.c |    2 +-
 maidag/lmtp.c                   |    5 +++--
 mh/mh.h                         |    4 ----
 mh/mh_init.c                    |    2 +-
 mh/mh_list.c                    |   35 +++++++++++++++++++++--------------
 6 files changed, 27 insertions(+), 32 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4412729..abcf5c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -492,22 +492,13 @@ else
 fi
 AC_FUNC_MMAP
 
-AC_CHECK_DECLS([strtok_r, strchrnul, strndup, asprintf, vasprintf, strsignal],
- , , [
-#include <stdio.h>
-#include <string.h>
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif])
+AC_CHECK_DECLS([strsignal])
 
 AC_CHECK_DECLS(environ, , ,
   [ #include <unistd.h>
     #include <stdlib.h> ])
 
 AH_BOTTOM([
-#if !HAVE_DECL_STRTOK_R
-extern char *strtok_r (char *s, const char *delim, char **save_ptr);
-#endif
 #if !HAVE_DECL_STRSIGNAL
 extern char *strsignal (int);
 #endif
diff --git a/libmailutils/stream/streamref.c b/libmailutils/stream/streamref.c
index f454d39..0558449 100644
--- a/libmailutils/stream/streamref.c
+++ b/libmailutils/stream/streamref.c
@@ -267,7 +267,7 @@ mu_streamref_create_abridged (mu_stream_t *pref, 
mu_stream_t str,
   int flags;
   struct _mu_streamref *sp;
   
-  rc = mu_stream_seek (str, 0, MU_SEEK_SET, &off);//FIXME: SEEK_CUR?
+  rc = mu_stream_seek (str, 0, MU_SEEK_SET, &off);/*FIXME: SEEK_CUR?*/
   if (rc)
     return rc;
   mu_stream_get_flags (str, &flags);
diff --git a/maidag/lmtp.c b/maidag/lmtp.c
index 4360e9f..7da0a71 100644
--- a/maidag/lmtp.c
+++ b/maidag/lmtp.c
@@ -59,10 +59,11 @@ void
 lmtp_reply (mu_stream_t iostr, char *code, char *enh, char *fmt, ...)
 {
   va_list ap;
-  char *str;
+  char *str = NULL;
+  size_t size = 0;
   
   va_start (ap, fmt);
-  vasprintf (&str, fmt, ap);
+  mu_vasnprintf (&str, &size, fmt, ap);
   va_end (ap);
 
   if (!str)
diff --git a/mh/mh.h b/mh/mh.h
index af0fc63..08a19fd 100644
--- a/mh/mh.h
+++ b/mh/mh.h
@@ -60,10 +60,6 @@
 
 #include <mu_umaxtostr.h>
 
-#if !HAVE_DECL_STRCHRNUL
-extern char *strchrnul (const char *s, int c_in);
-#endif
-
 #define MH_FMT_RALIGN  0x1000
 #define MH_FMT_ZEROPAD 0x2000
 #define MH_FMT_COMPWS  0x4000
diff --git a/mh/mh_init.c b/mh/mh_init.c
index 02e5e24..84c1e95 100644
--- a/mh/mh_init.c
+++ b/mh/mh_init.c
@@ -937,7 +937,7 @@ mh_charset (const char *dfl)
          /* Try to deduce the charset from LC_ALL variable */
          struct mu_lc_all lc_all;
          if (mu_parse_lc_all (getenv ("LC_ALL"), &lc_all, MU_LC_CSET) == 0)
-           saved_charset = lc_all.charset; /* FIXME: Memory leak */
+           saved_charset = lc_all.charset; /* FIXME: Mild memory leak */
        }
       charset = saved_charset;
     }
diff --git a/mh/mh_list.c b/mh/mh_list.c
index 4bc9583..d879251 100644
--- a/mh/mh_list.c
+++ b/mh/mh_list.c
@@ -480,16 +480,24 @@ header_is_printed (struct eval_env *env, const char *name)
 int
 want_header (struct eval_env *env, const char *name)
 {
-  char *p, *str = env->svar[S_IGNORES];
+  const char *p, *str;
 
-  for (p = strchrnul (str, ','); *str; p = strchrnul (str, ','))
+  for (str = env->svar[S_IGNORES], p = name; *str; str++)
     {
-      if (mu_c_strncasecmp (name, str, p - str) == 0)
-       return 0;
-      str = p;
-      if (*str)
-       str++;
+      if (p)
+       {
+         if (*p == 0 && *str == ',')
+           break;
+         if (mu_tolower (*p) == mu_tolower (*str))
+           p++;
+         else
+           p = NULL;
+       }
+      else if (*str == ',')
+       p = name;
     }
+  if (p && *p == 0)
+    return 0;
   return 1;
 }
 
@@ -577,16 +585,15 @@ print (struct eval_env *env, char *str, int nloff)
          newline (env);
          str++;
        }
-      else
+      else if (*str)
        {
-         char *p = strchrnul (str, '\n');
-         ovf_print (env, str, p - str, nloff);
-         str = p;
-         if (*p)
+         size_t size = strcspn (str, "\n");
+         ovf_print (env, str, size, nloff);
+         str += size;
+         if (*str == '\n')
            {
              newline (env);
-             for (str++; *str && mu_isspace (*str); str++)
-               ;
+             str = mu_str_skip_class (str + 1, MU_CTYPE_SPACE);
            }
        }
     }


hooks/post-receive
-- 
GNU Mailutils



reply via email to

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