2 * Copyright (C) 1994-1995, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.2 1995-12-11 09:12:51 adam
8 * The rec_get function returns NULL if record doesn't exist - will
9 * happen in the server if the result set records have been deleted since
10 * the creation of the set (i.e. the search).
11 * The server saves a result temporarily if it is 'volatile', i.e. the
12 * set is register dependent.
14 * Revision 1.1 1995/12/06 12:41:25 adam
15 * New command 'stat' for the index program.
16 * Filenames can be read from stdin by specifying '-'.
17 * Bug fix/enhancement of the transformation from terms to regular
18 * expressons in the search engine.
26 #define REC_BLOCK_TYPES 2
27 #define REC_HEAD_MAGIC "recindx"
36 char *data_fname[REC_BLOCK_TYPES];
37 BFile data_BFile[REC_BLOCK_TYPES];
42 struct record_cache_entry *record_cache;
49 int block_size[REC_BLOCK_TYPES];
50 int block_free[REC_BLOCK_TYPES];
51 int block_last[REC_BLOCK_TYPES];
52 int block_used[REC_BLOCK_TYPES];
53 int block_move[REC_BLOCK_TYPES];
63 enum recordCacheFlag { recordFlagNop, recordFlagWrite, recordFlagNew,
66 struct record_cache_entry {
68 enum recordCacheFlag flag;
71 struct record_index_entry {
73 int next; /* first block of record info / next free entry */
74 int size; /* size of record or 0 if free entry */