X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=rset%2Frset.c;h=254ee0877d285630171df7e91aa7aeba1287868f;hb=3335cd5f7e7af06ac6ed943859c473e092d559a1;hp=e7981482089d7729eae9b376c3d288cfe519e1ad;hpb=7ead84f2bb444f7a420b1d1c8e8c47aec61f156c;p=idzebra-moved-to-github.git diff --git a/rset/rset.c b/rset/rset.c index e798148..254ee08 100644 --- a/rset/rset.c +++ b/rset/rset.c @@ -1,4 +1,4 @@ -/* $Id: rset.c,v 1.20 2004-01-30 11:43:41 heikki Exp $ +/* $Id: rset.c,v 1.24 2004-08-19 12:49:15 heikki Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -25,6 +25,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include +#include #include #include <../index/index.h> /* for log_keydump. Debugging only */ @@ -64,6 +65,16 @@ RSET rset_dup (RSET rs) return rs; } +void rset_default_pos (RSFD rfd, double *current, double *total) +{ /* This should never really be needed, but it is still used in */ + /* those rsets that we don't really plan to use, like isam-s */ + assert(rfd); + assert(current); + assert(total); + *current=-1; /* signal that pos is not implemented */ + *total=-1; +} /* rset_default_pos */ + int rset_default_forward(RSET ct, RSFD rfd, void *buf, int *term_index, int (*cmpfunc)(const void *p1, const void *p2), const void *untilbuf) @@ -119,9 +130,11 @@ RSET_TERM rset_term_create (const char *name, int length, const char *flags, void rset_term_destroy (RSET_TERM t) { - xfree (t->name); - xfree (t->flags); - xfree (t); + if (t) { /* rsmultior uses things without terms at all ! */ + xfree (t->name); + xfree (t->flags); + xfree (t); + } } RSET_TERM rset_term_dup (RSET_TERM t)