2 * Copyright (C) 1994-1999, Index Data
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.6 1999-05-26 07:49:13 adam
10 * Revision 1.5 1999/02/02 14:51:05 adam
11 * Updated WIN32 code specific sections. Changed header.
13 * Revision 1.4 1998/03/05 08:45:12 adam
14 * New result set model and modular ranking system. Moved towards
15 * descent server API. System information stored as "SGML" records.
17 * Revision 1.3 1995/12/11 11:45:55 adam
18 * Removed commented code.
20 * Revision 1.2 1995/12/11 09:12:51 adam
21 * The rec_get function returns NULL if record doesn't exist - will
22 * happen in the server if the result set records have been deleted since
23 * the creation of the set (i.e. the search).
24 * The server saves a result temporarily if it is 'volatile', i.e. the
25 * set is register dependent.
27 * Revision 1.1 1995/12/06 12:41:25 adam
28 * New command 'stat' for the index program.
29 * Filenames can be read from stdin by specifying '-'.
30 * Bug fix/enhancement of the transformation from terms to regular
31 * expressons in the search engine.
43 #define REC_BLOCK_TYPES 2
44 #define REC_HEAD_MAGIC "recindx"
52 char *data_fname[REC_BLOCK_TYPES];
53 BFile data_BFile[REC_BLOCK_TYPES];
58 struct record_cache_entry *record_cache;
65 int block_size[REC_BLOCK_TYPES];
66 int block_free[REC_BLOCK_TYPES];
67 int block_last[REC_BLOCK_TYPES];
68 int block_used[REC_BLOCK_TYPES];
69 int block_move[REC_BLOCK_TYPES];
79 enum recordCacheFlag { recordFlagNop, recordFlagWrite, recordFlagNew,
82 struct record_cache_entry {
84 enum recordCacheFlag flag;
87 struct record_index_entry {
88 int next; /* first block of record info / next free entry */
89 int size; /* size of record or 0 if free entry */