Kouhei Sutou
kous****@users*****
2006年 11月 27日 (月) 18:05:49 JST
Index: tomoe/lib/tomoe-dict.c diff -u tomoe/lib/tomoe-dict.c:1.113 tomoe/lib/tomoe-dict.c:1.114 --- tomoe/lib/tomoe-dict.c:1.113 Mon Nov 27 17:55:05 2006 +++ tomoe/lib/tomoe-dict.c Mon Nov 27 18:05:48 2006 @@ -21,7 +21,7 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA * - * $Id: tomoe-dict.c,v 1.113 2006/11/27 08:55:05 kous Exp $ + * $Id: tomoe-dict.c,v 1.114 2006/11/27 09:05:48 kous Exp $ */ #include <stdio.h> @@ -322,19 +322,19 @@ } gboolean -tomoe_dict_unregister_char (TomoeDict* dict, const gchar *code_point) +tomoe_dict_unregister_char (TomoeDict* dict, const gchar *utf8) { GPtrArray *chars; TomoeChar *removed = NULL; guint i, index = -1; g_return_val_if_fail(dict, FALSE); - g_return_val_if_fail(code_point, FALSE); + g_return_val_if_fail(utf8, FALSE); chars = TOMOE_DICT_GET_PRIVATE(dict)->chars; for (i = 0; i < chars->len; i++) { TomoeChar *chr = g_ptr_array_index (chars, i); - if (0 == strcmp(tomoe_char_get_utf8(chr), code_point)) { + if (0 == strcmp(tomoe_char_get_utf8(chr), utf8)) { index = i; removed = chr; break; @@ -352,18 +352,18 @@ } TomoeChar * -tomoe_dict_get_char (TomoeDict* dict, const gchar *code_point) +tomoe_dict_get_char (TomoeDict* dict, const gchar *utf8) { GPtrArray *chars; guint i; g_return_val_if_fail(dict, NULL); - g_return_val_if_fail(code_point, NULL); + g_return_val_if_fail(utf8, NULL); chars = TOMOE_DICT_GET_PRIVATE(dict)->chars; for (i = 0; i < chars->len; i++) { TomoeChar *chr = g_ptr_array_index (chars, i); - if (0 == strcmp(tomoe_char_get_utf8(chr), code_point)) { + if (0 == strcmp(tomoe_char_get_utf8(chr), utf8)) { return chr; } } Index: tomoe/lib/tomoe-dict.h diff -u tomoe/lib/tomoe-dict.h:1.45 tomoe/lib/tomoe-dict.h:1.46 --- tomoe/lib/tomoe-dict.h:1.45 Mon Nov 27 17:52:01 2006 +++ tomoe/lib/tomoe-dict.h Mon Nov 27 18:05:48 2006 @@ -21,7 +21,7 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA * - * $Id: tomoe-dict.h,v 1.45 2006/11/27 08:52:01 kous Exp $ + * $Id: tomoe-dict.h,v 1.46 2006/11/27 09:05:48 kous Exp $ */ /** @@ -116,19 +116,19 @@ /** * @brief Unregister a character by code point * @param dict - Pointer to the TomoeDict object. - * @param code_point - Code point of the character. + * @param utf8 - UTF-8 encoded value of the character. */ gboolean tomoe_dict_unregister_char (TomoeDict *dict, - const gchar *code_point); + const gchar *utf8); /** * @brief Get a character by code point * @param dict - Pointer to the TomoeDict object. - * @param code_point - Code point of the character. + * @param utf8 - UTF-8 encoded value of the character. * @return TomoeChar object. */ TomoeChar *tomoe_dict_get_char (TomoeDict *dict, - const gchar *code_point); + const gchar *utf8); /** * @brief Return an GPtrArray of TomoeChar which is kept in a TomoeDict.