Graphviz
2.41.20171026.1811
Main Page
Data Structures
Files
File List
Globals
lib
cdt
dtextract.c
Go to the documentation of this file.
1
#include "
dthdr.h
"
2
3
/* Extract objects of a dictionary.
4
**
5
** Written by Kiem-Phong Vo (5/25/96).
6
*/
7
8
Dtlink_t
*
dtextract
(
reg
Dt_t
* dt)
9
{
10
reg
Dtlink_t
*list, **
s
, **ends;
11
12
if
(dt->data->type&(
DT_OSET
|
DT_OBAG
) )
13
list = dt->data->here;
14
else
if
(dt->data->type&(
DT_SET
|
DT_BAG
))
15
{ list =
dtflatten
(dt);
16
for
(ends = (s = dt->data->htab) + dt->data->ntab; s < ends; ++s)
17
*s =
NIL
(
Dtlink_t
*);
18
}
19
else
/*if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE))*/
20
{ list = dt->data->head;
21
dt->data->head =
NIL
(
Dtlink_t
*);
22
}
23
24
dt->data->type &= ~
DT_FLATTEN
;
25
dt->data->size = 0;
26
dt->data->here =
NIL
(
Dtlink_t
*);
27
28
return
list;
29
}
dtextract
CDT_API Dtlink_t * dtextract(Dt_t *)
dtflatten
CDT_API Dtlink_t * dtflatten(Dt_t *)
Definition:
dtflatten.c:9
reg
#define reg
Definition:
dthdr.h:14
DT_SET
#define DT_SET
Definition:
cdt.h:125
DT_BAG
#define DT_BAG
Definition:
cdt.h:126
NIL
#define NIL(t)
Definition:
dthdr.h:13
DT_OSET
#define DT_OSET
Definition:
cdt.h:127
_dtlink_s
Definition:
cdt.h:44
s
Definition:
grammar.c:79
DT_OBAG
#define DT_OBAG
Definition:
cdt.h:128
dthdr.h
DT_FLATTEN
#define DT_FLATTEN
Definition:
dthdr.h:22
_dt_s
Definition:
cdt.h:99
Generated by
1.8.5