aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-03-02 01:31:33 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-03-02 01:31:33 +0800
commit90dabbdb225e6c5be9ee5def817254e3aa65040c (patch)
tree2962eb0f14cd3f58f1886288803a41d85eb64470
parent47497db453865f7db72ec6aa3ff553762b1b501e (diff)
downloadgsoc2013-evolution-90dabbdb225e6c5be9ee5def817254e3aa65040c.tar
gsoc2013-evolution-90dabbdb225e6c5be9ee5def817254e3aa65040c.tar.gz
gsoc2013-evolution-90dabbdb225e6c5be9ee5def817254e3aa65040c.tar.bz2
gsoc2013-evolution-90dabbdb225e6c5be9ee5def817254e3aa65040c.tar.lz
gsoc2013-evolution-90dabbdb225e6c5be9ee5def817254e3aa65040c.tar.xz
gsoc2013-evolution-90dabbdb225e6c5be9ee5def817254e3aa65040c.tar.zst
gsoc2013-evolution-90dabbdb225e6c5be9ee5def817254e3aa65040c.zip
Reconstify variables to match iconv.
2001-03-02 Not Zed <NotZed@Ximian.com> * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word): Reconstify variables to match iconv. * camel-search-private.c (camel_ustrstrcase): Change some assertions back into valid returns. svn path=/trunk/; revision=8452
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/camel-mime-utils.c4
-rw-r--r--camel/camel-search-private.c7
3 files changed, 15 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 24f3b2805b..9f85cf2203 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,11 @@
+2001-03-02 Not Zed <NotZed@Ximian.com>
+
+ * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word):
+ Reconstify variables to match iconv.
+
+ * camel-search-private.c (camel_ustrstrcase): Change some
+ assertions back into valid returns.
+
2001-03-01 Dan Winship <danw@ximian.com>
* Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index b663ffab90..ad2a200708 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -902,7 +902,7 @@ rfc2047_decode_word(const char *in, int len)
{
const char *inptr = in+2;
const char *inend = in+len-2;
- char *inbuf;
+ const char *inbuf;
char *encname;
int tmplen;
int ret;
@@ -1143,7 +1143,7 @@ rfc2047_encode_word(GString *outstring, const char *in, int len, const char *typ
iconv_t ic = (iconv_t *)-1;
char *buffer, *out, *ascii;
size_t inlen, outlen, enclen, bufflen;
- char *inptr, *p;
+ const char *inptr, *p;
int first = 1;
d(printf("Converting [%d] '%.*s' to %s\n", len, len, in, type));
diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c
index a288e91ca6..a6a87c0728 100644
--- a/camel/camel-search-private.c
+++ b/camel/camel-search-private.c
@@ -247,8 +247,11 @@ camel_ustrstrcase (const char *haystack, const char *needle)
g_return_val_if_fail (haystack != NULL, NULL);
g_return_val_if_fail (needle != NULL, NULL);
- g_return_val_if_fail (strlen (needle) != 0, haystack);
- g_return_val_if_fail (strlen (haystack) != 0, NULL);
+
+ if (strlen(needle) == 0)
+ return haystack;
+ if (strlen(haystack) == 0)
+ return NULL;
puni = nuni = alloca (sizeof (unicode_char_t) * strlen (needle));