2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.1 1994-08-16 16:26:53 adam
17 typedef unsigned Dict_ptr;
18 typedef char Dict_char;
23 Dict_ptr free_list, last;
26 typedef struct Dict_struct {
28 struct Dict_head head;
31 #define DICT_MAGIC "dict00"
33 typedef int Dict_info;
35 #define DICT_PAGESIZE 8192
37 Dict dict_open (const char *name, int cache, int rw);
38 int dict_close (Dict dict);
39 int dict_insert (Dict dict, const Dict_char *p, void *userinfo);
40 int dict_lookup (Dict dict, Dict_char *p);
41 int dict_strcmp (const Dict_char *s1, const Dict_char *s2);
42 int dict_strlen (const Dict_char *s);
45 #define DICT_type(x) 0[(Dict_ptr*) x]
46 #define DICT_backptr(x) 1[(Dict_ptr*) x]
47 #define DICT_nextptr(x) 2[(Dict_ptr*) x]
48 #define DICT_nodir(x) 0[(short*)((char*)(x)+3*sizeof(Dict_ptr))]
49 #define DICT_size(x) 1[(short*)((char*)(x)+3*sizeof(Dict_ptr))]
50 #define DICT_info(x) ((char*)(x)+3*sizeof(Dict_ptr)+2*sizeof(short))
52 #define DICT_to_str(x) sizeof(Dict_info)+sizeof(Dict_ptr)
57 backptr pointer to parent
58 nextptr pointer to next page (if any)
60 size size of strings,info,ptr entries