2 * Copyright (C) 1994-1995, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.13 1995-09-28 14:22:56 adam
8 * Sort uses smaller temporary files.
10 * Revision 1.12 1995/09/28 12:10:32 adam
11 * Bug fixes. Field prefix used in queries.
13 * Revision 1.11 1995/09/27 12:22:28 adam
14 * More work on extract in record control.
15 * Field name is not in isam keys but in prefix in dictionary words.
17 * Revision 1.10 1995/09/14 07:48:23 adam
18 * Record control management.
20 * Revision 1.9 1995/09/11 13:09:33 adam
21 * More work on relevance feedback.
23 * Revision 1.8 1995/09/08 14:52:27 adam
24 * Minor changes. Dictionary is lower case now.
26 * Revision 1.7 1995/09/06 16:11:16 adam
27 * Option: only one word key per file.
29 * Revision 1.6 1995/09/05 15:28:39 adam
30 * More work on search engine.
32 * Revision 1.5 1995/09/04 12:33:42 adam
33 * Various cleanup. YAZ util used instead.
35 * Revision 1.4 1995/09/04 09:10:35 adam
36 * More work on index add/del/update.
37 * Merge sort implemented.
38 * Initial work on z39 server.
40 * Revision 1.3 1995/09/01 14:06:35 adam
41 * Split of work into more files.
43 * Revision 1.2 1995/09/01 10:30:24 adam
44 * More work on indexing. Not working yet.
46 * Revision 1.1 1995/08/31 14:50:24 adam
47 * New simple file index tool.
55 #define IT_MAX_WORD 256
56 #define IT_KEY_HAVE_SEQNO 1
57 #define IT_KEY_HAVE_FIELD 0
68 struct dir_entry *dir_open (const char *rep);
69 void dir_sort (struct dir_entry *e);
70 void dir_free (struct dir_entry **e_p);
71 void repository (int cmd, const char *rep, const char *base_path);
73 void file_extract (int cmd, const char *fname, const char *kname);
75 void key_open (int mem);
77 void key_write (int cmd, struct it_key *k, const char *str);
78 int key_compare (const void *p1, const void *p2);
79 void key_logdump (int mask, const void *p);
80 void key_input (const char *dict_fname, const char *isam_fname,
81 const char *key_fname, int cache);
82 int merge_sort (char **buf, int from, int to);
84 #define TEMP_FNAME "keys%d.tmp"
85 #define FNAME_WORD_DICT "worddict"
86 #define FNAME_WORD_ISAM "wordisam"
87 #define FNAME_FILE_DICT "filedict"
88 #define FNAME_SYS_IDX "sysidx"
89 #define SYS_IDX_ENTRY_LEN 120
91 struct strtab *strtab_mk (void);
92 int strtab_src (struct strtab *t, const char *name, void ***infop);
93 void strtab_del (struct strtab *t,
94 void (*func)(const char *name, void *info, void *data),
96 int index_char_cvt (int c);
97 int index_word_prefix (char *string, int attrSet, int attrUse);