- rfd = (struct rset_between_rfd *) xmalloc (sizeof(*rfd));
- rfd->next = info->rfd_list;
- info->rfd_list = rfd;
- rfd->info = info;
-
- rfd->buf_l = xmalloc (info->key_size);
- rfd->buf_m = xmalloc (info->key_size);
- rfd->buf_r = xmalloc (info->key_size);
- rfd->buf_attr = xmalloc (info->key_size);
-
- rfd->rfd_l = rset_open (info->rset_l, RSETF_READ);
- rfd->rfd_m = rset_open (info->rset_m, RSETF_READ);
- rfd->rfd_r = rset_open (info->rset_r, RSETF_READ);
-
- rfd->more_l = rset_read (info->rset_l, rfd->rfd_l, rfd->buf_l,
- &rfd->term_index_l);
- rfd->more_m = rset_read (info->rset_m, rfd->rfd_m, rfd->buf_m,
- &rfd->term_index_m);
- rfd->more_r = rset_read (info->rset_r, rfd->rfd_r, rfd->buf_r,
- &rfd->term_index_r);
- if (info->rset_attr)
- {
- int dummy;
- rfd->rfd_attr = rset_open (info->rset_attr, RSETF_READ);
- rfd->more_attr = rset_read (info->rset_attr, rfd->rfd_attr,
- rfd->buf_attr, &dummy);
+ rfd = rfd_create_base(ct);
+ if (rfd->priv)
+ p=(struct rset_between_rfd *)rfd->priv;
+ else {
+ p = (struct rset_between_rfd *) nmem_malloc(ct->nmem, (sizeof(*p)));
+ rfd->priv = p;
+ p->recbuf = nmem_malloc(ct->nmem, ct->keycontrol->key_size);
+ p->startbuf = nmem_malloc(ct->nmem, ct->keycontrol->key_size);
+ p->attrbuf = nmem_malloc(ct->nmem, ct->keycontrol->key_size);