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