2 * Copyright (C) 1994-1995, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.8 1995-09-08 14:52:27 adam
8 * Minor changes. Dictionary is lower case now.
10 * Revision 1.7 1995/09/06 16:11:16 adam
11 * Option: only one word key per file.
13 * Revision 1.6 1995/09/05 15:28:39 adam
14 * More work on search engine.
16 * Revision 1.5 1995/09/04 12:33:42 adam
17 * Various cleanup. YAZ util used instead.
19 * Revision 1.4 1995/09/04 09:10:35 adam
20 * More work on index add/del/update.
21 * Merge sort implemented.
22 * Initial work on z39 server.
24 * Revision 1.3 1995/09/01 14:06:35 adam
25 * Split of work into more files.
27 * Revision 1.2 1995/09/01 10:30:24 adam
28 * More work on indexing. Not working yet.
30 * Revision 1.1 1995/08/31 14:50:24 adam
31 * New simple file index tool.
39 #define IT_MAX_WORD 256
40 #define IT_KEY_HAVE_FIELD 0
54 struct dir_entry *dir_open (const char *rep);
55 void dir_sort (struct dir_entry *e);
56 void dir_free (struct dir_entry **e_p);
57 void repository (int cmd, const char *rep, const char *base_path);
59 void file_extract (int cmd, const char *fname, const char *kname);
61 void key_open (const char *fname);
63 void key_flush (void);
64 void key_write (int cmd, struct it_key *k, const char *str);
65 int key_compare (const void *p1, const void *p2);
66 void key_input (const char *dict_fname, const char *isam_fname,
67 const char *key_fname, int cache);
68 int key_sort (const char *key_fname, size_t mem);
70 #define FNAME_WORD_DICT "worddict"
71 #define FNAME_WORD_ISAM "wordisam"
72 #define FNAME_FILE_DICT "filedict"
73 #define FNAME_SYS_IDX "sysidx"
74 #define SYS_IDX_ENTRY_LEN 120
76 struct strtab *strtab_mk (void);
77 int strtab_src (struct strtab *t, const char *name, void ***infop);
78 void strtab_del (struct strtab *t,
79 void (*func)(const char *name, void *info, void *data),
81 int index_char_cvt (int c);