aspell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pspell] (no subject)


From: a a
Subject: [pspell] (no subject)
Date: Wed, 11 Oct 2000 17:35:51 GMT

Hi,

I am having this bug that appears when I switch between two languages that use the ispell dictionarys (I have both installed ispell and Aspell on a linux box). Apparently it cannot find the language module. This method does the folowing:
1. sets a member (language)
2. deletes the current config and manager (members) in order to create new config and manager.
3. initialises the member config
4. checks for errors
5. initialises the manager member with the new created manager.
Here is the code of the method:

bool Spell::SetLanguage(const char *lang) {
       bool status = false;
       strcpy(language, lang);
       delete_pspell_config(config);
       delete_pspell_manager(manager);
       config = new_pspell_config();
       config -> replace("language-tag", language);
       ret = new_pspell_manager(config);
       if ( ret -> error_number() != 0 ) {
               // Handle error.
               cout << ret -> error_message() << endl;
               delete_pspell_can_have_error(ret);
               status = false;
       } else {
               manager = (PspellManager *) ret;
                // This is a container with managers
                // so I can use them later.
               (*vManager)[activeDocument] = manager;
               PrintConfigDetails();
               status = true;
       }
       return(status);
}

After entering a unvalid language code it will come back with a segmentation fault. Is this a known bug, or am I using the calls wrong?

Alain Dufour
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at http://profiles.msn.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]