| |
| 1 |
/* |
| 2 |
* Copyright 1993, 1995 Christopher Seiwald. |
| 3 |
* |
| 4 |
* This file is part of Jam - see jam.c for Copyright information. |
| 5 |
*/ |
| 6 |
|
| 7 |
/* |
| 8 |
* lists.h - the LIST structure and routines to manipulate them |
| 9 |
* |
| 10 |
* 04/13/94 (seiwald) - added shorthand L0 for null list pointer |
| 11 |
* 08/23/94 (seiwald) - new list_append() |
| 12 |
*/ |
| 13 |
|
| 14 |
/* |
| 15 |
* LIST - list of strings |
| 16 |
*/ |
| 17 |
|
| 18 |
typedef struct _list LIST; |
| 19 |
|
|
struct _list { |
| 21 |
LIST *next; |
| 22 |
LIST *tail; /* only valid in head node */ |
| 23 |
char *string; /* private copy */ |
| 24 |
} ; |
| 25 |
|
| 26 |
typedef struct _lol LOL; |
| 27 |
|
|
# define LOL_MAX 9 |
| 29 |
|
| 30 |
struct _lol { |
| 31 |
int count; |
| 32 |
LIST *list[ LOL_MAX ]; |
| 33 |
} ; |
| 34 |
|
| 35 |
LIST *list_append(); |
| 36 |
LIST *list_copy(); |
| 37 |
LIST *list_new(); |
| 38 |
void list_free(); |
| 39 |
void list_print(); |
| 40 |
LIST *list_sublist(); |
| 41 |
|
| 42 |
# define list_next( l ) ((l)->next) |
| 43 |
|
| 44 |
# define L0 ((LIST *)0) |
| 45 |
|
| 46 |
void lol_init(); |
| 47 |
void lol_add(); |
| 48 |
void lol_free(); |
| 49 |
LIST *lol_get(); |
| 50 |
void lol_print(); |
| |