From: Owen Taylor Date: Mon, 4 Jun 2001 20:06:14 +0000 (+0000) Subject: to match g_strcasecmp, check if it is lower/upper before converting to X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=96ba1917d82d1712677f2b7b3348b9e9fc231a98;p=dana%2Fcg-glib.git to match g_strcasecmp, check if it is lower/upper before converting to Mon Jun 4 16:02:57 2001 Owen Taylor * gstrfuncs.c (g_strup/strdown): to match g_strcasecmp, check if it is lower/upper before converting to upper/lower [ not required by ISO... ] (#55682, Jon Trowbridge) --- diff --git a/ChangeLog b/ChangeLog index 4e94c5f1..a297e83e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Jun 4 16:02:57 2001 Owen Taylor + + * gstrfuncs.c (g_strup/strdown): to match g_strcasecmp, + check if it is lower/upper before converting to upper/lower + [ not required by ISO... ] (#55682, Jon Trowbridge) + Mon Jun 4 15:59:15 2001 Owen Taylor * gunicode.h: Make a bit more standalone by adding include diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 4e94c5f1..a297e83e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Mon Jun 4 16:02:57 2001 Owen Taylor + + * gstrfuncs.c (g_strup/strdown): to match g_strcasecmp, + check if it is lower/upper before converting to upper/lower + [ not required by ISO... ] (#55682, Jon Trowbridge) + Mon Jun 4 15:59:15 2001 Owen Taylor * gunicode.h: Make a bit more standalone by adding include diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 4e94c5f1..a297e83e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Mon Jun 4 16:02:57 2001 Owen Taylor + + * gstrfuncs.c (g_strup/strdown): to match g_strcasecmp, + check if it is lower/upper before converting to upper/lower + [ not required by ISO... ] (#55682, Jon Trowbridge) + Mon Jun 4 15:59:15 2001 Owen Taylor * gunicode.h: Make a bit more standalone by adding include diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 4e94c5f1..a297e83e 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +Mon Jun 4 16:02:57 2001 Owen Taylor + + * gstrfuncs.c (g_strup/strdown): to match g_strcasecmp, + check if it is lower/upper before converting to upper/lower + [ not required by ISO... ] (#55682, Jon Trowbridge) + Mon Jun 4 15:59:15 2001 Owen Taylor * gunicode.h: Make a bit more standalone by adding include diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 4e94c5f1..a297e83e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Mon Jun 4 16:02:57 2001 Owen Taylor + + * gstrfuncs.c (g_strup/strdown): to match g_strcasecmp, + check if it is lower/upper before converting to upper/lower + [ not required by ISO... ] (#55682, Jon Trowbridge) + Mon Jun 4 15:59:15 2001 Owen Taylor * gunicode.h: Make a bit more standalone by adding include diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 4e94c5f1..a297e83e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Mon Jun 4 16:02:57 2001 Owen Taylor + + * gstrfuncs.c (g_strup/strdown): to match g_strcasecmp, + check if it is lower/upper before converting to upper/lower + [ not required by ISO... ] (#55682, Jon Trowbridge) + Mon Jun 4 15:59:15 2001 Owen Taylor * gunicode.h: Make a bit more standalone by adding include diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 4e94c5f1..a297e83e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Mon Jun 4 16:02:57 2001 Owen Taylor + + * gstrfuncs.c (g_strup/strdown): to match g_strcasecmp, + check if it is lower/upper before converting to upper/lower + [ not required by ISO... ] (#55682, Jon Trowbridge) + Mon Jun 4 15:59:15 2001 Owen Taylor * gunicode.h: Make a bit more standalone by adding include diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 4e94c5f1..a297e83e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Mon Jun 4 16:02:57 2001 Owen Taylor + + * gstrfuncs.c (g_strup/strdown): to match g_strcasecmp, + check if it is lower/upper before converting to upper/lower + [ not required by ISO... ] (#55682, Jon Trowbridge) + Mon Jun 4 15:59:15 2001 Owen Taylor * gunicode.h: Make a bit more standalone by adding include diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c index bf5ac55b..734118a7 100644 --- a/glib/gstrfuncs.c +++ b/glib/gstrfuncs.c @@ -974,7 +974,8 @@ g_strdown (gchar *string) while (*s) { - *s = tolower (*s); + if (isupper (*s)) + *s = tolower (*s); s++; } @@ -992,7 +993,8 @@ g_strup (gchar *string) while (*s) { - *s = toupper (*s); + if (islower (*s)) + *s = toupper (*s); s++; } diff --git a/gstrfuncs.c b/gstrfuncs.c index bf5ac55b..734118a7 100644 --- a/gstrfuncs.c +++ b/gstrfuncs.c @@ -974,7 +974,8 @@ g_strdown (gchar *string) while (*s) { - *s = tolower (*s); + if (isupper (*s)) + *s = tolower (*s); s++; } @@ -992,7 +993,8 @@ g_strup (gchar *string) while (*s) { - *s = toupper (*s); + if (islower (*s)) + *s = toupper (*s); s++; }