1 /* This file is part of the Zebra server.
2 Copyright (C) 1994-2009 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
22 #include <idzebra/bfile.h>
23 #include <idzebra/isamc.h>
32 typedef unsigned ISAMC_BLOCK_SIZE;
34 typedef struct ISAMC_file_s {
54 int alloc_entries_num;
55 int alloc_entries_max;
71 ISAMC_BLOCK_SIZE offset;
72 ISAMC_BLOCK_SIZE size;
77 void *decodeClientData;
83 first block consists of
85 size : ISAMC_BLOCK_SIZE (int)
88 other blocks consists of
90 size : ISAMC_BLOCK_SIZE (int)
93 #define ISAMC_BLOCK_OFFSET_1 (sizeof(zint)+sizeof(ISAMC_BLOCK_SIZE)+sizeof(zint))
94 #define ISAMC_BLOCK_OFFSET_N (sizeof(zint)+sizeof(ISAMC_BLOCK_SIZE))
96 zint isamc_alloc_block (ISAMC is, int cat);
97 void isamc_release_block (ISAMC is, int cat, zint pos);
98 int isamc_read_block (ISAMC is, int cat, zint pos, char *dst);
99 int isamc_write_block (ISAMC is, int cat, zint pos, char *src);
107 * indent-tabs-mode: nil
109 * vim: shiftwidth=4 tabstop=8 expandtab