Commit 96aa6ab8 authored by James M. Cape's avatar James M. Cape Committed by James M. Cape

Check for NULL before doing anything.

Tue Dec  3 01:05:00 2002  James M. Cape  <jcape@ignore-your.tv>

	* glib/gunicollate.c (g_utf8_collate, g_utf8_collate_key):
	Check for NULL before doing anything.
parent e2afe00e
Tue Dec 3 01:05:00 2002 James M. Cape <jcape@ignore-your.tv>
* glib/gunicollate.c (g_utf8_collate, g_utf8_collate_key):
Check for NULL before doing anything.
Mon Dec 2 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
* === Released 2.1.3 ===
......
Tue Dec 3 01:05:00 2002 James M. Cape <jcape@ignore-your.tv>
* glib/gunicollate.c (g_utf8_collate, g_utf8_collate_key):
Check for NULL before doing anything.
Mon Dec 2 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
* === Released 2.1.3 ===
......
Tue Dec 3 01:05:00 2002 James M. Cape <jcape@ignore-your.tv>
* glib/gunicollate.c (g_utf8_collate, g_utf8_collate_key):
Check for NULL before doing anything.
Mon Dec 2 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
* === Released 2.1.3 ===
......
Tue Dec 3 01:05:00 2002 James M. Cape <jcape@ignore-your.tv>
* glib/gunicollate.c (g_utf8_collate, g_utf8_collate_key):
Check for NULL before doing anything.
Mon Dec 2 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
* === Released 2.1.3 ===
......
Tue Dec 3 01:05:00 2002 James M. Cape <jcape@ignore-your.tv>
* glib/gunicollate.c (g_utf8_collate, g_utf8_collate_key):
Check for NULL before doing anything.
Mon Dec 2 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
* === Released 2.1.3 ===
......
Tue Dec 3 01:05:00 2002 James M. Cape <jcape@ignore-your.tv>
* glib/gunicollate.c (g_utf8_collate, g_utf8_collate_key):
Check for NULL before doing anything.
Mon Dec 2 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
* === Released 2.1.3 ===
......
Tue Dec 3 01:05:00 2002 James M. Cape <jcape@ignore-your.tv>
* glib/gunicollate.c (g_utf8_collate, g_utf8_collate_key):
Check for NULL before doing anything.
Mon Dec 2 16:34:13 2002 Owen Taylor <otaylor@redhat.com>
* === Released 2.1.3 ===
......
......@@ -53,8 +53,14 @@ g_utf8_collate (const gchar *str1,
#ifdef __STDC_ISO_10646__
gunichar *str1_norm = _g_utf8_normalize_wc (str1, -1, G_NORMALIZE_ALL_COMPOSE);
gunichar *str2_norm = _g_utf8_normalize_wc (str2, -1, G_NORMALIZE_ALL_COMPOSE);
gunichar *str1_norm;
gunichar *str2_norm;
g_return_val_if_fail (str1 != NULL, 0);
g_return_val_if_fail (str2 != NULL, 0);
str1_norm = _g_utf8_normalize_wc (str1, -1, G_NORMALIZE_ALL_COMPOSE);
str2_norm = _g_utf8_normalize_wc (str2, -1, G_NORMALIZE_ALL_COMPOSE);
result = wcscoll ((wchar_t *)str1_norm, (wchar_t *)str2_norm);
......@@ -64,8 +70,14 @@ g_utf8_collate (const gchar *str1,
#else /* !__STDC_ISO_10646__ */
const gchar *charset;
gchar *str1_norm = g_utf8_normalize (str1, -1, G_NORMALIZE_ALL_COMPOSE);
gchar *str2_norm = g_utf8_normalize (str2, -1, G_NORMALIZE_ALL_COMPOSE);
gchar *str1_norm;
gchar *str2_norm;
g_return_val_if_fail (str1 != NULL, 0);
g_return_val_if_fail (str2 != NULL, 0);
str1_norm = g_utf8_normalize (str1, -1, G_NORMALIZE_ALL_COMPOSE);
str2_norm = g_utf8_normalize (str2, -1, G_NORMALIZE_ALL_COMPOSE);
if (g_get_charset (&charset))
{
......@@ -169,11 +181,15 @@ g_utf8_collate_key (const gchar *str,
#ifdef __STDC_ISO_10646__
gunichar *str_norm = _g_utf8_normalize_wc (str, len, G_NORMALIZE_ALL_COMPOSE);
gunichar *str_norm;
wchar_t *result_wc;
size_t i;
size_t result_len = 0;
g_return_val_if_fail (str1 != NULL, NULL);
str_norm = _g_utf8_normalize_wc (str, len, G_NORMALIZE_ALL_COMPOSE);
setlocale (LC_COLLATE, "");
xfrm_len = wcsxfrm (NULL, (wchar_t *)str_norm, 0);
......@@ -197,7 +213,11 @@ g_utf8_collate_key (const gchar *str,
#else /* !__STDC_ISO_10646__ */
const gchar *charset;
gchar *str_norm = g_utf8_normalize (str, len, G_NORMALIZE_ALL_COMPOSE);
gchar *str_norm;
g_return_val_if_fail (str1 != NULL, NULL);
str_norm = g_utf8_normalize (str, len, G_NORMALIZE_ALL_COMPOSE);
if (g_get_charset (&charset))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment