2 * Copyright (C) 1994-1995, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.5 1995-10-10 14:00:04 adam
8 * Function rset_open changed its wflag parameter to general flags.
10 * Revision 1.4 1995/10/06 14:38:06 adam
11 * New result set method: r_score.
12 * Local no (sysno) and score is transferred to retrieveCtrl.
14 * Revision 1.3 1995/09/08 14:52:42 adam
15 * Work on relevance feedback.
17 * Revision 1.2 1995/09/07 13:58:43 adam
18 * New parameter: result-set file descriptor (RSFD) to support multiple
19 * positions within the same result-set.
20 * Boolean operators: and, or, not implemented.
22 * Revision 1.1 1995/09/06 10:35:44 adam
23 * Null set implemented.
31 static rset_control *r_create(const struct rset_control *sel, void *parms);
32 static RSFD r_open (rset_control *ct, int flag);
33 static void r_close (RSFD rfd);
34 static void r_delete (rset_control *ct);
35 static void r_rewind (RSFD rfd);
36 static int r_count (rset_control *ct);
37 static int r_read (RSFD rfd, void *buf);
38 static int r_write (RSFD rfd, const void *buf);
39 static int r_score (RSFD rfd, int *score);
41 static const rset_control control =
56 const rset_control *rset_kind_null = &control;
58 static rset_control *r_create(const struct rset_control *sel, void *parms)
62 newct = xmalloc(sizeof(*newct));
63 memcpy(newct, sel, sizeof(*sel));
67 static RSFD r_open (rset_control *ct, int flag)
69 if (flag & RSETF_WRITE)
71 logf (LOG_FATAL, "NULL set type is read-only");
77 static void r_close (RSFD rfd)
81 static void r_delete (rset_control *ct)
86 static void r_rewind (RSFD rfd)
88 logf (LOG_DEBUG, "rsnull_rewind");
91 static int r_count (rset_control *ct)
96 static int r_read (RSFD rfd, void *buf)
101 static int r_write (RSFD rfd, const void *buf)
103 logf (LOG_FATAL, "NULL set type is read-only");
107 static int r_score (RSFD rfd, int *score)