Using proper type this time
[idzebra-moved-to-github.git] / rset / rsisamb.c
index 170a22d..a7f2b49 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: rsisamb.c,v 1.21 2004-09-01 15:01:32 heikki Exp $
+/* $Id: rsisamb.c,v 1.23 2004-09-30 09:53:05 heikki Exp $
    Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
    Index Data Aps
 
@@ -33,7 +33,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 static RSFD r_open (RSET ct, int flag);
 static void r_close (RSFD rfd);
 static void r_delete (RSET ct);
-static void r_rewind (RSFD rfd);
 static int r_forward(RSFD rfd, void *buf, const void *untilbuf);
 static void r_pos (RSFD rfd, double *current, double *total);
 static int r_read (RSFD rfd, void *buf);
@@ -45,7 +44,6 @@ static const struct rset_control control =
     r_delete,
     r_open,
     r_close,
-    r_rewind,
     r_forward, 
     r_pos,
     r_read,
@@ -64,10 +62,10 @@ struct rset_isamb_info {
     ISAMB_P pos;
 };
 
-RSET rsisamb_create( NMEM nmem, const struct key_control *kcontrol,
+RSET rsisamb_create( NMEM nmem, const struct key_control *kcontrol, int scope,
             ISAMB is, ISAMB_P pos)
 {
-    RSET rnew=rset_create_base(&control, nmem, kcontrol);
+    RSET rnew=rset_create_base(&control, nmem, kcontrol, scope);
     struct rset_isamb_info *info;
     info = (struct rset_isamb_info *) nmem_malloc(rnew->nmem,sizeof(*info));
     info->is=is;
@@ -100,7 +98,7 @@ RSFD r_open (RSET ct, int flag)
         ptinfo->buf = nmem_malloc (ct->nmem,ct->keycontrol->key_size);
         rfd->priv=ptinfo;
     }
-    ptinfo->pt = isamb_pp_open (info->is, info->pos);
+    ptinfo->pt = isamb_pp_open (info->is, info->pos, ct->scope );
     return rfd;
 }
 
@@ -112,12 +110,6 @@ static void r_close (RSFD rfd)
 }
 
 
-static void r_rewind (RSFD rfd)
-{   
-    logf (LOG_DEBUG, "rsisamb_rewind");
-    abort ();
-}
-
 static int r_forward(RSFD rfd, void *buf, const void *untilbuf)
 {
     struct rset_pp_info *pinfo=(struct rset_pp_info *)(rfd->priv);