Commit: Enchant ispell provider

From: Dom Lachowicz (domlachowicz@yahoo.com)
Date: Mon Jul 14 2003 - 21:04:06 EDT

  • Next message: Dom Lachowicz: "Commit: the enchant spell checking engine works with abiword"

    I've grabbed our Ispell code and moved it over to
    generic C++ and Glib-2.0 (i.e. no Abi dependencies, no
    exceptions, no C++ dependencies). Enchant now has a
    functioning Aspell/Pspell backend and an Ispell
    backend. Both can be loaded at once, no less :)

    Also, the Ispell provider checks a global dir and a
    user-private dir for its dictionaries. In the future,
    I suppose I'll make the global dir optionally a
    configure argument, so that the distros/users can
    point it at their pre-existing Ispell install if they
    want.

    There may be some mem leaks or similar. I'll have to
    check this out more thoroughly. I did plug one leak
    that was newly introduced into the Abi code, though,
    in the process.

    Also, even people on as new a Linux distro as RH8
    won't be able to properly load this without a hack.
    The problem is that libtool before 1.4c or 1.4e (I
    forget which) tries to link C++ DLLs using the C
    compiler/linker. Ick. So, you have to do:

    CC=g++ ./configure

    or upgrade libtool to a non-broken version in order
    for this DLL to load. Either decision is fine with me
    - it's your system, your choice.

    Anyway, this works now. The Ispell or Aspell backends
    can be disabled at will via configure arguments.
    They're smartly enabled/disabled based on presence of
    their dependencies (Aspell/Pspell for the Aspell
    provider, a C++ compiler for the Ispell provider).

    Cheers,
    Dom

    enchant_dict_check (hello): 0
    enchant_dict_check (helllo): 1
    enchant_dict_suggest(helllo): 3
            =>hello
            =>hell lo
            =>hell-lo
    enchant_dict_suggest(baad): 11
            =>bad
            =>baa
            =>bead
            =>brad
            =>bald
            =>band
            =>bard
            =>baud
            =>bawd
            =>Baal
            =>baas

    CVS:
    ----------------------------------------------------------------------
    CVS: Enter Log. Lines beginning with `CVS:' are
    removed automatically
    CVS:
    CVS: Committing in .
    CVS:
    CVS: Modified Files:
    CVS: configure.in src/Makefile.am src/enchant.c
    CVS: src/aspell/Makefile.am tests/test-enchant.c
    CVS: Added Files:
    CVS: src/ispell/Makefile.am src/ispell/correct.cpp
    CVS: src/ispell/good.cpp src/ispell/hash.cpp
    src/ispell/ispell.h
    CVS: src/ispell/ispell_checker.cpp
    src/ispell/ispell_checker.h
    CVS: src/ispell/ispell_def.h src/ispell/lookup.cpp
    CVS: src/ispell/makedent.cpp src/ispell/msgs.h
    CVS: src/ispell/sp_spell.h src/ispell/tgood.cpp
    CVS:
    ----------------------------------------------------------------------

    __________________________________
    Do you Yahoo!?
    SBC Yahoo! DSL - Now only $29.95 per month!
    http://sbc.yahoo.com



    This archive was generated by hypermail 2.1.4 : Mon Jul 14 2003 - 21:17:22 EDT