-inline void ispell_store_replacement(char const *mis, string const & cor) {
- if(actual_spell_checker == ASC_ASPELL) {
- fputs("$$ra ", out);
- fputs(mis, out);
- fputc(',', out);
- fputs(cor.c_str(), out);
- fputc('\n', out);
- }
+isp_result * sc_check_word(string const & word)
+{
+ isp_result * result = new isp_result;
+#warning Why isnt word_ok a bool? (Lgb)
+ int word_ok = pspell_manager_check(sc, word.c_str());
+ Assert(word_ok != -1);
+
+ if (word_ok) {
+ result->flag = ISP_OK;
+ } else {
+ PspellWordList const * sugs =
+ pspell_manager_suggest(sc, word.c_str());
+ Assert(sugs != 0);
+ result->els = pspell_word_list_elements(sugs);
+ if (pspell_word_list_empty(sugs))
+ result->flag = ISP_UNKNOWN;
+ else
+ result->flag = ISP_MISSED;
+ }
+ return result;
+}
+
+
+static inline
+void close_spell_checker()
+{
+ pspell_manager_save_all_word_lists(sc);