More work on index add/del/update.
[idzebra-moved-to-github.git] / index / index.h
1 /*
2  * Copyright (C) 1995, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: index.h,v $
7  * Revision 1.4  1995-09-04 09:10:35  adam
8  * More work on index add/del/update.
9  * Merge sort implemented.
10  * Initial work on z39 server.
11  *
12  * Revision 1.3  1995/09/01  14:06:35  adam
13  * Split of work into more files.
14  *
15  * Revision 1.2  1995/09/01  10:30:24  adam
16  * More work on indexing. Not working yet.
17  *
18  * Revision 1.1  1995/08/31  14:50:24  adam
19  * New simple file index tool.
20  *
21  */
22
23 #include <util.h>
24 #include <dict.h>
25 #include <isam.h>
26
27 struct it_key {
28     int sysno;
29     int seqno;
30     int field;
31 };
32
33 struct dir_entry {
34     char *name;
35 };
36
37 struct dir_entry *dir_open (const char *rep);
38 void dir_sort (struct dir_entry *e);
39 void dir_free (struct dir_entry **e_p);
40 void repository (int cmd, const char *rep, const char *base_path);
41
42 void file_extract (int cmd, const char *fname, const char *kname);
43
44 void key_open (const char *fname);
45 int key_close (void);
46 void key_flush (void);
47 void key_write (int cmd, struct it_key *k, const char *str);
48 int key_compare (const void *p1, const void *p2);
49 int key_compare_x (const struct it_key *i1, const struct it_key *i2);
50 void key_input (const char *dict_fname, const char *isam_fname, 
51                 const char *key_fname, int cache);
52 int key_sort (const char *key_fname, size_t mem);