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
9
int
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
}
dtnext
#define dtnext(d, o)
Definition
cdt.h:180
dtfirst
#define dtfirst(d)
Definition
cdt.h:179
dthdr.h
dtwalk
int dtwalk(Dt_t *dt, int(*userf)(void *, void *), void *data)
Definition
dtwalk.c:9
data
Definition
legal.c:50
dt_s_
Definition
cdt.h:100
dt_s_::walk
Dt_t * walk
Definition
cdt.h:106
lib
cdt
dtwalk.c
Generated by
1.9.8