Re: [htdig] problems with the "accent" patch


Subject: Re: [htdig] problems with the "accent" patch
From: Eric van der Vlist (vdv@dyomedea.com)
Date: Thu Mar 02 2000 - 14:49:55 PST


But, the accents keys are already affected by maximum_word_length !

What is exactly the functionality of this patch ?

Eric (confused :=)

Gilles Detillieux wrote:
>
> According to Robert Marchand:
> > I will add a correction to have accents keys in sync with the
> > maximum_word_length parameter.
>
> Here's a kludgy fix, which I haven't tested yet, but I think will work.
> I'm not wild about the external reference to config, while other methods
> in this class have the config object passed to them, but it should get
> the job done. Obviously, this patch should be applied after the one
> I posted earlier today, still using patch -p1.
>
> --- htdig-3.1.5.accents/htfuzzy/Accents.cc.notrunc Thu Mar 2 11:25:42 2000
> +++ htdig-3.1.5.accents/htfuzzy/Accents.cc Thu Mar 2 16:33:10 2000
> @@ -134,10 +134,16 @@ Accents::writeDB(Configuration &config)
> void
> Accents::generateKey(char *word, String &key)
> {
> + extern Configuration config;
> + static int maximum_word_length = config.Value("maximum_word_length", 12);
>
> if (!word || !*word)
> return;
>
> + String temp(word);
> + if (temp.length() > maximum_word_length)
> + temp.chop(temp.length()-maximum_word_length);
> + word = temp.get();
> key = '0';
> while (*word) {
> key << MinusculeISOLAT1[ (unsigned char) *word++ ];
>
> --
> Gilles R. Detillieux E-mail: <grdetil@scrc.umanitoba.ca>
> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
> Dept. Physiology, U. of Manitoba Phone: (204)789-3766
> Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930

-- 
------------------------------------------------------------------------
Eric van der Vlist                                              Dyomedea

http://www.dyomedea.com http://www.ducotede.com ------------------------------------------------------------------------

------------------------------------ To unsubscribe from the htdig mailing list, send a message to htdig-unsubscribe@htdig.org You will receive a message to confirm this.



This archive was generated by hypermail 2b28 : Thu Mar 02 2000 - 14:53:46 PST