2 * Copyright (c) 1992, Brian Berliner and Jeff Polk
4 * You may distribute under the terms of the GNU General Public License as
5 * specified in the README file that comes with the CVS source distribution.
9 * The number of buckets for the hash table contained in each list. This
10 * should probably be prime.
19 NT_UNKNOWN, HEADER, ENTRIES, FILES, LIST, RCSNODE,
20 RCSVERS, DIRS, UPDATE, LOCK, NDBMNODE, FILEATTR,
21 VARIABLE, RCSFIELD, RCSCMPFLD
23 typedef enum ntype Ntype;
30 struct node *hashnext;
31 struct node *hashprev;
34 void (*delproc) (struct node *);
36 typedef struct node Node;
41 Node *hasharray[HASHSIZE];
44 typedef struct list List;
47 Node *findnode (List * list, const char *key);
48 Node *findnode_fn (List * list, const char *key);
50 int insert_before (List * list, Node * marker, Node * p);
51 int addnode (List * list, Node * p);
52 int addnode_at_front (List * list, Node * p);
53 int walklist (List * list, int (*)(Node *n, void *closure), void *closure);
54 int list_isempty (List *list);
55 void dellist (List ** listp);
56 void delnode (Node * p);
57 void freenode (Node * p);
58 void sortlist (List * list, int (*)(const Node *, const Node *));
59 int fsortcmp (const Node * p, const Node * q);