objlist.h

changeset 62
aae5facf9fc5
parent 60
a4033700e35c
child 91
817f90f58aec
equal deleted inserted replaced
61:fc585645ad05 62:aae5facf9fc5
16 16
17 INTRSTRUCT(ObjList); 17 INTRSTRUCT(ObjList);
18 18
19 19
20 DECLSTRUCT(ObjList){ 20 DECLSTRUCT(ObjList){
21 Watch watch; /* Must be kept at head of structure */ 21 Watch watch; /* Must be kept at head of structure */
22 ObjList *next, *prev; 22 ObjList *next, *prev;
23 ObjList **list; 23 ObjList **list;
24 }; 24 };
25 25
26 26
27 #define FOR_ALL_ON_OBJLIST(TYPE, VAR, LIST) \ 27 #define FOR_ALL_ON_OBJLIST(TYPE, VAR, LIST) \
28 for((VAR)=(TYPE)objlist_init_iter(LIST); \ 28 for((VAR)=(TYPE)objlist_init_iter(LIST); \
29 (VAR)!=NULL; \ 29 (VAR)!=NULL; \
30 (VAR)=(TYPE)objlist_iter()) 30 (VAR)=(TYPE)objlist_iter())
31 31
32 32
33 bool objlist_insert(ObjList **objlist, Obj *obj); 33 bool objlist_insert(ObjList **objlist, Obj *obj);
34 void objlist_remove(ObjList **objlist, Obj *obj); 34 void objlist_remove(ObjList **objlist, Obj *obj);
35 void objlist_clear(ObjList **objlist); 35 void objlist_clear(ObjList **objlist);

mercurial