Build for Ubuntu precise, no build for maverick
[idzebra-moved-to-github.git] / index / isam_methods.c
1 /* This file is part of the Zebra server.
2    Copyright (C) 1994-2011 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
31 ISAMS_M *key_isams_m (Res res, ISAMS_M *me)
32 {
33     isams_getmethod (me);
34
35     me->compare_item = key_compare;
36     me->log_item = key_logdump_txt;
37
38     me->codec.start = iscz1_start;
39     me->codec.decode = iscz1_decode;
40     me->codec.encode = iscz1_encode;
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
49 ISAMC_M *key_isamc_m (Res res, ISAMC_M *me)
50 {
51     isamc_getmethod (me);
52
53     me->compare_item = key_compare;
54     me->log_item = key_logdump_txt;
55
56     me->codec.start = iscz1_start;
57     me->codec.decode = iscz1_decode;
58     me->codec.encode = iscz1_encode;
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