Graphviz 14.1.2~dev.20260121.0931
Loading...
Searching...
No Matches
dtwalk.c
Go to the documentation of this file.
1#include "config.h"
2
3#include <cdt/dthdr.h>
4
5/* Walk a dictionary and all dictionaries viewed through it.
6** userf: user function
7**
8** Written by Kiem-Phong Vo (5/25/96)
9*/
10
11int dtwalk(Dt_t *dt, int (*userf)(void *, void *), void *data) {
12 int rv;
13
14 for (void *obj = dtfirst(dt); obj;) {
15 void *const next = dtnext(dt, obj);
16 if ((rv = userf(obj, data)) < 0)
17 return rv;
18 obj = next;
19 }
20 return 0;
21}
#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:11
Definition cdt.h:98