1 /* $Id: isamc-p.h,v 1.14 2005-01-15 19:38:31 adam Exp $
2 Copyright (C) 1995-2005
5 This file is part of the Zebra server.
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
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
17 You should have received a copy of the GNU General Public License
18 along with Zebra; see the file LICENSE.zebra. If not, write to the
19 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
25 #include <idzebra/bfile.h>
26 #include <idzebra/isamc.h>
35 typedef unsigned ISAMC_BLOCK_SIZE;
37 typedef struct ISAMC_file_s {
57 int alloc_entries_num;
58 int alloc_entries_max;
74 ISAMC_BLOCK_SIZE offset;
75 ISAMC_BLOCK_SIZE size;
80 void *decodeClientData;
86 first block consists of
88 size : ISAMC_BLOCK_SIZE (int)
91 other blocks consists of
93 size : ISAMC_BLOCK_SIZE (int)
96 #define ISAMC_BLOCK_OFFSET_1 (sizeof(zint)+sizeof(ISAMC_BLOCK_SIZE)+sizeof(zint))
97 #define ISAMC_BLOCK_OFFSET_N (sizeof(zint)+sizeof(ISAMC_BLOCK_SIZE))
99 zint isc_alloc_block (ISAMC is, int cat);
100 void isc_release_block (ISAMC is, int cat, zint pos);
101 int isc_read_block (ISAMC is, int cat, zint pos, char *dst);
102 int isc_write_block (ISAMC is, int cat, zint pos, char *src);