1: /* $Header$ */
2:
3: /*
4: * Singly-linked list definitions
5: *
6: * Author: Peter J. Nicklin
7: */
8:
9: /*
10: * Singly-linked list macros
11: */
12: #define SLNUM(slist) (slist)->nk
13: /*
14: * Singly-linked list block
15: */
16: typedef struct slblk
17: {
18: char *key; /* points to a key */
19: struct slblk *next; /* ptr to next list block */
20: } SLBLK;
21: /*
22: * Singly-linked list head block
23: */
24: typedef struct slisthb
25: {
26: int nk; /* number of keys in list */
27: int maxkey; /* length of longest key */
28: SLBLK *head; /* pointer to first list block */
29: SLBLK *curblk; /* pointer to current block */
30: SLBLK *tail; /* pointer to last list block */
31: } SLIST;
32: /*
33: * Functions defined for singly-linked list operations
34: */
35: extern char *slappend(); /* append key */
36: extern char *slget(); /* get next key */
37: extern SLIST *slinit(); /* initialize list */
38: extern char *slinsert(); /* insert key */
39: extern int slpop(); /* pop key */
40: extern char *slprepend(); /* prepend key */
41: extern void slprint(); /* print list */
42: extern void slrewind(); /* rewind list */
43: extern void slrm(); /* remove list item */
44: extern int slsort(); /* sort list */
45: extern void slsplice(); /* splice two lists */
Defined struct's
slblk
defined in line
16; used 2 times
Defined typedef's
SLBLK
defined in line
20; used 3 times
SLIST
defined in line
31; used 1 times
Defined macros
SLNUM
defined in line
12;
never used