[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: htdig 3.1.4
good to go,
attached are the 3.1.4 patches, slightly different than the last batch,
hopefully a little faster.
just like last time
from the base of the htdig source
patch -p1 < Display.cc.patch
patch -p1 < Display.h.patch
Aaron Turner wrote:
>
> I'm downloading the source into /usr/local/src now... Enjoy.
>
> On Thu, 16 Dec 1999, Marc Britten wrote:
>
> > aaron mentioned to me that I should port my patches to htdig 3.1.4, are
> > you guys going to get the source for that on vodka soon? I've ported
> > them over with no problems, but I also made a few efficiency changes
> > that I want to test.
> >
> > I'm going to be traveling starting Sunday, and lasting untill the 27th,
> > I'm going to try and do what I can, but I'm not sure if I'm going to
> > have internet access in Hong-Kong, so I want to take care of this ASAP.
> >
>
> --
> Aaron Turner, Core Developer http://vodka.linuxkb.org/~aturner/
> Linux Knowledge Base Organization http://linuxkb.org/
> Because world domination requires quality open documentation.
> aka: aturner@vicinity.com, aturner@pobox.com, ion_beam_head@ashtech.net
--- htdig-3.1.4/htsearch/Display.cc Thu Dec 9 19:28:47 1999
+++ htdig-dev/htsearch/Display2.cc Thu Dec 16 23:29:22 1999
@@ -79,6 +79,9 @@
}
// if (mystrcasestr(currentTemplate->getMatchTemplate(), "excerpt"))
// needExcerpt = 1;
+
+ // LINUXKB
+ variables.Add("oid");
}
//*****************************************************************************
@@ -220,9 +223,44 @@
excludeFrom->hasPattern() &&
excludeFrom->FindFirst(url) >= 0)
return 0;
- else
- return 1;
+ else // LINUXKB
+ {
+ String value;
+ String sUrl(url);
+ int vcount = variables.Count();
+ int count = variableValues.Count();
+ int index, valueStart = 1, valueEnd = 1;
+
+ for(int i = 0; i < vcount; i++)
+ {
+ index = sUrl.indexOf(variables[i]);
+ if(index == -1)
+ continue;
+
+ valueStart = sUrl.indexOf('=', index);
+ valueEnd = sUrl.indexOf('&', valueStart);
+
+ if(valueEnd == -1)
+ valueEnd = sUrl.last();
+
+
+ if((valueEnd - valueStart) > 0)
+ {
+ value = sUrl.sub((valueStart + 1), (valueEnd - (valueStart + 1)));
+ for(int j = 0; j < count; j++)
+ {
+ if(value.compare(variableValues.Nth(j)) == 0)
+ {
+ return 0;
+ }
+ }
+ variableValues.Add(value);
+ }
+ }
}
+// END LINUXKB
+ }
+ return 1;
}
//*****************************************************************************
--- htdig-3.1.4/htsearch/Display.h Thu Dec 9 19:28:49 1999
+++ htdig-dev/htsearch/Display.h Thu Dec 16 19:56:57 1999
@@ -78,6 +78,10 @@
//
List *searchWords;
+ // LINUXKB
+ // StringList of variables and found values
+ StringList variables, variableValues;
+
//
// Pattern that all result URLs must match or exclude
//