1: /* $Header$ */
2:
3: /*
4: * Singly-linked key+string list definitions
5: *
6: * Author: Peter J. Nicklin
7: */
8:
9: /*
10: * Singly-linked key+string list macros
11: */
12: #define SLSNUM(slslist) (slslist)->nk
13: /*
14: * Singly-linked key+string list block
15: */
16: typedef struct _slsblk
17: {
18: char *key; /* points to key */
19: char *string; /* points to non-key string */
20: struct _slsblk *next; /* ptr to next list block */
21: } SLSBLK;
22: /*
23: * Singly-linked key+string list head block
24: */
25: typedef struct _slslisthb
26: {
27: int nk; /* number of keys in list */
28: int maxkey; /* length of longest key */
29: int maxstr; /* length of longest non-key string */
30: SLSBLK *head; /* pointer to first list block */
31: SLSBLK *curblk; /* pointer to current block */
32: SLSBLK *tail; /* pointer to last list block */
33: } SLSLIST;
34: /*
35: * Functions defined for singly-linked key+string list operations
36: */
37: extern char *slsappend(); /* append key+string */
38: extern SLSBLK *slsget(); /* get next key+string block */
39: extern SLSLIST *slsinit(); /* initialize key+string list */
40: extern char *slsinsert(); /* insert key+string */
41: extern char *slsprepend(); /* prepend key+string */
42: extern void slsprint(); /* print key+string list */
43: extern void slsrewind(); /* rewind key+string list */
44: extern void slsrm(); /* remove key+string list item */
45: extern int slssort(); /* sort key+string list */
Defined struct's
Defined typedef's
Defined macros