2 * Copyright (c) 1995-1997, Index Data.
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.5 1997-09-05 15:30:00 adam
8 * Changed prototype for chr_map_input - added const.
9 * Added support for C++, headers uses extern "C" for public definitions.
11 * Revision 1.4 1996/11/08 11:08:01 adam
12 * New internal release.
14 * Revision 1.3 1996/11/01 13:35:03 adam
15 * New element, max_blocks_mem, that control how many blocks of max size
16 * to store in memory during isc_merge.
18 * Revision 1.2 1996/10/29 16:44:42 adam
19 * Added isc_type, isc_block macros.
21 * Revision 1.1 1996/10/29 13:40:37 adam
33 typedef struct ISAMC_s *ISAMC;
35 typedef struct ISAMC_PP_s *ISAMC_PP;
37 typedef struct ISAMC_filecat_s {
38 int bsize; /* block size */
39 int ifill; /* initial fill */
40 int mfill; /* minimum fill */
41 int mblocks; /* maximum blocks */
44 typedef struct ISAMC_M_s {
45 ISAMC_filecat filecat;
47 int (*compare_item)(const void *a, const void *b);
49 #define ISAMC_DECODE 0
50 #define ISAMC_ENCODE 1
51 void *(*code_start)(int mode);
52 void (*code_stop)(int mode, void *p);
53 void (*code_item)(int mode, void *p, char **dst, char **src);
59 typedef struct ISAMC_I_s {
60 int (*read_item)(void *clientData, char **dst, int *insertMode);
64 ISAMC_M isc_getmethod (void);
66 ISAMC isc_open (const char *name, int writeflag, ISAMC_M method);
67 int isc_close (ISAMC is);
68 ISAMC_P isc_merge (ISAMC is, ISAMC_P pos, ISAMC_I data);
70 ISAMC_PP isc_pp_open (ISAMC is, ISAMC_P pos);
71 void isc_pp_close (ISAMC_PP pp);
72 int isc_read_item (ISAMC_PP pp, char **dst);
73 int isc_pp_read (ISAMC_PP pp, void *buf);
74 int isc_pp_num (ISAMC_PP pp);
76 #define isc_type(x) ((x) & 7)
77 #define isc_block(x) ((x) >> 3)