IDZEBRA  2.1.2
isam_methods.c
Go to the documentation of this file.
1 /* This file is part of the Zebra server.
2  Copyright (C) Index Data
3 
4 Zebra is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
7 version.
8 
9 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 for more details.
13 
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 
18 */
19 
20 #if HAVE_CONFIG_H
21 #include <config.h>
22 #endif
23 #include <stdlib.h>
24 #include <string.h>
25 #include <stdio.h>
26 #include <assert.h>
27 
28 #include "index.h"
29 
30 
32 {
33  isams_getmethod (me);
34 
37 
38  me->codec.start = iscz1_start;
41  me->codec.stop = iscz1_stop;
42  me->codec.reset = iscz1_reset;
43 
44  me->debug = atoi(res_get_def (res, "isamsDebug", "0"));
45 
46  return me;
47 }
48 
50 {
51  isamc_getmethod (me);
52 
55 
56  me->codec.start = iscz1_start;
59  me->codec.stop = iscz1_stop;
60  me->codec.reset = iscz1_reset;
61 
62  me->debug = atoi(res_get_def (res, "isamcDebug", "0"));
63 
64  return me;
65 }
66 
67 
68 /*
69  * Local variables:
70  * c-basic-offset: 4
71  * c-file-style: "Stroustrup"
72  * indent-tabs-mode: nil
73  * End:
74  * vim: shiftwidth=4 tabstop=8 expandtab
75  */
76 
int key_compare(const void *p1, const void *p2)
Definition: it_key.c:73
int(* compare_item)(const void *a, const void *b)
Definition: isams.h:34
ISAM_CODEC codec
Definition: isams.h:37
const char * res_get_def(Res r, const char *name, const char *def)
Definition: res.c:313
void * iscz1_start(void)
Definition: it_key.c:129
void iscz1_reset(void *vp)
Definition: it_key.c:145
void iscz1_stop(void *p)
Definition: it_key.c:154
void(* reset)(void *p)
Definition: isam-codec.h:28
void isams_getmethod(ISAMS_M *me)
Definition: isams.c:61
void(* decode)(void *p, char **dst, const char **src)
Definition: isam-codec.h:26
int debug
Definition: isams.h:39
Definition: res.c:46
void(* log_item)(int logmask, const void *p, const char *txt)
Definition: isamc.h:44
ISAM_CODEC codec
Definition: isamc.h:46
void isamc_getmethod(ISAMC_M *m)
Definition: isamc.c:44
void *(* start)(void)
Definition: isam-codec.h:24
int debug
Definition: isamc.h:49
void iscz1_encode(void *vp, char **dst, const char **src)
Definition: it_key.c:189
void(* stop)(void *p)
Definition: isam-codec.h:25
void(* log_item)(int logmask, const void *p, const char *txt)
Definition: isams.h:35
ISAMS_M * key_isams_m(Res res, ISAMS_M *me)
Definition: isam_methods.c:31
int(* compare_item)(const void *a, const void *b)
Definition: isamc.h:43
ISAMC_M * key_isamc_m(Res res, ISAMC_M *me)
Definition: isam_methods.c:49
void key_logdump_txt(int logmask, const void *p, const char *txt)
Definition: it_key.c:37
void iscz1_decode(void *vp, char **dst, const char **src)
Definition: it_key.c:237
void(* encode)(void *p, char **dst, const char **src)
Definition: isam-codec.h:27