]>
Commit | Line | Data |
---|---|---|
77970e15 | 1 | typedef /*@null@*/ struct _list |
2 | { | |
3 | /*@only@*/ char *this; | |
4 | /*@null@*/ /*@only@*/ struct _list *next; | |
5 | } *list; | |
6 | ||
7 | extern /*@out@*/ /*@only@*/ void * | |
8 | smalloc (size_t); | |
9 | ||
10 | void | |
11 | list_addh (list l, /*@only@*/ char *e) | |
12 | { | |
13 | if (l != NULL) | |
14 | { | |
15 | while (l->next != NULL) | |
16 | { | |
17 | l = l->next; | |
18 | } | |
19 | ||
20 | l->next = (list) smalloc (sizeof (*l->next)); | |
21 | l->next->this = e; | |
22 | } | |
23 | } | |
24 | ||
25 | ||
26 |