#define HASHSIZE 151
enum ntype
{
NT_UNKNOWN, HEADER, ENTRIES, FILES, LIST, RCSNODE,
RCSVERS, DIRS, UPDATE, LOCK, NDBMNODE, FILEATTR,
VARIABLE, RCSFIELD, RCSCMPFLD
};
typedef enum ntype Ntype;
struct node
{
Ntype type;
struct node *next;
struct node *prev;
struct node *hashnext;
struct node *hashprev;
char *key;
void *data;
void (*delproc) (struct node *);
};
typedef struct node Node;
struct list
{
Node *list;
Node *hasharray[HASHSIZE];
struct list *next;
};
typedef struct list List;
List *getlist (void);
Node *findnode (List *list, const char *key);
Node *findnode_fn (List *list, const char *key);
Node *getnode (void);
int insert_before (List *list, Node *marker, Node *p);
int addnode (List *list, Node *p);
int addnode_at_front (List *list, Node *p);
int walklist (List *list, int (*)(Node *n, void *closure), void *closure);
int list_isempty (List *list);
void removenode (Node *p);
void mergelists (List *dest, List **src);
void dellist (List **listp);
void delnode (Node *p);
void freenode (Node *p);
void sortlist (List *list, int (*)(const Node *, const Node *));
int fsortcmp (const Node *p, const Node *q);