void CreateSpeller(char * affPath, char * dictPath, HWND hMain, COLORREF color){ char *enc; m_hMain = hMain; if(m_hh){ Hunspell_destroy(m_hh); m_hh = NULL; } m_hh = Hunspell_create(affPath, dictPath); enc = _strdup(Hunspell_get_dic_encoding(m_hh)); enc = _normalizeCodePage(enc); m_CodePage = SendMessage(hMain, SPM_GETCODEPAGE, 0, (LPARAM)enc); free(enc); if(m_Pen){ DeleteObject(m_Pen); m_Pen = NULL; } m_Pen = CreatePen(PS_SOLID, 1, color); strcpy(m_CustPath, affPath); PathRemoveFileSpec(m_CustPath); strcat(m_CustPath, "\\"); _loadCustomDictionary(); }
TCommandLine::~TCommandLine() { Hunspell_destroy(mpHunspell); }
void spellcheck_destroy(void * chk) { Hunhandle *h = (Hunhandle *) chk; Hunspell_destroy(h); }
MainWindow::~MainWindow() { Hunspell_destroy(spellChecker); delete ui; }
void DestroySpeller(void){ if(m_hh){ Hunspell_destroy(m_hh); m_hh = NULL; } }
static void HunSpell_dealloc(HunSpell * self) { Hunspell_destroy(self->handle); self->ob_type->tp_free((PyObject *)self); }
static void HunSpell_dealloc(HunSpell * self) { Hunspell_destroy(self->handle); Py_TYPE(self)->tp_free((PyObject *)self); }