4abbc72787cce86cf500570223d779610f508d9c
[idzebra-moved-to-github.git] / isamc / isamc-p.h
1 /*
2  * Copyright (c) 1995-1996, Index Data.
3  * See the file LICENSE for details.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: isamc-p.h,v $
7  * Revision 1.2  1996-11-01 08:59:13  adam
8  * First version of isc_merge that supports update/delete.
9  *
10  * Revision 1.1  1996/10/29 13:40:47  adam
11  * First work.
12  *
13  */
14
15 #include <bfile.h>
16 #include <isamc.h>
17
18 typedef struct {
19     int lastblock;
20     int freelist;
21 } ISAMC_head;
22
23 typedef struct ISAMC_file_s {
24     ISAMC_head head;
25     BFile bf;
26     int head_is_dirty;
27     
28     int no_writes;
29     int no_reads;
30     int no_skip_writes;
31     int no_allocated;
32     int no_released;
33     int no_remap;
34 } *ISAMC_file;
35
36 struct ISAMC_s {
37     int no_files;
38     int max_cat;
39     char *merge_buf;
40     ISAMC_M method;
41     ISAMC_file files;
42 }; 
43
44 struct ISAMC_PP_s {
45     char *buf;
46     int offset;
47     int size;
48     int cat;
49     int pos;
50     int next;
51     ISAMC is;
52     void *decodeClientData;
53     int deleteFlag;
54 };
55
56 #define ISAMC_BLOCK_OFFSET (sizeof(int)+sizeof(int)) 
57
58 int isc_alloc_block (ISAMC is, int cat);
59 void isc_release_block (ISAMC is, int cat, int pos);
60 int isc_write_dblock (ISAMC is, int cat, int pos, char *src,
61                       int nextpos, int offset);
62