Graphviz 14.0.5~dev.20251117.1017
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 int rv;
11
12 for (void *obj = dtfirst(dt); obj;) {
13 void *const next = dtnext(dt, obj);
14 if ((rv = userf(obj, data)) < 0)
15 return rv;
16 obj = next;
17 }
18 return 0;
19}
#define dtnext(d, o)
Definition cdt.h:181
#define dtfirst(d)
Definition cdt.h:180
int dtwalk(Dt_t *dt, int(*userf)(void *, void *), void *data)
Definition dtwalk.c:9
Definition cdt.h:98