mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01:00
Add gunicomp.h (Reported by Sven Neumann).
Wed Jul 11 11:13:50 2001 Owen Taylor <otaylor@redhat.com> * glib/Makefile.am (libglib_1_3_la_SOURCES): Add gunicomp.h (Reported by Sven Neumann). * glib/guniprop.c (g_utf8_str/updown) glib/gunicollate.c (g_utf8_collate_key): Fix shadowing problems reported by many (D. Adler, S. Neumann, M. Murmane, L. Peter)
This commit is contained in:
parent
11b0d06eee
commit
be44b99002
@ -1,3 +1,12 @@
|
||||
Wed Jul 11 11:13:50 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/Makefile.am (libglib_1_3_la_SOURCES): Add gunicomp.h
|
||||
(Reported by Sven Neumann).
|
||||
|
||||
* glib/guniprop.c (g_utf8_str/updown) glib/gunicollate.c
|
||||
(g_utf8_collate_key): Fix shadowing problems reported by
|
||||
many (D. Adler, S. Neumann, M. Murmane, L. Peter)
|
||||
|
||||
Fri Jul 6 00:02:41 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c (printf_string_upper_bound): fix negative exponent
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Jul 11 11:13:50 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/Makefile.am (libglib_1_3_la_SOURCES): Add gunicomp.h
|
||||
(Reported by Sven Neumann).
|
||||
|
||||
* glib/guniprop.c (g_utf8_str/updown) glib/gunicollate.c
|
||||
(g_utf8_collate_key): Fix shadowing problems reported by
|
||||
many (D. Adler, S. Neumann, M. Murmane, L. Peter)
|
||||
|
||||
Fri Jul 6 00:02:41 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c (printf_string_upper_bound): fix negative exponent
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Jul 11 11:13:50 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/Makefile.am (libglib_1_3_la_SOURCES): Add gunicomp.h
|
||||
(Reported by Sven Neumann).
|
||||
|
||||
* glib/guniprop.c (g_utf8_str/updown) glib/gunicollate.c
|
||||
(g_utf8_collate_key): Fix shadowing problems reported by
|
||||
many (D. Adler, S. Neumann, M. Murmane, L. Peter)
|
||||
|
||||
Fri Jul 6 00:02:41 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c (printf_string_upper_bound): fix negative exponent
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Jul 11 11:13:50 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/Makefile.am (libglib_1_3_la_SOURCES): Add gunicomp.h
|
||||
(Reported by Sven Neumann).
|
||||
|
||||
* glib/guniprop.c (g_utf8_str/updown) glib/gunicollate.c
|
||||
(g_utf8_collate_key): Fix shadowing problems reported by
|
||||
many (D. Adler, S. Neumann, M. Murmane, L. Peter)
|
||||
|
||||
Fri Jul 6 00:02:41 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c (printf_string_upper_bound): fix negative exponent
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Jul 11 11:13:50 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/Makefile.am (libglib_1_3_la_SOURCES): Add gunicomp.h
|
||||
(Reported by Sven Neumann).
|
||||
|
||||
* glib/guniprop.c (g_utf8_str/updown) glib/gunicollate.c
|
||||
(g_utf8_collate_key): Fix shadowing problems reported by
|
||||
many (D. Adler, S. Neumann, M. Murmane, L. Peter)
|
||||
|
||||
Fri Jul 6 00:02:41 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c (printf_string_upper_bound): fix negative exponent
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Jul 11 11:13:50 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/Makefile.am (libglib_1_3_la_SOURCES): Add gunicomp.h
|
||||
(Reported by Sven Neumann).
|
||||
|
||||
* glib/guniprop.c (g_utf8_str/updown) glib/gunicollate.c
|
||||
(g_utf8_collate_key): Fix shadowing problems reported by
|
||||
many (D. Adler, S. Neumann, M. Murmane, L. Peter)
|
||||
|
||||
Fri Jul 6 00:02:41 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c (printf_string_upper_bound): fix negative exponent
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Jul 11 11:13:50 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/Makefile.am (libglib_1_3_la_SOURCES): Add gunicomp.h
|
||||
(Reported by Sven Neumann).
|
||||
|
||||
* glib/guniprop.c (g_utf8_str/updown) glib/gunicollate.c
|
||||
(g_utf8_collate_key): Fix shadowing problems reported by
|
||||
many (D. Adler, S. Neumann, M. Murmane, L. Peter)
|
||||
|
||||
Fri Jul 6 00:02:41 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c (printf_string_upper_bound): fix negative exponent
|
||||
|
@ -1,3 +1,12 @@
|
||||
Wed Jul 11 11:13:50 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* glib/Makefile.am (libglib_1_3_la_SOURCES): Add gunicomp.h
|
||||
(Reported by Sven Neumann).
|
||||
|
||||
* glib/guniprop.c (g_utf8_str/updown) glib/gunicollate.c
|
||||
(g_utf8_collate_key): Fix shadowing problems reported by
|
||||
many (D. Adler, S. Neumann, M. Murmane, L. Peter)
|
||||
|
||||
Fri Jul 6 00:02:41 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c (printf_string_upper_bound): fix negative exponent
|
||||
|
@ -50,6 +50,7 @@ libglib_1_3_la_SOURCES = \
|
||||
gunibreak.c \
|
||||
gunichartables.h \
|
||||
gunicollate.c \
|
||||
gunicomp.h \
|
||||
gunidecomp.h \
|
||||
gunidecomp.c \
|
||||
gutils.c
|
||||
|
@ -165,7 +165,7 @@ g_utf8_collate_key (const gchar *str,
|
||||
gssize len)
|
||||
{
|
||||
gchar *result;
|
||||
size_t len;
|
||||
size_t xfrm_len;
|
||||
|
||||
#ifdef __STDC_ISO_10646__
|
||||
|
||||
@ -176,16 +176,16 @@ g_utf8_collate_key (const gchar *str,
|
||||
|
||||
setlocale (LC_COLLATE, "");
|
||||
|
||||
len = wcsxfrm (NULL, (wchar_t *)str_norm, 0);
|
||||
result_wc = g_new (wchar_t, len + 1);
|
||||
wcsxfrm (result_wc, (wchar_t *)str_norm, len + 1);
|
||||
xfrm_len = wcsxfrm (NULL, (wchar_t *)str_norm, 0);
|
||||
result_wc = g_new (wchar_t, xfrm_len + 1);
|
||||
wcsxfrm (result_wc, (wchar_t *)str_norm, xfrm_len + 1);
|
||||
|
||||
for (i=0; i < len; i++)
|
||||
for (i=0; i < xfrm_len; i++)
|
||||
result_len += utf8_encode (NULL, result_wc[i]);
|
||||
|
||||
result = g_malloc (result_len + 1);
|
||||
result_len = 0;
|
||||
for (i=0; i < len; i++)
|
||||
for (i=0; i < xfrm_len; i++)
|
||||
result_len += utf8_encode (result + result_len, result_wc[i]);
|
||||
|
||||
result[result_len] = '\0';
|
||||
@ -201,9 +201,9 @@ g_utf8_collate_key (const gchar *str,
|
||||
|
||||
if (g_get_charset (&charset))
|
||||
{
|
||||
len = strxfrm (NULL, str_norm, 0);
|
||||
result = g_malloc (len + 1);
|
||||
strxfrm (result, str_norm, len + 1);
|
||||
xfrm_len = strxfrm (NULL, str_norm, 0);
|
||||
result = g_malloc (xfrm_len + 1);
|
||||
strxfrm (result, str_norm, xfrm_len + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -211,22 +211,21 @@ g_utf8_collate_key (const gchar *str,
|
||||
|
||||
if (str_locale)
|
||||
{
|
||||
len = strxfrm (NULL, str_locale, 0);
|
||||
result = g_malloc (len + 2);
|
||||
xfrm_len = strxfrm (NULL, str_locale, 0);
|
||||
result = g_malloc (xfrm_len + 2);
|
||||
result[0] = 'A';
|
||||
strxfrm (result + 1, str_locale, len + 1);
|
||||
strxfrm (result + 1, str_locale, xfrm_len + 1);
|
||||
|
||||
g_free (str_locale);
|
||||
}
|
||||
else
|
||||
{
|
||||
len = strlen (str_norm);
|
||||
result = g_malloc (len + 2);
|
||||
xfrm_len = strlen (str_norm);
|
||||
result = g_malloc (xfrm_len + 2);
|
||||
result[0] = 'B';
|
||||
memcpy (result + 1, str_norm, len);
|
||||
result[len+1] = '\0';
|
||||
memcpy (result + 1, str_norm, xfrm_len);
|
||||
result[xfrm_len+1] = '\0';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
g_free (str_norm);
|
||||
|
@ -711,7 +711,7 @@ gchar *
|
||||
g_utf8_strup (const gchar *str,
|
||||
gssize len)
|
||||
{
|
||||
gsize len;
|
||||
gsize result_len;
|
||||
LocaleType locale_type;
|
||||
gchar *result;
|
||||
|
||||
@ -722,10 +722,10 @@ g_utf8_strup (const gchar *str,
|
||||
/*
|
||||
* We use a two pass approach to keep memory management simple
|
||||
*/
|
||||
len = real_toupper (str, len, NULL, locale_type);
|
||||
result = g_malloc (len + 1);
|
||||
result_len = real_toupper (str, len, NULL, locale_type);
|
||||
result = g_malloc (result_len + 1);
|
||||
real_toupper (str, len, result, locale_type);
|
||||
result[len] = '\0';
|
||||
result[result_len] = '\0';
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -827,7 +827,7 @@ gchar *
|
||||
g_utf8_strdown (const gchar *str,
|
||||
gssize len)
|
||||
{
|
||||
gsize len;
|
||||
gsize result_len;
|
||||
LocaleType locale_type;
|
||||
gchar *result;
|
||||
|
||||
@ -838,10 +838,10 @@ g_utf8_strdown (const gchar *str,
|
||||
/*
|
||||
* We use a two pass approach to keep memory management simple
|
||||
*/
|
||||
len = real_tolower (str, len, NULL, locale_type);
|
||||
result = g_malloc (len + 1);
|
||||
result_len = real_tolower (str, len, NULL, locale_type);
|
||||
result = g_malloc (result_len + 1);
|
||||
real_tolower (str, len, result, locale_type);
|
||||
result[len] = '\0';
|
||||
result[result_len] = '\0';
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user