Re: [htdig3-dev] Excerpts and Punctuation


Geoff Hutchison (ghutchis@wso.williams.edu)
Fri, 29 Jan 1999 13:36:30 -0400


>around. Oddly enough, it seems to work either way, even though Pattern()
>does make use of the existing trans table.

That is odd, but I agree with the fix.

>In the process of poking
>around in IgnoreCase(), I think I uncovered a memory leak. It's probably
>small and inconsequential, but it seems IgnoreCase() should do this:
>
> if (local_alloc)
> delete [] trans;

This is a leak. I just fixed it. Even small leaks should be fixed,
especially in something as widely-used as StringMatch.

>before allocating a new table. The other change in my patch is to move the
>pos--; back to where it was, just after the loop that overincremented it.

I didn't think it really mattered, but I guess this is a more appropriate
place since it's easier to understand why you need to do "pos--;"

-Geoff

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
htdig3-dev@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Thu Feb 04 1999 - 22:24:21 PST