IDZEBRA 2.2.8
isamc.h
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
20#ifndef ISAMC_H
21#define ISAMC_H
22
23#include <idzebra/isam-codec.h>
24#include <idzebra/bfile.h>
25
26YAZ_BEGIN_CDECL
27
28typedef zint ISAM_P;
29
30typedef struct ISAMC_s *ISAMC;
31typedef struct ISAMC_PP_s *ISAMC_PP;
32
33typedef struct ISAMC_filecat_s {
34 int bsize; /* block size */
35 int ifill; /* initial fill */
36 int mfill; /* minimum fill */
37 int mblocks; /* maximum blocks */
39
40typedef struct ISAMC_M_s {
42
43 int (*compare_item)(const void *a, const void *b);
44 void (*log_item)(int logmask, const void *p, const char *txt);
45
47
49 int debug;
51
52typedef struct ISAMC_I_s {
53 int (*read_item)(void *clientData, char **dst, int *insertMode);
56
57YAZ_EXPORT
59
60YAZ_EXPORT
61ISAMC isamc_open(BFiles bfs, const char *name, int writeflag,
62 ISAMC_M *method);
63YAZ_EXPORT
64int isamc_close(ISAMC is);
65
66YAZ_EXPORT
67void isamc_merge(ISAMC is, ISAM_P *pos, ISAMC_I *data);
68
69YAZ_EXPORT
71
72YAZ_EXPORT
74
75YAZ_EXPORT
76int isamc_read_item(ISAMC_PP pp, char **dst);
77
78YAZ_EXPORT
79int isamc_pp_read(ISAMC_PP pp, void *buf);
80
81YAZ_EXPORT
83
84YAZ_EXPORT
85zint isamc_block_used(ISAMC is, int type);
86
87YAZ_EXPORT
88int isamc_block_size(ISAMC is, int type);
89
90#define isamc_type(x) ((x) & 7)
91#define isamc_block(x) ((x) >> 3)
92
93YAZ_END_CDECL
94
95#endif
96/*
97 * Local variables:
98 * c-basic-offset: 4
99 * c-file-style: "Stroustrup"
100 * indent-tabs-mode: nil
101 * End:
102 * vim: shiftwidth=4 tabstop=8 expandtab
103 */
104
Zebra Block File Layer.
ISAMC isamc_open(BFiles bfs, const char *name, int writeflag, ISAMC_M *method)
Definition isamc.c:77
int isamc_block_size(ISAMC is, int type)
Definition isamc.c:179
zint isamc_pp_num(ISAMC_PP pp)
Definition isamc.c:587
int isamc_close(ISAMC is)
Definition isamc.c:187
struct ISAMC_filecat_s * ISAMC_filecat
void isamc_getmethod(ISAMC_M *m)
Definition isamc.c:45
struct ISAMC_M_s ISAMC_M
int isamc_read_item(ISAMC_PP pp, char **dst)
Definition isamc.c:522
int isamc_pp_read(ISAMC_PP pp, void *buf)
Definition isamc.c:511
struct ISAMC_s * ISAMC
Definition isamc.h:30
void isamc_merge(ISAMC is, ISAM_P *pos, ISAMC_I *data)
Definition merge.c:154
void isamc_pp_close(ISAMC_PP pp)
Definition isamc.c:458
ISAMC_PP isamc_pp_open(ISAMC is, ISAM_P pos)
Definition isamc.c:467
zint isamc_block_used(ISAMC is, int type)
Definition isamc.c:172
zint ISAM_P
Definition isamc.h:28
struct ISAMC_PP_s * ISAMC_PP
Definition isamc.h:31
struct ISAMC_I_s ISAMC_I
int(* read_item)(void *clientData, char **dst, int *insertMode)
Definition isamc.h:53
void * clientData
Definition isamc.h:54
int(* compare_item)(const void *a, const void *b)
Definition isamc.h:43
ISAMC_filecat filecat
Definition isamc.h:41
ISAM_CODEC codec
Definition isamc.h:46
int max_blocks_mem
Definition isamc.h:48
void(* log_item)(int logmask, const void *p, const char *txt)
Definition isamc.h:44
int debug
Definition isamc.h:49
long zint
Zebra integer.
Definition util.h:66