+inline
+void sc_insert_word(string const & word)
+{
+ ::fputc('*', out); // Insert word in personal dictionary
+ ::fputs(word.c_str(), out);
+ ::fputc('\n', out);
+}
+
+
+inline
+void sc_accept_word(string const & word)
+{
+ ::fputc('@', out); // Accept in this session
+ ::fputs(word.c_str(), out);
+ ::fputc('\n', out);
+}
+
+
+inline
+void sc_store_replacement(string const & mis, string const & cor) {
+ if (actual_spell_checker == ASC_ASPELL) {
+ ::fputs("$$ra ", out);
+ ::fputs(mis.c_str(), out);
+ ::fputc(',', out);
+ ::fputs(cor.c_str(), out);
+ ::fputc('\n', out);
+ }
+}
+
+#else
+
+PspellCanHaveError * spell_error_object;
+
+void init_spell_checker(BufferParams const &, string const & lang)
+{
+ PspellConfig * config = new_pspell_config();
+ string code;
+ split(lang, code, '_');
+ config->replace("language-tag", code.c_str());
+ spell_error_object = new_pspell_manager(config);
+ if (pspell_error_number(spell_error_object) != 0) {
+ spell_error = pspell_error_message(spell_error_object);
+ } else {
+ spell_error = 0;
+ sc = to_pspell_manager(spell_error_object);
+ spell_error_object = 0;
+ }
+}
+
+
+bool sc_still_alive() {
+ return true;
+}
+
+
+void sc_clean_up_after_error()
+{
+ delete_pspell_can_have_error(spell_error_object);
+}
+
+
+
+// Send word to pspell and get reply
+isp_result * sc_check_word(string const & word)