Re: hash tables and other irix issues.

Shaw Terwilliger (sterwill@postman.abisource.com)
Thu, 10 Jun 1999 00:58:23 -0500


On Thu, Jun 10, 1999 at 06:18:10AM +0100, Gary Thomas wrote:
> On 10-Jun-99 Michael Pruett wrote:
> > Anyway, the hash table files for the dictionaries are apparently in
> > little endian byte order:
> >
> > Illegal format hash table /usr/local/AbiSuite/dictionary/american.hash -
> > expected magic 0x9602, got 0x296
> >
>
> This is also a problem with Linux/PPC, and I would assume Linux/SPARC
> as well.

It's a problem on all big-endian platforms (SPARC, PPC, MIPS) with
Linux, the BSD derivatives, Solaris, IRIX, etc. There was work started
on our ispell library (in our tree) to have it automatically convert
endianness on loading the hash. This work isn't finished, but you
should be able to use your own ispell hash file if you have one around.

> Can you document/expose how the hash tables are built, possibly allowing
> them to be updated on a per-platform basis? Or should I/we investigate
> how to make the hash support code endian-safe? [Not an appealing option]

The hash files are the same files ispell would install if you compiled
and installed it on your computer. If it's installed, you've probably
already got some dictionaries (/usr/share/ispell, /usr/lib/ispell are good
places to check). You can simply change your ~/.AbiSuite/AbiWord.Profile
to point to any dictionary you may have on your system. This is one of
those features that will soon be a dialog box entry. :)

Just clone the "_builtin_ section and rename it anything you want. Make
sure that cloned section is referenced by name at the top and change
any keys you want. SpellCheckWordList is probably the one to get a
new value.

-- 
Shaw Terwilliger


This archive was generated by hypermail 1.03b2.