X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=rset%2Frsisamc.c;h=fb429ad6c7dd0d6d3630282050b024a4123d1284;hb=3db15cf883ad80b6a4b0e960f3c3b59c86b59c6b;hp=8099d54ec17eced81200b754f00bd087f65b2c5c;hpb=82bdd90d99e036b5c491666b5be5471c59f8e1b8;p=idzebra-moved-to-github.git diff --git a/rset/rsisamc.c b/rset/rsisamc.c index 8099d54..fb429ad 100644 --- a/rset/rsisamc.c +++ b/rset/rsisamc.c @@ -4,7 +4,15 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: rsisamc.c,v $ - * Revision 1.2 1996-11-08 11:15:57 adam + * Revision 1.4 1997-12-18 10:54:25 adam + * New method result set method rs_hits that returns the number of + * hits in result-set (if known). The ranked result set returns real + * number of hits but only when not combined with other operands. + * + * Revision 1.3 1997/10/31 12:37:01 adam + * Code calls xfree() instead of free(). + * + * Revision 1.2 1996/11/08 11:15:57 adam * Compressed isam fully supported. * * Revision 1.1 1996/10/29 13:41:48 adam @@ -24,6 +32,7 @@ static void r_close (RSFD rfd); static void r_delete (RSET ct); static void r_rewind (RSFD rfd); static int r_count (RSET ct); +static int r_hits (RSET ct, void *oi); static int r_read (RSFD rfd, void *buf); static int r_write (RSFD rfd, const void *buf); static int r_score (RSFD rfd, int *score); @@ -37,6 +46,7 @@ static const rset_control control = r_delete, r_rewind, r_count, + r_hits, r_read, r_write, r_score @@ -99,7 +109,7 @@ static void r_close (RSFD rfd) { isc_pp_close ((*ptinfop)->pt); *ptinfop = (*ptinfop)->next; - free (rfd); + xfree (rfd); return; } logf (LOG_FATAL, "r_close but no rfd match!"); @@ -126,6 +136,11 @@ static int r_count (RSET ct) return 0; } +static int r_hits (RSET ct, void *oi) +{ + return -1; +} + static int r_read (RSFD rfd, void *buf) { return isc_pp_read( ((struct rset_pp_info*) rfd)->pt, buf);