Private info (buf) moved from struct rset_control to struct rset.
[idzebra-moved-to-github.git] / rset / rset.c
1 /*
2  * Copyright (C) 1994-1995, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: rset.c,v $
7  * Revision 1.7  1995-10-12 12:41:56  adam
8  * Private info (buf) moved from struct rset_control to struct rset.
9  * Bug fixes in relevance.
10  *
11  * Revision 1.6  1995/09/08  14:52:41  adam
12  * Work on relevance feedback.
13  *
14  * Revision 1.5  1995/09/07  13:58:43  adam
15  * New parameter: result-set file descriptor (RSFD) to support multiple
16  * positions within the same result-set.
17  * Boolean operators: and, or, not implemented.
18  *
19  * Revision 1.4  1995/09/06  16:11:56  adam
20  * More work on boolean sets.
21  *
22  * Revision 1.3  1995/09/04  15:20:39  adam
23  * More work on temp sets. is_open member removed.
24  *
25  * Revision 1.2  1995/09/04  12:33:56  adam
26  * Various cleanup. YAZ util used instead.
27  *
28  * Revision 1.1  1994/11/04  13:21:28  quinn
29  * Working.
30  *
31  */
32
33 #include <stdio.h>
34 #include <alexutil.h>
35
36 #include <rset.h>
37
38 RSET rset_create(const rset_control *sel, void *parms)
39 {
40     RSET new;
41
42     logf (LOG_DEBUG, "rs_create(%s)", sel->desc);
43     new = xmalloc(sizeof(*new));
44     new->control = sel;
45     new->buf = (*sel->f_create)(sel, parms);
46     return new;
47 }
48
49 void rset_delete (RSET rs)
50 {
51     (*rs->control->f_delete)(rs);
52     xfree(rs);
53 }