Graphviz
2.41.20171026.1811
Main Page
Data Structures
Files
File List
Globals
lib
cdt
dtwalk.c
Go to the documentation of this file.
1
#include "
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
(
reg
Dt_t
* dt,
int
(*userf)(
Dt_t
*,
void
*,
void
*),
void
*
data
)
10
{
11
reg
void
*obj, *next;
12
reg
Dt_t
* walk;
13
reg
int
rv;
14
15
for
(obj =
dtfirst
(dt); obj; )
16
{
if
(!(walk = dt->walk) )
17
walk = dt;
18
next =
dtnext
(dt,obj);
19
if
((rv = (*userf)(walk, obj, data )) < 0)
20
return
rv;
21
obj = next;
22
}
23
return
0;
24
}
reg
#define reg
Definition:
dthdr.h:14
dtfirst
#define dtfirst(d)
Definition:
cdt.h:254
dtnext
#define dtnext(d, o)
Definition:
cdt.h:255
dtwalk
CDT_API int dtwalk(Dt_t *, int(*)(Dt_t *, void *, void *), void *)
dthdr.h
_dt_s
Definition:
cdt.h:99
data
Definition:
legal.c:60
Generated by
1.8.5