the new multior. Seems to work, forwards OK, does not yet estimate pos.
[idzebra-moved-to-github.git] / rset / rset.c
index 4421587..254ee08 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: rset.c,v 1.22 2004-08-04 09:59:03 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
 
@@ -65,9 +65,9 @@ RSET rset_dup (RSET rs)
     return rs;
 }
 
-void rset_default_pos (RSFD rfd, zint *current, zint *total)
-{ /* FIXME - This function should not be needed, only while */
-  /*         coding the pos functions. */
+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);
@@ -130,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)