Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
dtwalk.c
Go to the documentation of this file.
1#include <cdt/dthdr.h>
2
3/* Walk a dictionary and all dictionaries viewed through it.
4** userf: user function
5**
6** Written by Kiem-Phong Vo (5/25/96)
7*/
8
9int dtwalk(Dt_t *dt, int (*userf)(void*, void*), void *data) {
10 void *obj, *next;
11 Dt_t* walk;
12 int rv;
13
14 for(obj = dtfirst(dt); obj; )
15 { if(!(walk = dt->walk) )
16 walk = dt;
17 next = dtnext(dt,obj);
18 if ((rv = userf(obj, data)) < 0)
19 return rv;
20 obj = next;
21 }
22 return 0;
23}
#define dtnext(d, o)
Definition cdt.h:180
#define dtfirst(d)
Definition cdt.h:179
int dtwalk(Dt_t *dt, int(*userf)(void *, void *), void *data)
Definition dtwalk.c:9
Definition legal.c:50
Definition cdt.h:100
Dt_t * walk
Definition cdt.h:106