2 * Copyright (c) 1995-1996, Index Data.
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.2 1996-10-29 16:44:42 adam
8 * Added isc_type, isc_block macros.
10 * Revision 1.1 1996/10/29 13:40:37 adam
18 typedef struct ISAMC_s *ISAMC;
20 typedef struct ISAMC_PP_s *ISAMC_PP;
22 typedef struct ISAMC_filecat_s {
23 int bsize; /* block size */
24 int ifill; /* initial fill */
25 int mfill; /* minimum fill */
26 int mblocks; /* maximum blocks */
29 typedef struct ISAMC_M_s {
30 ISAMC_filecat filecat;
32 int (*compare_item)(const void *a, const void *b);
34 #define ISAMC_DECODE 0
35 #define ISAMC_ENCODE 1
36 void *(*code_start)(int mode);
37 void (*code_stop)(int mode, void *p);
38 void (*code_item)(int mode, void *p, char **dst, char **src);
43 typedef struct ISAMC_I_s {
44 int (*read_item)(void *clientData, char **dst, int *insertMode);
48 ISAMC_M isc_getmethod (void);
50 ISAMC isc_open (const char *name, int writeflag, ISAMC_M method);
51 int isc_close (ISAMC is);
52 ISAMC_P isc_merge (ISAMC is, ISAMC_P pos, ISAMC_I data);
54 ISAMC_PP isc_pp_open (ISAMC is, ISAMC_P pos);
55 void isc_pp_close (ISAMC_PP pp);
56 int isc_read_item (ISAMC_PP pp, char **dst);
57 int isc_read_key (ISAMC_PP pp, void *buf);
58 int isc_numkeys (ISAMC_PP pp);
60 #define isc_type(x) ((x) & 7)
61 #define isc_block(x) ((x) >> 3)