- struct rset_temp_info *info = ((struct rset_temp_rfd*)rfd)->info;
- struct rset_temp_rfd **rfdp;
-
- for (rfdp = &info->rfd_list; *rfdp; rfdp = &(*rfdp)->next)
- if (*rfdp == rfd)
- {
- r_flush (*rfdp, 0);
- xfree ((*rfdp)->buf);
-
- *rfdp = (*rfdp)->next;
- xfree (rfd);
-
- if (!info->rfd_list && info->fname && info->fd != -1)
- {
- close (info->fd);
- info->fd = -1;
- }
- return;
- }
- logf (LOG_FATAL, "r_close but no rfd match!");
- assert (0);
-}
-
-static void r_delete (RSET ct)
-{
- struct rset_temp_info *info = (struct rset_temp_info*) ct->buf;
-
- if (info->fname)
- unlink (info->fname);
- xfree (info->buf_mem);
- logf (LOG_DEBUG, "r_delete: set size %ld", (long) info->pos_end);
- if (info->fname)
+ /*struct rset_temp_rfd *mrfd = (struct rset_temp_rfd*) rfd->priv; */
+ struct rset_temp_info *info = (struct rset_temp_info *)rfd->rset->priv;
+ r_flush (rfd, 0);
+ if (info->fname && info->fd != -1)