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

An old fix to agrep breaks functionality



Hi,

I wanted to upgrade glimpse from version 4.0 to the 4.17.4
and noticed, that I miss search results when pattern is long ( >30
chars).

After investigation I traced the bug to choosing limited (to 32
chars) search algorithm within agrep code when record delimiter was 
specified on command line. (e.g. -d '$' or -d '$$')

In CVS I have found such statement

======================================================
glimpse/agrep/checksg.c
1.2 Sun Jan 16 5:47:37 2000 by golda 
CVS Tags: glimpse4_13_1, glimpse_superfilter
Diffs to 1.1 
Don't use mgrep() with delimiters - fix by Morey as per report by Michael O. --GV
======================================================

Reversing this change helps, but I couldn't find this report mentioned
above and therefore I do not know what are the "bad" consequences of this
reverse patch.


What is strange in all of that is the fact, that using
-d '$' should not change antyhing against the default behaviour!
and possibly any "one character delimiter" should go straightforward
replacing all "\n" with it... (but now the changes may be too time
consuming to be proceeded).

I need only -d '$$' working properly.  Should I expect anything strange
after this change?

TIA

Regards,

	Paul Ortyl

---
Computer Science Bibliography Administrator
http://liinwww.ira.uka.de/bibliography/