Subject: Commit: Get pspell to work again
From: Frodo Looijaard (frodol@dds.nl)
Date: Sat Jul 07 2001 - 19:26:01 CDT
(Frodo) Get pspell to work again.
The pspell code was a real mess; as nobody responded to my mails about it,
I assume nobody else is working on it right now.
I can still make it assert, but I am not convinced the pspell module is
causing this.
For those curious why I want to use pspell, and not ispell directly: pspell
understands my ispell directories, AbiWord does not. That's what pspell is
for: abstracting from the multiple ispell formats.
The following changes had to be made:
* ut_iconv.cpp function UT_convert:
- Return type is now (char *) instead of bool
Somehow, the result was never returned?!?
- The allocated size of the result is now big enough to append
\0 at the end
- The iconv return values are now correctly checked and the iconv
loop is correctly terminated when we are finished
* pspell_checker.cpp, functions toucs2 and fromucs2
- Both are rewritten. They now change a single argument.
* pspell_checker.cpp, functions utf16_to_utf8 and utf8_to_utf16
- They call UT_convert now in the correct way (for example, they
tried to do the conversion in the wrong direction!)
- They now understand that UT_convert returns sizes in bytes, not
in 'characters of perhaps 2 bytes long'
- They zero-terminate results correctly
- They handle NULL results from UT_convert correctly
* pspell_check.cpp, functions PSpellChecker::checkWord and ::suggestWord
- No longer use an arbitrary maximal word length of 256 characters
(which was not even checked, segfaults were a real possibility)
- Handle NULL results from utf*_to_utf* correctly
-- Frodo Looijaard <frodol@dds.nl> PGP key and more: http://huizen.dds.nl/~frodol Defenestration n. (formal or joc.): The act of removing Windows from your computer in disgust, usually followed by the installation of Linux or some other Unix-like operating system.
This archive was generated by hypermail 2b25 : Sat Jul 07 2001 - 19:26:11 CDT