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