symlist.h

changeset 60
a4033700e35c
child 62
aae5facf9fc5
equal deleted inserted replaced
59:d8ecbeda7683 60:a4033700e35c
1 /*
2 * libtu/symlist.h
3 *
4 * Copyright (c) Tuomo Valkonen 1999-2004.
5 *
6 * You may distribute and modify this library under the terms of either
7 * the Clarified Artistic License or the GNU LGPL, version 2.1 or later.
8 */
9
10 #ifndef LIBTU_SYMLIST_H
11 #define LIBTU_SYMLIST_H
12
13 #include "types.h"
14 #include "obj.h"
15
16
17 INTRSTRUCT(Symlist);
18
19
20 DECLSTRUCT(Symlist){
21 void *symbol;
22 Symlist *next, *prev;
23 };
24
25
26 #define ITERATE_SYMLIST(TYPE, VAR, LIST) \
27 for((VAR)=(TYPE)symlist_init_iter(LIST); \
28 (VAR)!=NULL; \
29 (VAR)=(TYPE)symlist_iter())
30
31
32 bool symlist_insert(Symlist **symlist, void *symbol);
33 void symlist_remove(Symlist **symlist, void *symbol);
34 void symlist_clear(Symlist **symlist);
35 void *symlist_init_iter(Symlist *symlist);
36 void *symlist_iter();
37
38 #endif /* LIBTU_SYMLIST_H */

mercurial