2 * Copyright (c) 1995-1997, Index Data.
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.6 1997-09-17 12:19:10 adam
8 * Zebra version corresponds to YAZ version 1.4.
9 * Changed Zebra server so that it doesn't depend on global common_resource.
11 * Revision 1.5 1997/09/05 15:30:00 adam
12 * Changed prototype for chr_map_input - added const.
13 * Added support for C++, headers uses extern "C" for public definitions.
15 * Revision 1.4 1996/11/08 11:08:01 adam
16 * New internal release.
18 * Revision 1.3 1996/11/01 13:35:03 adam
19 * New element, max_blocks_mem, that control how many blocks of max size
20 * to store in memory during isc_merge.
22 * Revision 1.2 1996/10/29 16:44:42 adam
23 * Added isc_type, isc_block macros.
25 * Revision 1.1 1996/10/29 13:40:37 adam
39 typedef struct ISAMC_s *ISAMC;
41 typedef struct ISAMC_PP_s *ISAMC_PP;
43 typedef struct ISAMC_filecat_s {
44 int bsize; /* block size */
45 int ifill; /* initial fill */
46 int mfill; /* minimum fill */
47 int mblocks; /* maximum blocks */
50 typedef struct ISAMC_M_s {
51 ISAMC_filecat filecat;
53 int (*compare_item)(const void *a, const void *b);
55 #define ISAMC_DECODE 0
56 #define ISAMC_ENCODE 1
57 void *(*code_start)(int mode);
58 void (*code_stop)(int mode, void *p);
59 void (*code_item)(int mode, void *p, char **dst, char **src);
65 typedef struct ISAMC_I_s {
66 int (*read_item)(void *clientData, char **dst, int *insertMode);
70 ISAMC_M isc_getmethod (void);
72 ISAMC isc_open (BFiles bfs, const char *name, int writeflag, ISAMC_M method);
73 int isc_close (ISAMC is);
74 ISAMC_P isc_merge (ISAMC is, ISAMC_P pos, ISAMC_I data);
76 ISAMC_PP isc_pp_open (ISAMC is, ISAMC_P pos);
77 void isc_pp_close (ISAMC_PP pp);
78 int isc_read_item (ISAMC_PP pp, char **dst);
79 int isc_pp_read (ISAMC_PP pp, void *buf);
80 int isc_pp_num (ISAMC_PP pp);
82 #define isc_type(x) ((x) & 7)
83 #define isc_block(x) ((x) >> 3)