gucharmap r1651 - trunk/gucharmap
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gucharmap r1651 - trunk/gucharmap
- Date: Fri, 21 Mar 2008 10:50:42 +0000 (GMT)
Author: chpe
Date: Fri Mar 21 10:50:41 2008
New Revision: 1651
URL: http://svn.gnome.org/viewvc/gucharmap?rev=1651&view=rev
Log:
Remove gucharmap_unicode_canonical_decomposition; the glib bug that it worked
around has been fixed since 2.3.1 ! (Bug #100456)
Modified:
trunk/gucharmap/gucharmap-charmap.c
trunk/gucharmap/gucharmap-unicode-info.c
trunk/gucharmap/gucharmap-unicode-info.h
Modified: trunk/gucharmap/gucharmap-charmap.c
==============================================================================
--- trunk/gucharmap/gucharmap-charmap.c (original)
+++ trunk/gucharmap/gucharmap-charmap.c Fri Mar 21 10:50:41 2008
@@ -324,7 +324,7 @@
gsize result_len;
guint i;
- decomposition = gucharmap_unicode_canonical_decomposition (uc, &result_len);
+ decomposition = g_unicode_canonical_decomposition (uc, &result_len);
if (result_len == 1)
{
Modified: trunk/gucharmap/gucharmap-unicode-info.c
==============================================================================
--- trunk/gucharmap/gucharmap-unicode-info.c (original)
+++ trunk/gucharmap/gucharmap-unicode-info.c Fri Mar 21 10:50:41 2008
@@ -34,9 +34,6 @@
/* constants for hangul (de)composition, see UAX #15 */
#define SBase 0xAC00
-#define LBase 0x1100
-#define VBase 0x1161
-#define TBase 0x11A7
#define LCount 19
#define VCount 21
#define TCount 28
@@ -151,65 +148,6 @@
}
}
-/* http://www.unicode.org/unicode/reports/tr15/#Hangul */
-static gunichar *
-hangul_decomposition (gunichar s, gsize *result_len)
-{
- gunichar *r = g_malloc (3 * sizeof (gunichar));
- gint SIndex = s - SBase;
-
- /* not a hangul syllable */
- if (SIndex < 0 || SIndex >= SCount)
- {
- r[0] = s;
- *result_len = 1;
- }
- else
- {
- gunichar L = LBase + SIndex / NCount;
- gunichar V = VBase + (SIndex % NCount) / TCount;
- gunichar T = TBase + SIndex % TCount;
-
- r[0] = L;
- r[1] = V;
-
- if (T != TBase)
- {
- r[2] = T;
- *result_len = 3;
- }
- else
- *result_len = 2;
- }
-
- return r;
-}
-
-/*
- * See http://bugzilla.gnome.org/show_bug.cgi?id=100456
- *
- * gucharmap_unicode_canonical_decomposition:
- * @ch: a Unicode character.
- * @result_len: location to store the length of the return value.
- *
- * Computes the canonical decomposition of a Unicode character.
- *
- * Return value: a newly allocated string of Unicode characters.
- * @result_len is set to the resulting length of the string.
- */
-gunichar *
-gucharmap_unicode_canonical_decomposition (gunichar ch,
- gsize *result_len)
-{
- if (GLIB_CHECK_VERSION (2,3,1))
- return g_unicode_canonical_decomposition (ch, result_len);
- else
- if (ch >= 0xac00 && ch <= 0xd7af) /* Hangul syllable */
- return hangul_decomposition (ch, result_len);
- else
- return g_unicode_canonical_decomposition (ch, result_len);
-}
-
/* does a binary search on unicode_names */
G_CONST_RETURN gchar *
gucharmap_get_unicode_data_name (gunichar uc)
Modified: trunk/gucharmap/gucharmap-unicode-info.h
==============================================================================
--- trunk/gucharmap/gucharmap-unicode-info.h (original)
+++ trunk/gucharmap/gucharmap-unicode-info.h Fri Mar 21 10:50:41 2008
@@ -42,13 +42,6 @@
G_CONST_RETURN gchar * gucharmap_get_unicode_kJapaneseKun (gunichar uc);
G_CONST_RETURN gchar * gucharmap_get_unicode_kJapaneseOn (gunichar uc);
-/* A wrapper for g_unicode_canonical_decomposition that also does hangul
- * decomposition.
- * See http://bugzilla.gnome.org/show_bug.cgi?id=100456
- */
-gunichar * gucharmap_unicode_canonical_decomposition (gunichar ch,
- gsize *result_len);
-
/* nameslist stuff */
G_CONST_RETURN gchar ** gucharmap_get_nameslist_stars (gunichar wc);
G_CONST_RETURN gchar ** gucharmap_get_nameslist_equals (gunichar wc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]