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: <[EMAIL PROTECTED]>
> 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
[EMAIL PROTECTED]
You will receive a message to confirm this.

Reply via email to