2 * Copyright (c) 1995-1996, Index Data.
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.1 1996-10-29 13:40:37 adam
15 typedef struct ISAMC_s *ISAMC;
17 typedef struct ISAMC_PP_s *ISAMC_PP;
19 typedef struct ISAMC_filecat_s {
20 int bsize; /* block size */
21 int ifill; /* initial fill */
22 int mfill; /* minimum fill */
23 int mblocks; /* maximum blocks */
26 typedef struct ISAMC_M_s {
27 ISAMC_filecat filecat;
29 int (*compare_item)(const void *a, const void *b);
31 #define ISAMC_DECODE 0
32 #define ISAMC_ENCODE 1
33 void *(*code_start)(int mode);
34 void (*code_stop)(int mode, void *p);
35 void (*code_item)(int mode, void *p, char **dst, char **src);
40 typedef struct ISAMC_I_s {
41 int (*read_item)(void *clientData, char **dst, int *insertMode);
45 ISAMC_M isc_getmethod (void);
47 ISAMC isc_open (const char *name, int writeflag, ISAMC_M method);
48 int isc_close (ISAMC is);
49 ISAMC_P isc_merge (ISAMC is, ISAMC_P pos, ISAMC_I data);
51 ISAMC_PP isc_pp_open (ISAMC is, ISAMC_P pos);
52 void isc_pp_close (ISAMC_PP pp);
53 int isc_read_item (ISAMC_PP pp, char **dst);
54 int isc_read_key (ISAMC_PP pp, void *buf);
55 int isc_numkeys (ISAMC_PP pp);