diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-12-19 23:52:10 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-12-19 23:52:10 +0800 |
commit | 5d5a132d18b28c7fe3f6464b32c538d8a8955e48 (patch) | |
tree | 65905309e73426617923a6fb59df485781aefab7 /e-util/e-util.c | |
parent | c6373718ea5f71a6188fccac09d258655b859765 (diff) | |
download | gsoc2013-evolution-5d5a132d18b28c7fe3f6464b32c538d8a8955e48.tar gsoc2013-evolution-5d5a132d18b28c7fe3f6464b32c538d8a8955e48.tar.gz gsoc2013-evolution-5d5a132d18b28c7fe3f6464b32c538d8a8955e48.tar.bz2 gsoc2013-evolution-5d5a132d18b28c7fe3f6464b32c538d8a8955e48.tar.lz gsoc2013-evolution-5d5a132d18b28c7fe3f6464b32c538d8a8955e48.tar.xz gsoc2013-evolution-5d5a132d18b28c7fe3f6464b32c538d8a8955e48.tar.zst gsoc2013-evolution-5d5a132d18b28c7fe3f6464b32c538d8a8955e48.zip |
Made the parameter type of e_strdup_string a const. Made it not call
2000-12-19 Christopher James Lahey <clahey@helixcode.com>
* gal/util/e-util.c, gal/util/e-util.h (e_strdup_strip): Made the
parameter type of e_strdup_string a const. Made it not call
isspace on signed characters. Made the return type of
e_strstrcase non const again.
svn path=/trunk/; revision=7078
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r-- | e-util/e-util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c index e24903bc71..5bffc9e4a9 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -52,16 +52,16 @@ g_int_compare(const void *x, const void *y) } char * -e_strdup_strip(char *string) +e_strdup_strip(const char *string) { int i; int length = 0; int initial = 0; for ( i = 0; string[i]; i++ ) { - if (initial == i && isspace(string[i])) { + if (initial == i && isspace((unsigned char) string[i])) { initial ++; } - if (!isspace(string[i])) { + if (!isspace((unsigned char) string[i])) { length = i - initial + 1; } } @@ -500,7 +500,7 @@ e_strsplit (const gchar *string, return str_array; } -const gchar * +gchar * e_strstrcase (const gchar *haystack, const gchar *needle) { /* find the needle in the haystack neglecting case */ @@ -515,11 +515,11 @@ e_strstrcase (const gchar *haystack, const gchar *needle) return NULL; if (len == 0) - return haystack; + return (gchar *) haystack; for (ptr = haystack; *(ptr + len - 1) != '\0'; ptr++) if (!g_strncasecmp (ptr, needle, len)) - return ptr; + return (gchar *) ptr; return NULL; } |