On Wed, 15 Dec 2004, Kevin Atkinson wrote: > On Wed, 15 Dec 2004, Gary Setter wrote: > > > <snip> > > > Hi, > > > I tried to look into this. The win32 port does not dump core, but > > > it does reprompt for when webserver is replaced by web-server or > > > web server. I have had it stuck in an infinite loop, but I'm > > > having difficulty recreating the problem. > > So does Aspell hang because it is in an infinite loop or is it just keep on > repromting?
And when spell checking this message I believe I encountered the same bug. Actually it was with repl_next but repl_next and soundslike_next are nearly identical and they suffered from the same problem. To reproduce it try spellchecking the word "simpiler" with the attached personal replacement file. Attached is a fix. > > > At the center of the infinite loop problem is this function in > > > writeable. > > > > > > static void soundslike_next(WordEntry * w) > > > { > > > const Str * i = (const Str *)(w->intr[0]); > > > const Str * end = (const Str *)(w->intr[1]); > > > set_word(*w, *i); > > > ++i; > > > if (i == end) w->adv_ = 0; > > > } > > > Nothing is changing w->intr[0] or w-inter[1] so w->adv is never > > > set to zero and the loop never terminates. Yep that is the cause. > > > Also the WordEntry::intr array of void pointers is a bad idea in > > > my opinion. Is there any support for eliminating them? Well if you can figure out a better way without losing efficiency. > > I'm still studying writable.cpp. I'm finding what are in my > > opinion bad ideas. This is the first: > > static inline StrVector * get_vector(Str s) > > { > > return (StrVector *)(s - sizeof(StrVector) - 2); > > } > > It seems a Vector<Str> object is allocated, but only the address > > of first string is saved. Then, when we want to use the Vector, > > we just subtract and cast. > > I think the > > WritableReplDict::add_repl() > > and > > WritableDict::add() > > functions are along the same lines. > > Does anyone else have problems with these functions as they are? > > > > I would like to straighten this out as part of fixing the > > infinite loop problem. > > There is nothing wrong with them. I do it to save space. Yes it > contains some ugly stuff but it is completely contained within the single > source file so I don't have to worry about it anywhere else. I will not > unless it causes a problem. I will however accept patches to improve the documentation. Actually I don't think the reason was to save space but to simplify some things. In any case I will not change it unless you have a solution which is simpler and doesn't use any additional space or it is causing a problem. > > Also, I had a problem saving replacement pairs that included > > hyphenated words. I fixed it in > > PosibErr<void> SpellerImpl::store_replacement(). > > The fix was to retrieve the separator characters from config and > > use them, (not just space) to break up the replacement string > > into its parts. I wasn't going to submit a patch until I fixed > > the infinite loop bug, but I would be interested in what the list > > things before I submit a patch. > > I believe that is the correct thing to do but I will have to see the patch > to be sure. > > -- http://kevin.atkinson.dhs.org
personal_repl-1.1 en 0 locical logical effenent efficient traformed transformed uncompiled compiled tham them chaging changing libaray library selectet select beem been advacne advance paritally partially clockes clocks thinging thinking applicating applications strarting starting globably globally bouses bounces cource course equalvent equivalent tricy tricky eval evil thay that constaing containing numberes numbers pronized pronounced rouf rough faitly fairly esally easily probaby probably ababatray arbitrary publically publicly dence dense reporoce reproduce conver cover aso also excemption Exemption decission discussion decission decision confermination confirmation specisious suspicious returing returning rember remember precisally precisely commely commonly explaing explaining easiers easier generial general substatsanly substantially coints coins tring trying contry country amout amount relevent relevant eby By differes differs realy really dissions decisions consinst consist dissused discussed descript description pating paying encyption encryption possibe possibler impossable impossible couted counted convertes converts develope develop ocacanlly occasionally perderence preference mainating maintaining prilimary preliminary unencrypt unencrypted locatation location laten Latin powerfull powerful analyse analyze ehy why mainatins maintainers primilarly preliminary fullfilled fulfilled photocalls protocols incoperating incorporating substational substantial ene end bahviour behavior perseving preserving ambiguitys ambiguities thum thumb choing choosing beining beginning orinal original termated terminated completling compiling sourse source potentential potential preovude create mispelled misspelled existant existent fuzzies fuzzy carfully carefully embebed embedded achnolage acknowledge choise choice unfortually unfortunately mangered mangled unfamilarier unfamiliar availale available significt significant reponce response comparasion comparison seminor Seminar canical canonical activay actively comming Coming carefull careful cornate coordinate augest August flages flags passible possible anony annoy belive believe convient convenient wiches wishes defese defense pronization pronunciation discoved discovered intental intentional otheres others poiting pointing warining warning entrie entrée paritly partly effecent efficient incase in case presious precise misspelt misspelled plases places possive possessive categoryes categories provding providing commited committed interfear interfere glady gladly primilinary preliminary sence sense prominate prominent effecenty efficiency enhacncmensts enhancements familarier familiar integreaed integrated simpiling simply thurday Thursday referering referring termined terminated insestive insensitive siturations situation fullfill fulfill effecently efficiently carentiee currently entends extends performace performance easilly easily specialed specialized ackloaging acknowledging gotton gotten beief brief autorize authorize optium optimum comptable compatible exuse excuse elemenates eliminates installes installs compatable compatibly compatable compatible interestes interested reciced received punction punctuation expations expectations turation tuition ineffect inefficient occure occurred vienetmize Vietnamese browing browsing equaol equal to taked talked primlimanary preliminarily everthing everything dictionarie dictionary compience compliance enhanded enhanced misalalious miscellaneous disissioions decisions doubtfull doubtful topolical topological quering querying implementaions implementation asis as is parananess parenthesis langues languages perfectally perfectly primarly primarily clearence clearance minial minimal incoding encoding compayable compatible senear sincere trackking Tracking parantasies parenthesis mountin Mountain simpile simpler simpile simple simpile simply replase replace sofficated sophisticated searhing searching translaters translators remaing remaining tommotow tomorrow prinsable principle disgrading discarding convice convince containg containing dicusses disuses delimated delimited encriped encrypted turnes turns simpily simple simpily simply warpper wrapper crawlwe crawlier wasy way adequetly adequate oncs ones overright overwrite librarays libraries appropate appropriate verion version photacall protocol compilered compiled situration situation appricate appreciate lookes looks calululating calculation knowning knowing chhalange Challenges particaully particularly wraped wrapped unix Unix bost best dictionarys dictionaries givin given persain Persian maintaer maintainer accendly accentually coveres covers intructions instructions glypes glyphs essently essentially joing joining formating formatting intersest interest amound among dict dictionary doen't doesn't athough although potocall protocol pease Please normilizaing normalization minium minimum analyise analyze contruct construct envirment environment stenth strength componets components futer future transation translations droped dropped moddlled modeled involding involving lact lack intersting interesting intersting interest assemly assembly compicated complicated impleied implies desctinion description web-server web server arragments arrangements closs closed hangle handle shere shear responce response precents prevents beloning belonging faught fault mentined mentioned anyother another shoule should togher tougher parase parse visable visible extention extension detetch detect budy buddy fotocall protocol criria criteria affig Affix lessions Lesions thisis thesis lang language metting meeting finicial financial mispellings misspellings stroingly strongly commentie committee regually regularly merly simply merly Merely defently definitely pronisiation pronunciation unhelpfull unhelpful envirments environments usin using tecinally technically servey survey temporty temporary easially easily distiontion distinction painstekly painstakingly thw the ackolage acknowledge maxium maximum contants constants networt network cange change availbe available sucefully successfully converthing converting misalious Miscellaneous requesred required abadan abandon showns shows checkes checks sensable sensible asingle a single decerited decorated disrripted distributed tecneckaies techniques studing studying resonds responds plece please thnking thinking beter better fullfull fulfill flexable flexible suffect sufficient concating concatenating irregularties irregularities neceaaary necessarily investiged investigated consieal conceal incrimed incriminated documenat documentation itis it is sceme scheme buzy busy literial literally suspecision suspicious happended happened wil will preceeded prefixed concernes concerns begiing beginning inital initial requestes requests effectnt efficient involed involved recing receiving limitions limitations ambiguates ambiguous comple compile phical physical eith with magick magic expertations expectations formaing formating availve available mant want complely completely colums columns persion person conversting converting explisty explicitly appearly apparently wth with misalinaious Miscellaneous perderred preferred delived delivered howeever However avoides avoids adject adjacent tecnices techniques preferd preferred ancle ankle everone everyone presemtaion Presentation algoihm algorithm distince distinct decription description converning concerning bo no argubility arguably maped mapped ay at bt but esentually essentially suppotted supported convering concerning decession decision controles controls photocall protocol furure future ckecing checking garanteeds guarantees scriping scripting converion conversion experntal experiential patached patched enrole enroll shold should fetchpost fencepost ensire ensure extemply extremely offical officially offical official compatoion competition compermised compromises itiliation Italian identicaly identical hu huh diffrent different procdd proceed atending attending represention representation disguard discard pretly pretty intersted interested matexi matrix deleminted delimited hade had approximly approximately investage investigate theres there's extentions extensions intruce introduce scipt script apposrathfe apostrophe veritile versatile taks tasks advisor adviser involing involving guanteed guaranteed scedual schedule mw me containted contained diararia Diarrhea orthographie orthography ot or benificaly beneficial incododing encoding tertain terrain incompatable incomputable incompatable incompatible recoved recovered useses uses humen human recordes records resasime receive convered concerned sined signed latters letters intispate anticipate requiments requirements recived receive recived received kindergardener kindergärtner sylabis syllabus accsses accesses ckean clean enties entries satus status usefull useful repative duplicate compres comes guidece guidance submited submitted specifal special conventsions conventions expermined experiment suffently sufficiently negilited neglected busnessis businesses requestions requests consinced convinced contious continuous specifed specified hask hash mettings meeting's mettings meetings acs acts westion western desifer decipher elemited eliminated crylic Cyrillic consile conceal bettern between easally easily enentually eventually espaclly especially lables labeled elemites eliminates releas release writting writing startes starts proably probably trasnsfer transfered tradinal traditional packageable packable aspell gathered prefered preferred agiant against grammer grammar incorperate incorporated insantly insanely helpfull helpful significly significantly replased replaced delat dealt contex context amd and clain claim accemtion assumption
Index: modules/speller/default/writable.cpp =================================================================== RCS file: /cvsroot/aspell/aspell/modules/speller/default/writable.cpp,v retrieving revision 1.22 diff -u -r1.22 writable.cpp --- modules/speller/default/writable.cpp 3 Dec 2004 04:02:04 -0000 1.22 +++ modules/speller/default/writable.cpp 16 Dec 2004 05:39:52 -0000 @@ -238,8 +238,8 @@ static void soundslike_next(WordEntry * w) { - const Str * i = (const Str *)(w->intr[0]); - const Str * end = (const Str *)(w->intr[1]); + const Str * & i = (const Str * &)(w->intr[0]); + const Str * end = (const Str * )(w->intr[1]); set_word(*w, *i); ++i; if (i == end) w->adv_ = 0; @@ -664,8 +664,8 @@ static void repl_next(WordEntry * w) { - const Str * i = (const Str *)(w->intr[0]); - const Str * end = (const Str *)(w->intr[1]); + const Str * & i = (const Str * &)(w->intr[0]); + const Str * end = (const Str * )(w->intr[1]); set_word(*w, *i); ++i; if (i == end) w->adv_ = 0;
_______________________________________________ Aspell-devel mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/aspell-devel