aspell-devel
[Top][All Lists]
Advanced

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

[aspell-devel] need your review: code change for porting to Solaris+fort


From: Calvin Liu
Subject: [aspell-devel] need your review: code change for porting to Solaris+forte
Date: Wed, 18 Aug 2004 01:07:16 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803

Hi, there,

Please reply to me directly because I haven't subscribe to this mail alias. Thanks in advance!

I need to build aspell-0.50.3 on Solaris with forte compiler. Here's a piece of code that I made some change. It passed the compiler but I'm not sure that's what the origional code want to do.

Please reply to me directly because I haven't subscribe to this mail alias. Thanks in advance!

For file aspell-0.50.3/moduels/spell/default/suggest.cpp, there's a piece of code that cause compiler error:
== begin quote ==
line 636:          dup_pair = duplicates_check.insert(fix_case(word));
         if (dup_pair.second &&
             ((pos = dup_pair.first->find(' '), pos == String::npos)
              ? (bool)speller->check(*dup_pair.first)
              : (speller->check((String)dup_pair.first->substr(0,pos))
&& speller->check((String)dup_pair.first->substr(pos+1))) ))
           near_misses_final->push_back(*dup_pair.first);
       }
     } else {
== end quote ==

So I changed it into:
== begin quote ==
line 636:          dup_pair = duplicates_check.insert(fix_case(word));
         if (dup_pair.second) {
               pos = dup_pair.first->find(' ');
               if (pos == String::npos){
                       speller->check(*dup_pair.first);
                       near_misses_final->push_back(*dup_pair.first);
               }
               else {
speller->check((String)dup_pair.first->substr(0,pos)); speller->check((String)dup_pair.first->substr(pos+1));
               }
         } //if
       } //while
     } else {
== end quote ==

Is it correct to do this? I really need someone to review it.

Thanks.
Calvin




reply via email to

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