1 /* This file is part of the Zebra server.
2 Copyright (C) 1994-2010 Index Data
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
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
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
23 #include <idzebra/isam-codec.h>
24 #include <idzebra/bfile.h>
30 typedef struct ISAMC_s *ISAMC;
31 typedef struct ISAMC_PP_s *ISAMC_PP;
33 typedef struct ISAMC_filecat_s {
34 int bsize; /* block size */
35 int ifill; /* initial fill */
36 int mfill; /* minimum fill */
37 int mblocks; /* maximum blocks */
40 typedef struct ISAMC_M_s {
41 ISAMC_filecat filecat;
43 int (*compare_item)(const void *a, const void *b);
44 void (*log_item)(int logmask, const void *p, const char *txt);
52 typedef struct ISAMC_I_s {
53 int (*read_item)(void *clientData, char **dst, int *insertMode);
58 void isamc_getmethod(ISAMC_M *m);
61 ISAMC isamc_open(BFiles bfs, const char *name, int writeflag,
64 int isamc_close(ISAMC is);
67 void isamc_merge(ISAMC is, ISAM_P *pos, ISAMC_I *data);
70 ISAMC_PP isamc_pp_open(ISAMC is, ISAM_P pos);
73 void isamc_pp_close(ISAMC_PP pp);
76 int isamc_read_item(ISAMC_PP pp, char **dst);
79 int isamc_pp_read(ISAMC_PP pp, void *buf);
82 zint isamc_pp_num(ISAMC_PP pp);
85 zint isamc_block_used(ISAMC is, int type);
88 int isamc_block_size(ISAMC is, int type);
90 #define isamc_type(x) ((x) & 7)
91 #define isamc_block(x) ((x) >> 3)
99 * c-file-style: "Stroustrup"
100 * indent-tabs-mode: nil
102 * vim: shiftwidth=4 tabstop=8 expandtab