From 96ba1917d82d1712677f2b7b3348b9e9fc231a98 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Mon, 4 Jun 2001 20:06:14 +0000 Subject: [PATCH] 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) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ glib/gstrfuncs.c | 6 ++++-- gstrfuncs.c | 6 ++++-- 10 files changed, 56 insertions(+), 4 deletions(-) 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++; } -- 2.34.1