29c048c226a69f4832850159cd884faae7580426
[idzebra-moved-to-github.git] / index / isam_methods.c
1 /* $Id: isam_methods.c,v 1.2 2007-01-15 15:10:16 adam Exp $
2    Copyright (C) 1995-2007
3    Index Data ApS
4
5 This file is part of the Zebra server.
6
7 Zebra is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20
21 */
22
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  * indent-tabs-mode: nil
72  * End:
73  * vim: shiftwidth=4 tabstop=8 expandtab
74  */
75