Include zebrautl.h instead of alexutil.h.
[idzebra-moved-to-github.git] / index / recindex.h
1 /*
2  * Copyright (C) 1994-1995, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: recindex.h,v $
7  * Revision 1.10  1996-10-29 14:06:53  adam
8  * Include zebrautl.h instead of alexutil.h.
9  *
10  * Revision 1.9  1996/05/01 13:46:36  adam
11  * First work on multiple records in one file.
12  * New option, -offset, to the "unread" command in the filter module.
13  *
14  * Revision 1.8  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.
19  *
20  * Revision 1.7  1995/11/28  09:09:45  adam
21  * Zebra config renamed.
22  * Use setting 'recordId' to identify record now.
23  * Bug fix in recindex.c: rec_release_blocks was invokeded even
24  * though the blocks were already released.
25  * File traversal properly deletes records when needed.
26  *
27  * Revision 1.6  1995/11/27  09:56:21  adam
28  * Record info elements better enumerated. Internal store of records.
29  *
30  * Revision 1.5  1995/11/25  10:24:07  adam
31  * More record fields - they are enumerated now.
32  * New options: flagStoreData flagStoreKey.
33  *
34  * Revision 1.4  1995/11/22  17:19:19  adam
35  * Record management uses the bfile system.
36  *
37  * Revision 1.3  1995/11/20  16:59:46  adam
38  * New update method: the 'old' keys are saved for each records.
39  *
40  * Revision 1.2  1995/11/15  19:13:08  adam
41  * Work on record management.
42  *
43  * Revision 1.1  1995/11/15  14:46:21  adam
44  * Started work on better record management system.
45  *
46  */
47
48 #include <zebrautl.h>
49
50 #define REC_NO_INFO 8
51
52 typedef struct record_info {
53     int sysno;
54     int newFlag;
55     char *info[REC_NO_INFO];
56     size_t size[REC_NO_INFO];
57 } *Record;
58
59 typedef struct records_info *Records;
60
61 Record rec_cp (Record rec);
62 void rec_del (Records p, Record *recpp);
63 void rec_rm (Record *recpp);
64 void rec_put (Records p, Record *recpp);
65 Record rec_new (Records p);
66 Record rec_get (Records p, int sysno);
67 void rec_close (Records *p);
68 Records rec_open (int rw);
69 char *rec_strdup (const char *s, size_t *len);
70
71 enum { 
72     recInfo_fileType, 
73     recInfo_filename, 
74     recInfo_delKeys, 
75     recInfo_databaseName,
76     recInfo_storeData,
77     recInfo_offset
78 };
79