diff options
author | Dom Lachowicz <domlachowicz@gmail.com> | 2006-02-04 18:42:13 +0000 |
---|---|---|
committer | Dom Lachowicz <domlachowicz@gmail.com> | 2006-02-04 18:42:13 +0000 |
commit | 6fc285a37db93a14792fcaa8dfc71d9ce6a4bf98 (patch) | |
tree | 6dba4d6e818d9574f7ae5848d0e7d1a16a59175f | |
parent | 1027a0b5dc3e632289226d51c618ff848eab8931 (diff) | |
download | enchant-6fc285a37db93a14792fcaa8dfc71d9ce6a4bf98.tar.gz |
fix hspell backend
git-svn-id: svn+ssh://svn.abisource.com/svnroot/enchant/trunk@21100 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | src/hspell/hspell_provider.c | 25 |
2 files changed, 14 insertions, 13 deletions
diff --git a/configure.in b/configure.in index f2dade5..0191224 100644 --- a/configure.in +++ b/configure.in @@ -11,7 +11,7 @@ ENCHANT_MINOR_VERSION=2 dnl 3) Increment when interfaces not changed at all, dnl only bug fixes or internal changes made. dnl 4b) Set to zero when adding, removing or changing interfaces. -ENCHANT_MICRO_VERSION=1 +ENCHANT_MICRO_VERSION=2 dnl dnl Set this too MAJOR_VERSION_PLUS_MINOR_VERSION=`expr $ENCHANT_MAJOR_VERSION + $ENCHANT_MINOR_VERSION` diff --git a/src/hspell/hspell_provider.c b/src/hspell/hspell_provider.c index f979f70..fbc48de 100644 --- a/src/hspell/hspell_provider.c +++ b/src/hspell/hspell_provider.c @@ -106,9 +106,9 @@ hspell_dict_check (EnchantDict * me, const char *const word, size_t len) gsize length; int preflen; struct dict_radix *hspell_dict; - + hspell_dict = (struct dict_radix *)me->user_data; - + /* convert to iso 8859-8 */ iso_word = g_convert (word, len, "iso8859-8", "utf-8", NULL, &length, NULL); @@ -119,7 +119,7 @@ hspell_dict_check (EnchantDict * me, const char *const word, size_t len) g_free (iso_word); return FALSE; } - + /* check */ res = hspell_check_word (hspell_dict, iso_word, &preflen); @@ -148,7 +148,7 @@ hspell_dict_suggest (EnchantDict * me, const char *const word, char **sugg_arr = NULL; struct corlist cl; struct dict_radix *hspell_dict; - + hspell_dict = (struct dict_radix *)me->user_data; /* convert to iso 8859-8 */ @@ -187,7 +187,7 @@ hspell_provider_request_dict (EnchantProvider * me, const char *const tag) EnchantDict *dict; int dict_flag = 0; struct dict_radix *hspell_dict = NULL; - + if(!((strlen(tag) >= 2) && tag[0] == 'h' && tag[1] == 'e')) return NULL; @@ -212,9 +212,9 @@ static void hspell_provider_dispose_dict (EnchantProvider * me, EnchantDict * dict) { struct dict_radix *hspell_dict; - + hspell_dict = (struct dict_radix *)dict->user_data; - + /* deleting the dict is not posible on hspell ver. < v.0.8 */ #if (HSPELL_VERSION_MAJOR > 0) || (HSPELL_VERSION_MINOR >= 8) hspell_uninit (hspell_dict); @@ -230,12 +230,12 @@ hspell_provider_list_dicts (EnchantProvider * me, { char ** out_list = NULL; *out_n_dicts = 0; - + #ifdef ENCHANT_HSPELL_DICT_DIR - + { char * hspell_dictionary; - + hspell_dictionary = g_build_filename(ENCHANT_HSPELL_DICT_DIR, "hebrew.wgz"); if(hspell_dictionary && g_file_test (hspell_dictionary, G_FILE_TEST_EXISTS)) { *out_n_dicts = 2; @@ -245,10 +245,11 @@ hspell_provider_list_dicts (EnchantProvider * me, out_list[0] = g_strdup ("he_IL"); out_list[1] = g_strdup ("he"); } - + g_free(hspell_dictionary); + } #endif - + return out_list; } |