static int _ispell_provider_dictionary_exists (const char *const szFile) { std::vector <std::string> names; s_buildHashNames (names, szFile); for (size_t i = 0; i < names.size(); i++) { if (g_file_test (names[i].c_str(), G_FILE_TEST_EXISTS)) return 1; } return 0; }
static int uspell_provider_dictionary_exists (struct str_enchant_provider * me, const char *const tag) { std::vector <std::string> names; s_buildHashNames (names, me->owner, tag); for (size_t i = 0; i < names.size(); i++) { if (g_file_test (names[i].c_str(), G_FILE_TEST_EXISTS)) return 1; } return 0; }
char * ISpellChecker::loadDictionary (const char * szdict) { std::vector<std::string> dict_names; s_buildHashNames (dict_names, szdict); for (size_t i = 0; i < dict_names.size(); i++) { if (linit(const_cast<char*>(dict_names[i].c_str())) >= 0) return g_strdup (dict_names[i].c_str()); } return NULL; }