Fix term counters to be of type zint. Fix several printfs of zint.
[idzebra-moved-to-github.git] / rset / rstemp.c
index 7b5420d..b06a1fa 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: rstemp.c,v 1.39 2004-08-06 09:43:04 heikki Exp $
+/* $Id: rstemp.c,v 1.42 2004-08-06 12:55:03 adam Exp $
    Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003
    Index Data Aps
 
@@ -42,7 +42,7 @@ static void r_rewind (RSFD rfd);
 /* static int r_count (RSET ct);*/
 static int r_read (RSFD rfd, void *buf, int *term_index);
 static int r_write (RSFD rfd, const void *buf);
-static void r_pos (RSFD rfd, zint *current, zint *total);
+static void r_pos (RSFD rfd, double *current, double  *total);
 
 static const struct rset_control control = 
 {
@@ -79,7 +79,7 @@ struct rset_temp_info {
 struct rset_temp_rfd {
     struct rset_temp_info *info;
     struct rset_temp_rfd *next;
-    int *countp;
+    zint *countp;
     void *buf;
     size_t  pos_cur;       /* current position in set */
     zint cur; /* number of the current hit */
@@ -371,9 +371,9 @@ static int r_write (RSFD rfd, const void *buf)
     return 1;
 }
 
-static void r_pos (RSFD rfd, zint *current, zint *total)
+static void r_pos (RSFD rfd, double  *current, double  *total)
 {
     struct rset_temp_rfd *mrfd = (struct rset_temp_rfd*) rfd;
-    *current=mrfd->cur;
-    *total=mrfd->info->hits;
+    *current=(double) mrfd->cur;
+    *total=(double) mrfd->info->hits;
 }