X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=rset%2Frsnull.c;h=d10b2747b8a485c0f1d7ccdbdeafa0aaf93a37cc;hb=726c42c6ae793b79a5351d2fce805d220d21321e;hp=29322afec84df42dee410d26ec9c290578d0d6af;hpb=8d47d759a2e957ada235ab83bf877f2eb0d2ab99;p=idzebra-moved-to-github.git diff --git a/rset/rsnull.c b/rset/rsnull.c index 29322af..d10b274 100644 --- a/rset/rsnull.c +++ b/rset/rsnull.c @@ -1,4 +1,4 @@ -/* $Id: rsnull.c,v 1.23 2004-08-26 11:11:59 heikki Exp $ +/* $Id: rsnull.c,v 1.26 2004-09-09 10:08:06 heikki Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -25,9 +25,8 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include -#include +#include -/* FIXME - Use the nmem instead of xmalloc all the way through */ static RSFD r_open (RSET ct, int flag); static void r_close (RSFD rfd); @@ -40,9 +39,9 @@ static int r_write (RSFD rfd, const void *buf); static const struct rset_control control = { "null", + r_delete, r_open, r_close, - r_delete, r_rewind, rset_default_forward, r_pos, @@ -52,32 +51,29 @@ static const struct rset_control control = const struct rset_control *rset_kind_null = &control; -RSET rsnull_create(NMEM nmem ) +RSET rsnull_create(NMEM nmem, const struct key_control *kcontrol ) { - RSET rnew=rset_create_base(&control, nmem); + RSET rnew=rset_create_base(&control, nmem, kcontrol,0); rnew->priv=NULL; return rnew; } -#if 0 -static void *r_create(RSET ct, const struct rset_control *sel, void *parms) -{ - return NULL; -} -#endif - static RSFD r_open (RSET ct, int flag) { + RSFD rfd; if (flag & RSETF_WRITE) { logf (LOG_FATAL, "NULL set type is read-only"); return NULL; } - return ""; + rfd=rfd_create_base(ct); + rfd->priv=NULL; + return rfd; } static void r_close (RSFD rfd) { + rfd_delete_base(rfd); } static void r_delete (RSET ct)