symlist.h

Sun, 20 Jun 2004 13:22:50 +0200

author
tuomov
date
Sun, 20 Jun 2004 13:22:50 +0200
changeset 75
725a7187c6ff
parent 62
aae5facf9fc5
child 88
308dfa54da3e
permissions
-rw-r--r--

trunk: changeset 1583
Added stringintmap_key (taken from the Ion dock
module/stringintmap_reverse_value).

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

mercurial