Graphviz
2.41.20171026.1811
|
#include <stddef.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | _dtlink_s |
struct | _dthold_s |
struct | _dtmethod_s |
struct | _dtdata_s |
struct | _dtdisc_s |
struct | _dt_s |
struct | _dtstat_s |
Macros | |
#define | CDT_VERSION 20050420L |
#define | CDT_API extern |
#define | DTDISC(dc, ky, sz, lk, mkf, frf, cmpf, hshf, memf, evf) |
#define | DT_FOUND 0100000 |
#define | DT_SET 0000001 /* set with unique elements */ |
#define | DT_BAG 0000002 /* multiset */ |
#define | DT_OSET 0000004 /* ordered set (self-adjusting tree) */ |
#define | DT_OBAG 0000010 /* ordered multiset */ |
#define | DT_LIST 0000020 /* linked list */ |
#define | DT_STACK 0000040 /* stack: insert/delete at top */ |
#define | DT_QUEUE 0000100 /* queue: insert at top, delete at tail */ |
#define | DT_DEQUE 0000200 /* deque: insert at top, append at tail */ |
#define | DT_METHODS 0000377 /* all currently supported methods */ |
#define | DT_SAMECMP 0000001 /* compare methods equivalent */ |
#define | DT_SAMEHASH 0000002 /* hash methods equivalent */ |
#define | DT_INSERT 0000001 /* insert object if not found */ |
#define | DT_DELETE 0000002 /* delete object if found */ |
#define | DT_SEARCH 0000004 /* look for an object */ |
#define | DT_NEXT 0000010 /* look for next element */ |
#define | DT_PREV 0000020 /* find previous element */ |
#define | DT_RENEW 0000040 /* renewing an object */ |
#define | DT_CLEAR 0000100 /* clearing all objects */ |
#define | DT_FIRST 0000200 /* get first object */ |
#define | DT_LAST 0000400 /* get last object */ |
#define | DT_MATCH 0001000 /* find object matching key */ |
#define | DT_VSEARCH 0002000 /* search using internal representation */ |
#define | DT_ATTACH 0004000 /* attach an object to the dictionary */ |
#define | DT_DETACH 0010000 /* detach an object from the dictionary */ |
#define | DT_APPEND 0020000 /* used on Dtlist to append an object */ |
#define | DT_OPEN 1 /* a dictionary is being opened */ |
#define | DT_CLOSE 2 /* a dictionary is being closed */ |
#define | DT_DISC 3 /* discipline is about to be changed */ |
#define | DT_METH 4 /* method is about to be changed */ |
#define | DT_ENDOPEN 5 /* dtopen() is done */ |
#define | DT_ENDCLOSE 6 /* dtclose() is done */ |
#define | DT_HASHSIZE 7 /* setting hash table size */ |
#define | _DT(dt) ((Dt_t*)(dt)) |
#define | _DTDSC(dc, ky, sz, lk, cmpf) (ky = dc->key, sz = dc->size, lk = dc->link, cmpf = dc->comparf) |
#define | _DTLNK(o, lk) ((Dtlink_t*)((char*)(o) + lk) ) |
#define | _DTOBJ(e, lk) (lk < 0 ? ((Dthold_t*)(e))->obj : (void*)((char*)(e) - lk) ) |
#define | _DTKEY(o, ky, sz) (void*)(sz < 0 ? *((char**)((char*)(o)+ky)) : ((char*)(o)+ky)) |
#define | _DTCMP(dt, k1, k2, dc, cmpf, sz) |
#define | _DTHSH(dt, ky, dc, sz) (dc->hashf ? (*dc->hashf)(dt,ky,dc) : dtstrhash(0,ky,sz) ) |
#define | _DTMTCH(dt, key, action) |
#define | _DTSRCH(dt, obj, action) |
#define | DTTREEMATCH(dt, key, action) _DTMTCH(_DT(dt),(void*)(key),action) |
#define | DTTREESEARCH(dt, obj, action) _DTSRCH(_DT(dt),(void*)(obj),action) |
#define | dtvnext(d) (_DT(d)->view) |
#define | dtvcount(d) (_DT(d)->nview) |
#define | dtvhere(d) (_DT(d)->walk) |
#define | dtlink(d, e) (((Dtlink_t*)(e))->right) |
#define | dtobj(d, e) _DTOBJ((e), _DT(d)->disc->link) |
#define | dtfinger(d) (_DT(d)->data->here ? dtobj((d),_DT(d)->data->here):(void*)(0)) |
#define | dtfirst(d) (*(_DT(d)->searchf))((d),(void*)(0),DT_FIRST) |
#define | dtnext(d, o) (*(_DT(d)->searchf))((d),(void*)(o),DT_NEXT) |
#define | dtleast(d, o) (*(_DT(d)->searchf))((d),(void*)(o),DT_SEARCH|DT_NEXT) |
#define | dtlast(d) (*(_DT(d)->searchf))((d),(void*)(0),DT_LAST) |
#define | dtprev(d, o) (*(_DT(d)->searchf))((d),(void*)(o),DT_PREV) |
#define | dtmost(d, o) (*(_DT(d)->searchf))((d),(void*)(o),DT_SEARCH|DT_PREV) |
#define | dtsearch(d, o) (*(_DT(d)->searchf))((d),(void*)(o),DT_SEARCH) |
#define | dtmatch(d, o) (*(_DT(d)->searchf))((d),(void*)(o),DT_MATCH) |
#define | dtinsert(d, o) (*(_DT(d)->searchf))((d),(void*)(o),DT_INSERT) |
#define | dtappend(d, o) (*(_DT(d)->searchf))((d),(void*)(o),DT_INSERT|DT_APPEND) |
#define | dtdelete(d, o) (*(_DT(d)->searchf))((d),(void*)(o),DT_DELETE) |
#define | dtattach(d, o) (*(_DT(d)->searchf))((d),(void*)(o),DT_ATTACH) |
#define | dtdetach(d, o) (*(_DT(d)->searchf))((d),(void*)(o),DT_DETACH) |
#define | dtclear(d) (*(_DT(d)->searchf))((d),(void*)(0),DT_CLEAR) |
#define | dtfound(d) (_DT(d)->type & DT_FOUND) |
#define | DT_PRIME 17109811 /* 2#00000001 00000101 00010011 00110011 */ |
#define | dtcharhash(h, c) (((unsigned int)(h) + (unsigned int)(c)) * DT_PRIME ) |
Typedefs | |
typedef struct _dtlink_s | Dtlink_t |
typedef struct _dthold_s | Dthold_t |
typedef struct _dtdisc_s | Dtdisc_t |
typedef struct _dtmethod_s | Dtmethod_t |
typedef struct _dtdata_s | Dtdata_t |
typedef struct _dt_s | Dt_t |
typedef struct _dt_s | Dict_t |
typedef struct _dtstat_s | Dtstat_t |
typedef void *(* | Dtmemory_f )(Dt_t *, void *, size_t, Dtdisc_t *) |
typedef void *(* | Dtsearch_f )(Dt_t *, void *, int) |
typedef void *(* | Dtmake_f )(Dt_t *, void *, Dtdisc_t *) |
typedef void(* | Dtfree_f )(Dt_t *, void *, Dtdisc_t *) |
typedef int(* | Dtcompar_f )(Dt_t *, void *, void *, Dtdisc_t *) |
typedef unsigned int(* | Dthash_f )(Dt_t *, void *, Dtdisc_t *) |
typedef int(* | Dtevent_f )(Dt_t *, int, void *, Dtdisc_t *) |
Functions | |
CDT_API Dt_t * | dtopen (Dtdisc_t *, Dtmethod_t *) |
CDT_API int | dtclose (Dt_t *) |
CDT_API Dt_t * | dtview (Dt_t *, Dt_t *) |
CDT_API Dtdisc_t * | dtdisc (Dt_t *dt, Dtdisc_t *, int) |
CDT_API Dtmethod_t * | dtmethod (Dt_t *, Dtmethod_t *) |
CDT_API Dtlink_t * | dtflatten (Dt_t *) |
CDT_API Dtlink_t * | dtextract (Dt_t *) |
CDT_API int | dtrestore (Dt_t *, Dtlink_t *) |
CDT_API int | dtwalk (Dt_t *, int(*)(Dt_t *, void *, void *), void *) |
CDT_API void * | dtrenew (Dt_t *, void *) |
CDT_API int | dtsize (Dt_t *) |
CDT_API int | dtstat (Dt_t *, Dtstat_t *, int) |
CDT_API unsigned int | dtstrhash (unsigned int, void *, int) |
#define _DTCMP | ( | dt, | |
k1, | |||
k2, | |||
dc, | |||
cmpf, | |||
sz | |||
) |
#define _DTDSC | ( | dc, | |
ky, | |||
sz, | |||
lk, | |||
cmpf | |||
) | (ky = dc->key, sz = dc->size, lk = dc->link, cmpf = dc->comparf) |
#define _DTHSH | ( | dt, | |
ky, | |||
dc, | |||
sz | |||
) | (dc->hashf ? (*dc->hashf)(dt,ky,dc) : dtstrhash(0,ky,sz) ) |
Definition at line 214 of file cdt.h.
Referenced by dtdisc(), dtmethod(), and dtrenew().
#define _DTKEY | ( | o, | |
ky, | |||
sz | |||
) | (void*)(sz < 0 ? *((char**)((char*)(o)+ky)) : ((char*)(o)+ky)) |
Definition at line 209 of file cdt.h.
Referenced by dtdisc(), dtmethod(), and dtrenew().
#define _DTMTCH | ( | dt, | |
key, | |||
action | |||
) |
#define _DTOBJ | ( | e, | |
lk | |||
) | (lk < 0 ? ((Dthold_t*)(e))->obj : (void*)((char*)(e) - lk) ) |
Definition at line 208 of file cdt.h.
Referenced by dtdisc(), dtmethod(), and dtrenew().
#define _DTSRCH | ( | dt, | |
obj, | |||
action | |||
) |
#define DT_APPEND 0020000 /* used on Dtlist to append an object */ |
#define DT_ATTACH 0004000 /* attach an object to the dictionary */ |
#define DT_BAG 0000002 /* multiset */ |
Definition at line 126 of file cdt.h.
Referenced by dtdisc(), dtextract(), dtflatten(), dtmethod(), dtrestore(), and dtstat().
#define DT_CLEAR 0000100 /* clearing all objects */ |
#define DT_CLOSE 2 /* a dictionary is being closed */ |
#define DT_DEQUE 0000200 /* deque: insert at top, append at tail */ |
#define DT_DETACH 0010000 /* detach an object from the dictionary */ |
#define DT_DISC 3 /* discipline is about to be changed */ |
#define DT_ENDCLOSE 6 /* dtclose() is done */ |
#define DT_ENDOPEN 5 /* dtopen() is done */ |
#define DT_LIST 0000020 /* linked list */ |
Definition at line 129 of file cdt.h.
Referenced by dtdisc(), dtflatten(), dtmethod(), dtrenew(), and dtsize().
#define DT_METH 4 /* method is about to be changed */ |
Definition at line 159 of file cdt.h.
Referenced by dtmethod().
#define DT_METHODS 0000377 /* all currently supported methods */ |
Definition at line 133 of file cdt.h.
Referenced by dtmethod(), and dtstat().
#define DT_OBAG 0000010 /* ordered multiset */ |
Definition at line 128 of file cdt.h.
Referenced by dtextract(), dtmethod(), dtrenew(), dtrestore(), dtsize(), and dtstat().
#define DT_OPEN 1 /* a dictionary is being opened */ |
#define DT_OSET 0000004 /* ordered set (self-adjusting tree) */ |
Definition at line 127 of file cdt.h.
Referenced by dtextract(), dtmethod(), dtrenew(), dtrestore(), dtsize(), and dtstat().
#define DT_PRIME 17109811 /* 2#00000001 00000101 00010011 00110011 */ |
Definition at line 270 of file cdt.h.
Referenced by dtstrhash().
#define DT_QUEUE 0000100 /* queue: insert at top, delete at tail */ |
Definition at line 131 of file cdt.h.
Referenced by dtdisc(), dtflatten(), dtmethod(), dtrenew(), and dtsize().
#define DT_RENEW 0000040 /* renewing an object */ |
Definition at line 145 of file cdt.h.
Referenced by dtdisc(), dtmethod(), dtrenew(), and dtrestore().
#define DT_SAMECMP 0000001 /* compare methods equivalent */ |
#define DT_SAMEHASH 0000002 /* hash methods equivalent */ |
#define DT_SET 0000001 /* set with unique elements */ |
Definition at line 125 of file cdt.h.
Referenced by dtdisc(), dtextract(), dtflatten(), dtmethod(), dtrestore(), and dtstat().
#define DT_STACK 0000040 /* stack: insert/delete at top */ |
Definition at line 130 of file cdt.h.
Referenced by dtdisc(), dtflatten(), dtmethod(), dtrenew(), and dtsize().
#define DT_VSEARCH 0002000 /* search using internal representation */ |
Definition at line 267 of file cdt.h.
Referenced by clearGrid(), clearNodeset(), and clearPM().
Definition at line 264 of file cdt.h.
Referenced by agdelnodeimage(), agdelsubg(), agdtdelete(), aginternalmapdelete(), firstDeglist(), remove_edge(), removeDeglist(), and removeNodeset().
#define DTDISC | ( | dc, | |
ky, | |||
sz, | |||
lk, | |||
mkf, | |||
frf, | |||
cmpf, | |||
hshf, | |||
memf, | |||
evf | |||
) |
Definition at line 92 of file cdt.h.
Referenced by textfont_dict_open().
Definition at line 252 of file cdt.h.
Referenced by agnoderenew().
Definition at line 254 of file cdt.h.
Referenced by agfstin(), agfstnode(), agfstout(), agfstsubg(), aginternalmapclearlocalnames(), agnxtattr(), dtwalk(), epsf_define(), firstDeglist(), and printNodeset().
Definition at line 262 of file cdt.h.
Referenced by add_edge(), addGrid(), addIntSet(), addPS(), aginternalmapinsert(), agopen1(), agstrdup(), agstrdup_html(), agxset(), emit_once(), insertDeglist(), insertNodeset(), insertPM(), insertPS(), updatePM(), and xdotBB().
Definition at line 257 of file cdt.h.
Referenced by aglstnode().
Definition at line 250 of file cdt.h.
Referenced by main(), and pointsOf().
Definition at line 261 of file cdt.h.
Referenced by findCluster(), gvusershape_find(), and inIntSet().
Definition at line 255 of file cdt.h.
Referenced by aginternalmapclearlocalnames(), agnxtattr(), agnxtin(), agnxtnode(), agnxtout(), agnxtsubg(), dtwalk(), epsf_define(), and printNodeset().
Definition at line 258 of file cdt.h.
Referenced by agprvnode().
Definition at line 260 of file cdt.h.
Referenced by agdictsym(), agfindhidden(), agfindnode_by_id(), aginternalmaplookup(), agnodesetfinger(), agsubrep(), emit_once(), findGrid(), inPS(), isInPS(), and removeDeglist().
typedef struct _dtmethod_s Dtmethod_t |
Definition at line 22 of file dtdisc.c.
References _DTHSH, _DTKEY, _DTOBJ, _dt_s::data, _dt_s::disc, DT_BAG, DT_DISC, DT_FLATTEN, DT_LIST, DT_QUEUE, DT_RENEW, DT_SAMECMP, DT_SAMEHASH, DT_SET, DT_STACK, dtflatten(), _dtdata_s::here, _dtdisc_s::key, _dtdisc_s::link, _dtdisc_s::memoryf, _dt_s::memoryf, _dt_s::meth, NIL, _dtdata_s::ntab, reg, _dtmethod_s::searchf, _dtdata_s::size, _dtdisc_s::size, _dtdata_s::type, and UNFLATTEN.
Referenced by agdtclose(), agdtdisc(), and dtopen().
Referenced by agfstin(), agfstout(), agnxtin(), and agnxtout().
Definition at line 9 of file dtflatten.c.
References _dt_s::data, DT_BAG, DT_FLATTEN, DT_LIST, DT_QUEUE, DT_SET, DT_STACK, _dtdata_s::here, NIL, _dtdata_s::ntab, reg, RROTATE, and _dtdata_s::type.
Referenced by dtdisc(), dtextract(), dtmethod(), main(), and pointsOf().
CDT_API Dtmethod_t* dtmethod | ( | Dt_t * | , |
Dtmethod_t * | |||
) |
Definition at line 8 of file dtmethod.c.
References _DTHSH, _DTKEY, _DTOBJ, _dt_s::data, _dt_s::disc, DT_BAG, DT_FLATTEN, DT_LIST, DT_METH, DT_METHODS, DT_OBAG, DT_OSET, DT_QUEUE, DT_RENEW, DT_SET, DT_STACK, dtflatten(), _dtdata_s::here, _dtdata_s::loop, _dt_s::memoryf, _dt_s::meth, _dtdata_s::minp, NIL, _dtdata_s::ntab, reg, _dtmethod_s::searchf, _dt_s::searchf, _dtdata_s::size, _dtmethod_s::type, and _dtdata_s::type.
Referenced by agflatten().
CDT_API Dt_t* dtopen | ( | Dtdisc_t * | , |
Dtmethod_t * | |||
) |
Definition at line 9 of file dtopen.c.
References _dt_s::data, _dt_s::disc, DT_ENDOPEN, DT_MALLOC, DT_MEMORYF, DT_OPEN, dtdisc(), _dtdisc_s::eventf, _dtdata_s::here, _dtdata_s::loop, _dtdisc_s::memoryf, _dt_s::memoryf, _dt_s::meth, _dtdata_s::minp, NIL, _dtdata_s::ntab, _dt_s::nview, reg, _dtmethod_s::searchf, _dt_s::searchf, _dtdata_s::size, _dtmethod_s::type, _dtdata_s::type, _dt_s::type, _dt_s::user, Version, _dt_s::view, and _dt_s::walk.
Referenced by agdtopen(), emit_once(), init_edgelist(), mkClustMap(), mkDeglist(), mkGrid(), mkNodeset(), newPM(), newPS(), openIntSet(), parseHTML(), processClusterEdges(), splineEdges(), switch(), and textfont_dict_open().
Referenced by agnoderenew().
Referenced by agfstin(), agfstout(), agnxtin(), and agnxtout().
Definition at line 12 of file dtsize.c.
References _dt_s::data, DT_LIST, DT_OBAG, DT_OSET, DT_QUEUE, DT_STACK, _dtdata_s::here, reg, _dtdata_s::size, _dtdata_s::type, and UNFLATTEN.
Referenced by agclose(), agnnodes(), agnsubg(), dtclose(), dtstat(), main(), pointsOf(), size_edgelist(), sizeNodeset(), and sizeOf().
CDT_API Dtmethod_t _Dthash |
CDT_API Dtmethod_t _Dtlist |
CDT_API Dtmethod_t _Dtqueue |
CDT_API Dtmethod_t _Dtstack |
CDT_API Dtmethod_t _Dttree |
CDT_API Dtmethod_t* Dtbag |
CDT_API Dtmethod_t* Dtdeque |
CDT_API Dtmethod_t* Dthash |
CDT_API Dtmethod_t* Dtlist |
Definition at line 168 of file cdt.h.
Referenced by agflatten().
CDT_API Dtmethod_t* Dtobag |
CDT_API Dtmethod_t* Dtorder |
CDT_API Dtmethod_t* Dtoset |
Definition at line 166 of file cdt.h.
Referenced by agflatten(), emit_once(), init_edgelist(), mkClustMap(), mkDeglist(), mkGrid(), mkNodeset(), newPM(), newPS(), openIntSet(), processClusterEdges(), splineEdges(), and textfont_dict_open().
CDT_API Dtmethod_t* Dtqueue |
Definition at line 170 of file cdt.h.
Referenced by parseHTML(), and switch().
CDT_API Dtmethod_t* Dtset |
CDT_API Dtmethod_t* Dtstack |
CDT_API Dtmethod_t* Dttree |
Definition at line 176 of file cdt.h.
Referenced by aginternalmapinsert(), and agopen1().