2 * Copyright (C) 1994-1995, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.4 1998-03-05 08:45:12 adam
8 * New result set model and modular ranking system. Moved towards
9 * descent server API. System information stored as "SGML" records.
11 * Revision 1.3 1995/12/11 11:45:55 adam
12 * Removed commented code.
14 * Revision 1.2 1995/12/11 09:12:51 adam
15 * The rec_get function returns NULL if record doesn't exist - will
16 * happen in the server if the result set records have been deleted since
17 * the creation of the set (i.e. the search).
18 * The server saves a result temporarily if it is 'volatile', i.e. the
19 * set is register dependent.
21 * Revision 1.1 1995/12/06 12:41:25 adam
22 * New command 'stat' for the index program.
23 * Filenames can be read from stdin by specifying '-'.
24 * Bug fix/enhancement of the transformation from terms to regular
25 * expressons in the search engine.
33 #define REC_BLOCK_TYPES 2
34 #define REC_HEAD_MAGIC "recindx"
42 char *data_fname[REC_BLOCK_TYPES];
43 BFile data_BFile[REC_BLOCK_TYPES];
48 struct record_cache_entry *record_cache;
55 int block_size[REC_BLOCK_TYPES];
56 int block_free[REC_BLOCK_TYPES];
57 int block_last[REC_BLOCK_TYPES];
58 int block_used[REC_BLOCK_TYPES];
59 int block_move[REC_BLOCK_TYPES];
69 enum recordCacheFlag { recordFlagNop, recordFlagWrite, recordFlagNew,
72 struct record_cache_entry {
74 enum recordCacheFlag flag;
77 struct record_index_entry {
78 int next; /* first block of record info / next free entry */
79 int size; /* size of record or 0 if free entry */