IDZEBRA 2.2.8
rset_isam.c
Go to the documentation of this file.
1/* This file is part of the Zebra server.
2 Copyright (C) Index Data
3
4Zebra is free software; you can redistribute it and/or modify it under
5the terms of the GNU General Public License as published by the Free
6Software Foundation; either version 2, or (at your option) any later
7version.
8
9Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
10WARRANTY; without even the implied warranty of MERCHANTABILITY or
11FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program; if not, write to the Free Software
16Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
18*/
19
23#if HAVE_CONFIG_H
24#include <config.h>
25#endif
26#include <stdio.h>
27#include <assert.h>
28
29#include "index.h"
30#include <rset.h>
31
33 NMEM rset_nmem, struct rset_key_control *kctrl,
34 int scope, ISAM_P pos, TERMID termid)
35{
36 assert(zh);
37 assert(zh->reg);
38 if (zh->reg->isamb)
39 return rsisamb_create(rset_nmem, kctrl, scope,
40 zh->reg->isamb, pos, termid);
41 else if (zh->reg->isams)
42 return rsisams_create(rset_nmem, kctrl, scope,
43 zh->reg->isams, pos, termid);
44 else if (zh->reg->isamc)
45 return rsisamc_create(rset_nmem, kctrl, scope,
46 zh->reg->isamc, pos, termid);
47 else
48 return rset_create_null(rset_nmem, kctrl, termid);
49}
50
51/*
52 * Local variables:
53 * c-basic-offset: 4
54 * c-file-style: "Stroustrup"
55 * indent-tabs-mode: nil
56 * End:
57 * vim: shiftwidth=4 tabstop=8 expandtab
58 */
59
zint ISAM_P
Definition isamc.h:28
RSET rsisamc_create(NMEM nmem, struct rset_key_control *kcontrol, int scope, ISAMC is, ISAM_P pos, TERMID term)
Definition rsisamc.c:61
RSET rsisamb_create(NMEM nmem, struct rset_key_control *kcontrol, int scope, ISAMB is, ISAM_P pos, TERMID term)
Definition rsisamb.c:76
RSET rsisams_create(NMEM nmem, struct rset_key_control *kcontrol, int scope, ISAMS is, ISAM_P pos, TERMID term)
Definition rsisams.c:57
RSET rset_create_null(NMEM nmem, struct rset_key_control *kcontrol, TERMID term)
Definition rsnull.c:47
RSET zebra_create_rset_isam(ZebraHandle zh, NMEM rset_nmem, struct rset_key_control *kctrl, int scope, ISAM_P pos, TERMID termid)
Definition rset_isam.c:32
Definition rset.h:151
ISAMS isams
Definition index.h:129
ISAMB isamb
Definition index.h:131
ISAMC isamc
Definition index.h:130
struct zebra_register * reg
Definition index.h:174
const char * scope