----- Original Message ----- From: "Bill Moseley" <[EMAIL PROTECTED]> To: "Gary Setter" <[EMAIL PROTECTED]> Cc: <aspell-devel@gnu.org> Sent: Friday, July 29, 2005 9:58 AM Subject: Re: [aspell-devel] clear_session, store_replacement, and support
> Thanks for the reply, Gary: > > On Fri, Jul 29, 2005 at 08:35:24AM -0500, Gary Setter wrote: > > ___POINT 1___ > > The function seems to be in error. Take a look at the > > implementation of store_replacement. > > > > PosibErr<void> SpellerImpl::store_replacement(const String & > > mis, > > const String & > > cor, > > bool memory) > > > > It returns a void, not a bool. There is no data returned. > > Is the API *suppose* to return a value? And if false should the > error number and error message be available with aspell_speller_error_number > and aspell_speller_error_message? That's what I'm not clear on. I didn't design aspell, but it sure looks to me it is suppose to return success/failure status. The c lib functions do not seem consistent in how they report failure. Since it clearly return -1 if the function call failed, I submitted a patch to make this function return 0 on success. Aspell seems to work with error strings, not error numbers. If (after patching, making, and installing aspell) our favorite function returns not zero, you can call aspell_speller_error_message() to get the current error. <snip> > Again, I'd like to first make sure that I'm using clear_session > correctly and I understand the Aspell usage correctly. > I made a version of one of my programs that uses aspell to exercise the session functions. I found that they do return true on success. I found that after I add a 'misspelled word to the session dictionary that the check function accepts the word. After the session dictionary is cleared, the check function stops accepting the word. Maybe that would be a more straightforward test for Text::Aspell? Maybe someone else from the mailing list has a suggestion? <snip> > PS -- one other question: I require the en_US dictionary installed > for testing. Of course, not everyone has that dictionary, but I'm > not sure how I can test Aspell without knowing a specific dictionary > is installed -- I want to make sure I can lookup misspelled words, so > seems like I need a specific dictionary to do that. If you or anyone > has a better idea I'd like to hear. Also, I'm not 100% clear how to > verify that the dictionary I need is installed -- but I haven't > looked at that yet. > Just off the top of my head, you already warn the users that the dictionary is needed. You could include a note on what to look for to verify that the dictionary is found ( or not found). You could provide a sample aspell.conf file and suggest how to configure it to find the dictionary and data files. Does anyone else have better ideas? Best regards, Gary Setter I had something of an adventure building the Text::Aspell add-in. The test you provided is failing with a freeze in what appears to be the Tex test. I'll send you my notes on what I did to get the add-in built in case it is of any help. _______________________________________________ Aspell-devel mailing list Aspell-devel@gnu.org http://lists.gnu.org/mailman/listinfo/aspell-devel