3 ALLOCATOR(tracker
, "trackers");
5 void add_tracker(struct tracker_list
**list
, const char *name
, int owner
,
10 if (in_tracker_list(*list
, name
, owner
, sym
))
13 tmp
= __alloc_tracker(0);
14 tmp
->name
= alloc_string(name
);
17 add_ptr_list(list
, tmp
);
20 void del_tracker(struct tracker_list
**list
, const char *name
, int owner
,
25 FOR_EACH_PTR(*list
, tmp
) {
26 if (tmp
->owner
== owner
&& tmp
->sym
== sym
27 && !strcmp(tmp
->name
, name
)) {
28 DELETE_CURRENT_PTR(tmp
);
32 } END_FOR_EACH_PTR(tmp
);
35 int in_tracker_list(struct tracker_list
*list
, const char *name
, int owner
,
40 FOR_EACH_PTR(list
, tmp
) {
41 if (tmp
->owner
== owner
&& tmp
->sym
== sym
42 && !strcmp(tmp
->name
, name
))
44 } END_FOR_EACH_PTR(tmp
);
48 void free_tracker_list(struct tracker_list
**list
)
50 __free_ptr_list((struct ptr_list
**)list
);
53 void free_trackers_and_list(struct tracker_list
**list
)
57 FOR_EACH_PTR(*list
, tmp
) {
58 free_string(tmp
->name
);
60 } END_FOR_EACH_PTR(tmp
);
61 free_tracker_list(list
);