mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 19:07:52 +02:00
move $enable_debug down below checks for GCC to avoid setting CFLAGS
Fri Jan 5 11:25:42 2001 Owen Taylor <otaylor@redhat.com> * configure.in (PACKAGE): move $enable_debug down below checks for GCC to avoid setting CFLAGS prematurely, change checks to avoid adding -g twice. * gutf8.c (g_ucs4_to_utf8): Support len < 0 to mean 0 termination. * gutf8.c (g_utf8_to_ucs4): Terminate result with 0. * tests/mainloop-test.c (main): Fix uses of g_main_loop_destroy(). * tests/unicode-encoding.c tests/Makefile.am tests/utf8.txt: Tests for unicode-conversion code. * gconvert.c (g_convert, g_convert_with_fallback): work around a couple of GNU libc bugs. * gconvert.[ch] (g_{locale,filename}_{to,from}_utf8): Standardize arguments to match g_convert(). Document. * gunicode.[ch]: - Implement conversion functions to and from UTF-16 - Standardize unicode conversion functions on prototype like g_convert. - Add a lot of error checking to unicode conversion functions. * gunicode.[ch] (g_utf8_to_ucs4_fast): Add fast, non-checking variant of g_utf8_to_ucs4. * gutf8.c (g_utf8_validate): - add g_return_if_fail (str != NULL). - add checks for overlong strings, non-valid Unicode characters (>= 110000) and single surrogates.
This commit is contained in:
@@ -206,18 +206,39 @@ gchar *g_utf8_strchr (const gchar *p,
|
||||
gchar *g_utf8_strrchr (const gchar *p,
|
||||
gunichar c);
|
||||
|
||||
gunichar2 *g_utf8_to_utf16 (const gchar *str,
|
||||
gint len);
|
||||
gunichar * g_utf8_to_ucs4 (const gchar *str,
|
||||
gint len);
|
||||
gunichar * g_utf16_to_ucs4 (const gunichar2 *str,
|
||||
gint len);
|
||||
gchar * g_utf16_to_utf8 (const gunichar2 *str,
|
||||
gint len);
|
||||
gunichar * g_ucs4_to_utf16 (const gunichar *str,
|
||||
gint len);
|
||||
gchar * g_ucs4_to_utf8 (const gunichar *str,
|
||||
gint len);
|
||||
gunichar2 *g_utf8_to_utf16 (const gchar *str,
|
||||
gint len,
|
||||
gint *items_read,
|
||||
gint *items_written,
|
||||
GError **error);
|
||||
gunichar * g_utf8_to_ucs4 (const gchar *str,
|
||||
gint len,
|
||||
gint *items_read,
|
||||
gint *items_written,
|
||||
GError **error);
|
||||
gunichar * g_utf8_to_ucs4_fast (const gchar *str,
|
||||
gint len,
|
||||
gint *items_written);
|
||||
gunichar * g_utf16_to_ucs4 (const gunichar2 *str,
|
||||
gint len,
|
||||
gint *items_read,
|
||||
gint *items_written,
|
||||
GError **error);
|
||||
gchar * g_utf16_to_utf8 (const gunichar2 *str,
|
||||
gint len,
|
||||
gint *items_read,
|
||||
gint *items_written,
|
||||
GError **error);
|
||||
gunichar2 *g_ucs4_to_utf16 (const gunichar *str,
|
||||
gint len,
|
||||
gint *items_read,
|
||||
gint *items_written,
|
||||
GError **error);
|
||||
gchar * g_ucs4_to_utf8 (const gunichar *str,
|
||||
gint len,
|
||||
gint *items_read,
|
||||
gint *items_written,
|
||||
GError **error);
|
||||
|
||||
/* Convert a single character into UTF-8. outbuf must have at
|
||||
* least 6 bytes of space. Returns the number of bytes in the
|
||||
|
Reference in New Issue
Block a user