+2003-08-05 Noah Levitt <nlevitt@columbia.edu>
+
+ * glib/guniprop.c: Get rid of "len" parameter to output_special_case
+ and output_marks, and make them work more like g_unichar_to_utf8,
+ fixing a bug in the process. (#118957)
+
2003-08-05 Hans Breuer <hans@breuer.org>
* glib/gnulib/makefile.msc : (new file) for msvc build
+2003-08-05 Noah Levitt <nlevitt@columbia.edu>
+
+ * glib/guniprop.c: Get rid of "len" parameter to output_special_case
+ and output_marks, and make them work more like g_unichar_to_utf8,
+ fixing a bug in the process. (#118957)
+
2003-08-05 Hans Breuer <hans@breuer.org>
* glib/gnulib/makefile.msc : (new file) for msvc build
+2003-08-05 Noah Levitt <nlevitt@columbia.edu>
+
+ * glib/guniprop.c: Get rid of "len" parameter to output_special_case
+ and output_marks, and make them work more like g_unichar_to_utf8,
+ fixing a bug in the process. (#118957)
+
2003-08-05 Hans Breuer <hans@breuer.org>
* glib/gnulib/makefile.msc : (new file) for msvc build
+2003-08-05 Noah Levitt <nlevitt@columbia.edu>
+
+ * glib/guniprop.c: Get rid of "len" parameter to output_special_case
+ and output_marks, and make them work more like g_unichar_to_utf8,
+ fixing a bug in the process. (#118957)
+
2003-08-05 Hans Breuer <hans@breuer.org>
* glib/gnulib/makefile.msc : (new file) for msvc build
+2003-08-05 Noah Levitt <nlevitt@columbia.edu>
+
+ * glib/guniprop.c: Get rid of "len" parameter to output_special_case
+ and output_marks, and make them work more like g_unichar_to_utf8,
+ fixing a bug in the process. (#118957)
+
2003-08-05 Hans Breuer <hans@breuer.org>
* glib/gnulib/makefile.msc : (new file) for msvc build
+2003-08-05 Noah Levitt <nlevitt@columbia.edu>
+
+ * glib/guniprop.c: Get rid of "len" parameter to output_special_case
+ and output_marks, and make them work more like g_unichar_to_utf8,
+ fixing a bug in the process. (#118957)
+
2003-08-05 Hans Breuer <hans@breuer.org>
* glib/gnulib/makefile.msc : (new file) for msvc build
return LOCALE_NORMAL;
}
-static int
+static gint
output_marks (const char **p_inout,
char *out_buffer,
- int len,
gboolean remove_dot)
{
const char *p = *p_inout;
+ gint len = 0;
while (*p)
{
if (ISMARK(t))
{
if (!remove_dot || c != 0x307 /* COMBINING DOT ABOVE */)
- len += g_unichar_to_utf8 (c, out_buffer ? out_buffer + len : NULL);
+ len += g_unichar_to_utf8 (c, out_buffer);
p = g_utf8_next_char (p);
}
else
return len;
}
-static gsize
+static gint
output_special_case (gchar *out_buffer,
- gsize len,
int offset,
int type,
int which)
{
const guchar *p = special_case_table + offset;
+ gint len;
if (type != G_UNICODE_TITLECASE_LETTER)
p = g_utf8_next_char (p);
}
g_free (decomp);
- len = output_marks (&p, out_buffer, len, TRUE);
+ len += output_marks (&p, out_buffer ? out_buffer + len : NULL, TRUE);
continue;
}
/* Nasty, need to move it after other combining marks .. this would go away if
* we normalized first.
*/
- len = output_marks (&p, out_buffer, len, FALSE);
+ len += output_marks (&p, out_buffer ? out_buffer + len : NULL, FALSE);
/* And output as GREEK CAPITAL LETTER IOTA */
len += g_unichar_to_utf8 (0x399, out_buffer ? out_buffer + len : NULL);
if (val >= 0x1000000)
{
- len += output_special_case (out_buffer, len, val - 0x1000000, t,
+ len += output_special_case (out_buffer ? out_buffer + len : NULL, val - 0x1000000, t,
t == G_UNICODE_LOWERCASE_LETTER ? 0 : 1);
}
else
if (val >= 0x1000000)
{
- len += output_special_case (out_buffer, len, val - 0x1000000, t, 0);
+ len += output_special_case (out_buffer ? out_buffer + len : NULL, val - 0x1000000, t, 0);
}
else
{