2
This software may only be used by you under license from AT&T Corp.
3
("AT&T"). A copy of AT&T's Source Code Agreement is available at
4
AT&T's Internet website having the URL:
5
<http://www.research.att.com/sw/tools/graphviz/license/source.html>
6
If you received this software without first entering into a license
7
with AT&T, you have an infringing copy of this software and cannot use
8
it without violating AT&T's intellectual property rights.
16
static char* Version = "\n@(#)cdt (AT&T Labs - kpv) 1999-11-01\0\n";
18
/* Make a new dictionary
20
** Written by Kiem-Phong Vo (5/25/96)
24
Dt_t* dtopen(Dtdisc_t* disc, Dtmethod_t* meth)
26
Dt_t* dtopen(disc, meth)
31
Dt_t* dt = (Dt_t*)Version; /* shut-up unuse warning */
38
/* allocate space for dictionary */
39
if(!(dt = (Dt_t*) malloc(sizeof(Dt_t))))
42
/* initialize all absolutely private data */
43
dt->searchf = NIL(Dtsearch_f);
44
dt->meth = NIL(Dtmethod_t*);
45
dt->disc = NIL(Dtdisc_t*);
48
dt->view = dt->walk = NIL(Dt_t*);
51
{ /* if shared/persistent dictionary, get existing data */
52
data = NIL(Dtdata_t*);
53
if((e = (*disc->eventf)(dt,DT_OPEN,(Void_t*)(&data),disc)) != 0)
54
{ if(e < 0 || !data || !(data->type&meth->type) )
62
/* allocate sharable data */
63
data = (Dtdata_t*)(dt->memoryf)(dt,NIL(Void_t*),sizeof(Dtdata_t),disc);
68
data->type = meth->type;
69
data->here = NIL(Dtlink_t*);
70
data->htab = NIL(Dtlink_t**);
71
data->ntab = data->size = data->loop = 0;
75
dt->searchf = meth->searchf;
84
* some dll implementations forget that data symbols
85
* need address resolution too
89
int _dt_dynamic_data(void)
91
int _dt_dynamic_data()
94
return (Dtset != 0) + (Dtlist != 0) + (Dttree != 0);