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;
36 typedef struct node Node;
41 Node *hasharray[HASHSIZE];
44 typedef struct list List;
46 List *getlist PROTO((void));
47 Node *findnode PROTO((List * list, const char *key));
48 Node *findnode_fn PROTO((List * list, const char *key));
49 Node *getnode PROTO((void));
50 int insert_before PROTO((List * list, Node * marker, Node * p));
51 int addnode PROTO((List * list, Node * p));
52 int addnode_at_front PROTO((List * list, Node * p));
53 int walklist PROTO((List * list, int (*)(Node *n, void *closure), void *closure));
54 int list_isempty PROTO ((List *list));
55 void dellist PROTO((List ** listp));
56 void delnode PROTO((Node * p));
57 void freenode PROTO((Node * p));
58 void sortlist PROTO((List * list, int (*)(const Node *, const Node *)));
59 int fsortcmp PROTO((const Node * p, const Node * q));