summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Lachowicz <domlachowicz@gmail.com>2008-03-02 00:33:29 +0000
committerDom Lachowicz <domlachowicz@gmail.com>2008-03-02 00:33:29 +0000
commit840b4280ed438ae6466c7e5c0028342f3f63abca (patch)
tree6dfe7ed06632b59c86a87e09c2d1e2492dac5baa
parente3c142600fb6d9b8740eec99284f1e75f746379c (diff)
downloadenchant-840b4280ed438ae6466c7e5c0028342f3f63abca.tar.gz
warnings--;
git-svn-id: svn+ssh://svn.abisource.com/svnroot/enchant/trunk@22989 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
-rw-r--r--src/enchant.c8
-rw-r--r--src/pwl.c19
2 files changed, 12 insertions, 15 deletions
diff --git a/src/enchant.c b/src/enchant.c
index 3423033..7a49713 100644
--- a/src/enchant.c
+++ b/src/enchant.c
@@ -120,7 +120,7 @@ _enchant_ensure_private_datadir (void)
g_free (config_dir);
}
-char *
+static char *
enchant_get_user_dir (void)
{
char * base_dir;
@@ -182,8 +182,6 @@ enchant_get_user_module_dir (void)
{
char* user_module_dir;
- char* base_dir = NULL;
-
user_module_dir = enchant_get_registry_value_ex (1, "Config", "Module_Dir");
if (user_module_dir)
return user_module_dir;
@@ -235,14 +233,12 @@ enchant_get_user_config_dir (void)
{
char* user_config;
- char* base_dir = NULL;
-
user_config = enchant_get_registry_value_ex (1, "Config", "Data_Dir");
if (user_config)
return user_config;
return enchant_get_user_dir();
- }
+}
/*
* Returns: the value if it exists and is not an empty string ("") or %null otherwise. Must be free'd.
diff --git a/src/pwl.c b/src/pwl.c
index 4a4b8fa..3816fa8 100644
--- a/src/pwl.c
+++ b/src/pwl.c
@@ -188,7 +188,6 @@ static void enchant_trie_matcher_pushpath(EnchantTrieMatcher* matcher,char* newc
static void enchant_trie_matcher_poppath(EnchantTrieMatcher* matcher,int num);
static int edit_dist(const char* word1, const char* word2);
-static char* soundex(const char* word);
static void
enchant_lock_file (FILE * f)
@@ -476,7 +475,7 @@ void enchant_pwl_remove(EnchantPWL *pwl,
}
}
-int enchant_pwl_contains(EnchantPWL *pwl, const char *const word, size_t len)
+static int enchant_pwl_contains(EnchantPWL *pwl, const char *const word, size_t len)
{
EnchantTrieMatcher* matcher;
int count = 0;
@@ -489,7 +488,7 @@ int enchant_pwl_contains(EnchantPWL *pwl, const char *const word, size_t len)
return (count == 0 ? 0 : 1);
}
-int enchant_is_all_caps(const char*const word, size_t len)
+static int enchant_is_all_caps(const char*const word, size_t len)
{
const char* it;
int hasCap = 0;
@@ -507,13 +506,15 @@ int enchant_is_all_caps(const char*const word, size_t len)
case G_UNICODE_TITLECASE_LETTER:
case G_UNICODE_LOWERCASE_LETTER:
return 0;
+ default:
+ break;
}
}
return hasCap;
}
-int enchant_is_title_case(const char*const word, size_t len)
+static int enchant_is_title_case(const char*const word, size_t len)
{
gunichar ch;
GUnicodeType type;
@@ -539,7 +540,7 @@ int enchant_is_title_case(const char*const word, size_t len)
return 1;
}
-gchar* enchant_utf8_strtitle(const gchar*str, gssize len)
+static gchar* enchant_utf8_strtitle(const gchar*str, gssize len)
{
gunichar title_case_char;
gchar* result;
@@ -607,9 +608,9 @@ static void enchant_pwl_check_cb(char* match,EnchantTrieMatcher* matcher)
(*((int*)(matcher->cbdata)))++;
}
-void enchant_pwl_case_and_denormalize_suggestions(EnchantPWL *pwl,
- const char *const word, size_t len,
- EnchantSuggList* suggs_list)
+static void enchant_pwl_case_and_denormalize_suggestions(EnchantPWL *pwl,
+ const char *const word, size_t len,
+ EnchantSuggList* suggs_list)
{
size_t i;
gchar* (*utf8_case_convert_function)(const gchar*str, gssize len);
@@ -645,7 +646,7 @@ void enchant_pwl_case_and_denormalize_suggestions(EnchantPWL *pwl,
}
}
-int best_distance(const char*const*const suggs, const char *const word, size_t len)
+static int best_distance(const char*const*const suggs, const char *const word, size_t len)
{
int best_dist;
const char*const* sugg_it;