Graphviz  2.41.20170921.2350
Macros | Typedefs | Functions | Variables
cghdr.h File Reference
#include "config.h"
#include <cgraph.h>
#include <ctype.h>
#include <sys/types.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
Include dependency graph for cghdr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _BLD_cgraph   1
 
#define EXTERN   extern
 
#define CGHDR_API   extern
 
#define assert(x)
 
#define streq(s, t)   ((*s == *t) && !strcmp((s),(t)))
 
#define NOTUSED(var)   (void) var
 
#define NILgraph   NIL(Agraph_t*)
 
#define NILnode   NIL(Agnode_t*)
 
#define NILedge   NIL(Agedge_t*)
 
#define NILsym   NIL(Agsym_t*)
 
#define NILstr   NIL(char*)
 
#define SUCCESS   0
 
#define FAILURE   -1
 
#define LOCALNAMEPREFIX   '%'
 
#define AGDISC(g, d)   ((g)->clos->disc.d)
 
#define AGCLOS(g, d)   ((g)->clos->state.d)
 
#define AGNEW(g, t)   ((t*)(agalloc(g,sizeof(t))))
 
#define ISALNUM(c)   ((isalnum(c)) || ((c) == '_') || (!isascii(c)))
 
#define CB_INITIALIZE   100
 
#define CB_UPDATE   101
 
#define CB_DELETION   102
 

Typedefs

typedef Agobj_t *(* agobjsearchfn_t )(Agraph_t *g, Agobj_t *obj)
 

Functions

CGHDR_API int agapply (Agraph_t *g, Agobj_t *obj, agobjfn_t fn, void *arg, int preorder)
 
Agraph_tagopen1 (Agraph_t *g)
 
int agstrclose (Agraph_t *g)
 
void agmarkhtmlstr (char *s)
 
Agnode_tagfindnode_by_id (Agraph_t *g, IDTYPE id)
 
Dtcompar_f agdictorder (Agraph_t *, Dict_t *, Dtcompar_f)
 
int agedgecmpf (Dict_t *d, void *arg_e0, void *arg_e1, Dtdisc_t *disc)
 
int agnamecmpf (Dict_t *d, void *, void *, Dtdisc_t *disc)
 
void agset_node_disc (Agraph_t *g, Dtdisc_t *disc)
 
uint64_t agnextseq (Agraph_t *g, int objtype)
 
Dict_tagdtopen (Agraph_t *g, Dtdisc_t *disc, Dtmethod_t *method)
 
void agdtdisc (Agraph_t *g, Dict_t *dict, Dtdisc_t *disc)
 
long agdtdelete (Agraph_t *g, Dict_t *dict, void *obj)
 
int agdtclose (Agraph_t *g, Dict_t *dict)
 
void * agdictobjmem (Dict_t *dict, void *p, size_t size, Dtdisc_t *disc)
 
void agdictobjfree (Dict_t *dict, void *p, Dtdisc_t *disc)
 
CGHDR_API Agdatadict_tagdatadict (Agraph_t *g, int cflag)
 
CGHDR_API Agattr_tagattrrec (void *obj)
 
void agraphattr_init (Agraph_t *g)
 
int agraphattr_delete (Agraph_t *g)
 
void agnodeattr_init (Agraph_t *g, Agnode_t *n)
 
void agnodeattr_delete (Agnode_t *n)
 
void agedgeattr_init (Agraph_t *g, Agedge_t *e)
 
void agedgeattr_delete (Agedge_t *e)
 
int aagparse (void)
 
void aglexinit (Agdisc_t *disc, void *ifile)
 
int aaglex (void)
 
void aglexeof (void)
 
void aglexbad (void)
 
int agmapnametoid (Agraph_t *g, int objtype, char *str, IDTYPE *result, int allocflag)
 
int agallocid (Agraph_t *g, int objtype, IDTYPE request)
 
void agfreeid (Agraph_t *g, int objtype, IDTYPE id)
 
char * agprintid (Agobj_t *obj)
 
int aginternalmaplookup (Agraph_t *g, int objtype, char *str, IDTYPE *result)
 
void aginternalmapinsert (Agraph_t *g, int objtype, char *str, IDTYPE result)
 
char * aginternalmapprint (Agraph_t *g, int objtype, IDTYPE id)
 
int aginternalmapdelete (Agraph_t *g, int objtype, IDTYPE id)
 
void aginternalmapclose (Agraph_t *g)
 
void agregister (Agraph_t *g, int objtype, void *obj)
 
void agedgesetop (Agraph_t *g, Agedge_t *e, int insertion)
 
void agdelnodeimage (Agraph_t *g, Agnode_t *node, void *ignored)
 
void agdeledgeimage (Agraph_t *g, Agedge_t *edge, void *ignored)
 
void * agrebind0 (Agraph_t *g, void *obj)
 
CGHDR_API int agrename (Agobj_t *obj, char *newname)
 
void agrecclose (Agobj_t *obj)
 
void agmethod_init (Agraph_t *g, void *obj)
 
void agmethod_upd (Agraph_t *g, void *obj, Agsym_t *sym)
 
void agmethod_delete (Agraph_t *g, void *obj)
 
void agsyspushdisc (Agraph_t *g, Agcbdisc_t *cb, void *state, int stack)
 
int agsyspopdisc (Agraph_t *g, Agcbdisc_t *cb, int stack)
 
void agrecord_callback (Agraph_t *g, Agobj_t *obj, int kind, Agsym_t *optsym)
 
void aginitcb (Agraph_t *g, void *obj, Agcbstack_t *disc)
 
void agupdcb (Agraph_t *g, void *obj, Agsym_t *sym, Agcbstack_t *disc)
 
void agdelcb (Agraph_t *g, void *obj, Agcbstack_t *disc)
 

Variables

EXTERN Agraph_tAg_G_global
 
char * AgDataRecName
 
Dtdisc_t Ag_subnode_id_disc
 
Dtdisc_t Ag_subnode_seq_disc
 
Dtdisc_t Ag_mainedge_id_disc
 
Dtdisc_t Ag_subedge_id_disc
 
Dtdisc_t Ag_mainedge_seq_disc
 
Dtdisc_t Ag_subedge_seq_disc
 
Dtdisc_t Ag_subgraph_id_disc
 
Agcbdisc_t AgAttrdisc
 

Macro Definition Documentation

#define _BLD_cgraph   1

Definition at line 16 of file cghdr.h.

#define AGCLOS (   g,
 
)    ((g)->clos->state.d)
#define AGDISC (   g,
 
)    ((g)->clos->disc.d)
#define AGNEW (   g,
 
)    ((t*)(agalloc(g,sizeof(t))))

Definition at line 68 of file cghdr.h.

Referenced by aginternalmapinsert(), and agpushdisc().

#define assert (   x)

Definition at line 47 of file cghdr.h.

Referenced by agclose(), agdeledgeimage(), agedgeseqcmpf(), agnode(), agrecord_callback(), agxget(), agxset(), attached_clustering(), average_edge_length(), beginpath(), BinaryHeap_extract_item(), BinaryHeap_insert(), BinaryHeap_sanity_check(), buffstderr(), build_ranks(), delete_fast_edge(), delete_fast_node(), delete_flat_edge(), DistanceMatrix_restrict_cluster(), DistanceMatrix_restrict_filtering(), DistanceMatrix_restrict_matching(), dot_position(), endpath(), fast_edge(), fast_node(), fast_nodeapp(), findCComp(), getPackInfo(), gvfwrite(), gvloadimage(), gvrender_usershape(), gvusershape_file_access(), gvusershape_find(), html_path(), ideal_distance_matrix(), Import_coord_clusters_from_dot(), insertNodelist(), install_in_rank(), irand(), jacobi(), make_label(), makeSelfEdge(), mapClust(), merge_chain(), merge_oneway(), modularity_clustering(), mq_clustering(), Multilevel_coarsen(), Multilevel_MQ_Clustering_establish(), Multilevel_MQ_Clustering_init(), neato_enqueue(), oned_optimizer_train(), Operator_diag_precon_new(), Operator_uniform_stress_diag_precon_new(), parsePackModeInfo(), pcp_rotate(), Pobspath(), pop_obj_state(), Ppolybarriers(), PriorityQueue_push(), QuadTree_new(), rec_reset_vlists(), removeDeglist(), round_corners(), SparseMatrix_add(), SparseMatrix_complement(), SparseMatrix_coordinate_form_add_entries(), SparseMatrix_delete_sparse_columns(), SparseMatrix_distance_matrix(), SparseMatrix_distance_matrix_k_centers(), SparseMatrix_distance_matrix_khops(), SparseMatrix_divide_row_by_degree(), SparseMatrix_export(), SparseMatrix_from_coordinate_format(), SparseMatrix_from_coordinate_format_not_compacted(), SparseMatrix_get_augmented(), SparseMatrix_import_dot(), SparseMatrix_is_symmetric(), SparseMatrix_k_centers(), SparseMatrix_k_centers_user(), SparseMatrix_level_sets_internal(), SparseMatrix_multiply(), SparseMatrix_multiply3(), SparseMatrix_multiply_by_scaler(), SparseMatrix_multiply_vector(), SparseMatrix_page_rank(), SparseMatrix_print(), SparseMatrix_print_coord(), SparseMatrix_print_csr(), SparseMatrix_pseudo_diameter_unweighted(), SparseMatrix_pseudo_diameter_weighted(), SparseMatrix_scaled_by_vector(), SparseMatrix_solve(), SparseMatrix_sum_repeat_entries(), SparseMatrix_to_square_matrix(), SparseMatrix_transpose(), SparseStressMajorizationSmoother_new(), spline_at_y(), spring_electrical_embedding(), spring_electrical_embedding_fast(), spring_electrical_embedding_slow(), spring_electrical_spring_embedding(), spring_maxent_embedding(), SpringSmoother_new(), SpringSmoother_smooth(), stackPop(), StressMajorizationSmoother2_new(), StressMajorizationSmoother_smooth(), textspan_size(), TriangleSmoother_new(), UF_remove(), UF_setname(), unbuffstderr(), undoClusterEdges(), uniform_stress(), UniformStressSmoother_new(), vector_float_take(), and vector_take().

#define CB_DELETION   102

Definition at line 162 of file cghdr.h.

Referenced by agmethod_delete(), and agrecord_callback().

#define CB_INITIALIZE   100

Definition at line 160 of file cghdr.h.

Referenced by agmethod_init(), and agrecord_callback().

#define CB_UPDATE   101

Definition at line 161 of file cghdr.h.

Referenced by agmethod_upd(), and agrecord_callback().

#define CGHDR_API   extern

Definition at line 29 of file cghdr.h.

#define EXTERN   extern

Definition at line 19 of file cghdr.h.

#define FAILURE   -1
#define ISALNUM (   c)    ((isalnum(c)) || ((c) == '_') || (!isascii(c)))

Definition at line 70 of file cghdr.h.

#define LOCALNAMEPREFIX   '%'

Definition at line 64 of file cghdr.h.

Referenced by aginternalmapclearlocalnames(), agmapnametoid(), and agnameof().

#define NILedge   NIL(Agedge_t*)
#define NILgraph   NIL(Agraph_t*)

Definition at line 56 of file cghdr.h.

Referenced by agclose(), agcmpgraph_of(), agconcat(), aghide(), agidsubg(), agraphof(), agread(), agroot(), and agsubg().

#define NILnode   NIL(Agnode_t*)
#define NILstr   NIL(char*)

Definition at line 60 of file cghdr.h.

Referenced by agedge(), aginternalmapprint(), and agmapnametoid().

#define NILsym   NIL(Agsym_t*)

Definition at line 59 of file cghdr.h.

Referenced by agattrsym(), agget(), agmethod_delete(), agmethod_init(), and agset().

#define NOTUSED (   var)    (void) var
#define streq (   s,
 
)    ((*s == *t) && !strcmp((s),(t)))
#define SUCCESS   0

Typedef Documentation

typedef Agobj_t*(* agobjsearchfn_t)(Agraph_t *g, Agobj_t *obj)

Definition at line 73 of file cghdr.h.

Function Documentation

int aaglex ( void  )
int aagparse ( void  )

Referenced by agconcat().

int agallocid ( Agraph_t g,
int  objtype,
IDTYPE  request 
)

Definition at line 126 of file id.c.

References AGCLOS, and AGDISC.

Referenced by agidedge(), agidnode(), and agidsubg().

CGHDR_API int agapply ( Agraph_t g,
Agobj_t obj,
agobjfn_t  fn,
void *  arg,
int  preorder 
)
CGHDR_API Agattr_t* agattrrec ( void *  obj)
CGHDR_API Agdatadict_t* agdatadict ( Agraph_t g,
int  cflag 
)

Definition at line 41 of file attr.c.

References aggetrec(), and FALSE.

Referenced by agdictof(), agraphattr_delete(), and agxset().

void agdelcb ( Agraph_t g,
void *  obj,
Agcbstack_t disc 
)
void agdeledgeimage ( Agraph_t g,
Agedge_t edge,
void *  ignored 
)
void agdelnodeimage ( Agraph_t g,
Agnode_t node,
void *  ignored 
)
void agdictobjfree ( Dict_t dict,
void *  p,
Dtdisc_t disc 
)

Definition at line 40 of file utils.c.

References agfree(), and NOTUSED.

void* agdictobjmem ( Dict_t dict,
void *  p,
size_t  size,
Dtdisc_t disc 
)

Definition at line 19 of file utils.c.

References agalloc(), agfree(), NIL, and NOTUSED.

Referenced by agdtclose(), and agdtopen().

Dtcompar_f agdictorder ( Agraph_t ,
Dict_t ,
Dtcompar_f   
)
int agdtclose ( Agraph_t g,
Dict_t dict 
)

Definition at line 79 of file utils.c.

References agdictobjmem(), dtclose(), dtdisc(), _dtdisc_s::memoryf, and NIL.

Referenced by agclose(), agraphattr_delete(), and agstrclose().

long agdtdelete ( Agraph_t g,
Dict_t dict,
void *  obj 
)

Definition at line 67 of file utils.c.

References dtdelete.

Referenced by agstrfree().

void agdtdisc ( Agraph_t g,
Dict_t dict,
Dtdisc_t disc 
)

Definition at line 95 of file utils.c.

References dtdisc(), and NIL.

Dict_t* agdtopen ( Agraph_t g,
Dtdisc_t disc,
Dtmethod_t method 
)

Definition at line 53 of file utils.c.

References agdictobjmem(), dtopen(), _dtdisc_s::memoryf, and NIL.

Referenced by aginternalmapinsert(), and agopen1().

void agedgeattr_delete ( Agedge_t e)

Definition at line 418 of file attr.c.

References agattrrec(), and agdelrec().

Referenced by agdeledge().

void agedgeattr_init ( Agraph_t g,
Agedge_t e 
)

Definition at line 409 of file attr.c.

References agattrrec(), and Agattr_s::dict.

int agedgecmpf ( Dict_t d,
void *  arg_e0,
void *  arg_e1,
Dtdisc_t disc 
)
void agedgesetop ( Agraph_t g,
Agedge_t e,
int  insertion 
)
Agnode_t* agfindnode_by_id ( Agraph_t g,
IDTYPE  id 
)
void agfreeid ( Agraph_t g,
int  objtype,
IDTYPE  id 
)

Definition at line 131 of file id.c.

References AGCLOS, AGDISC, and aginternalmapdelete().

Referenced by agclose(), agdeledge(), agdelnode(), agrelabel_node(), and agrename().

void aginitcb ( Agraph_t g,
void *  obj,
Agcbstack_t disc 
)
void aginternalmapclose ( Agraph_t g)

Definition at line 214 of file imap.c.

References Ag_G_global, Agraph_s::clos, Agclos_s::lookup_by_id, and Agclos_s::lookup_by_name.

Referenced by agclose().

int aginternalmapdelete ( Agraph_t g,
int  objtype,
IDTYPE  id 
)
void aginternalmapinsert ( Agraph_t g,
int  objtype,
char *  str,
IDTYPE  result 
)
int aginternalmaplookup ( Agraph_t g,
int  objtype,
char *  str,
IDTYPE result 
)

Definition at line 95 of file imap.c.

References AGEDGE, AGINEDGE, agstrbind(), Agraph_s::clos, dtsearch, FALSE, IMapEntry_s::id, Agclos_s::lookup_by_name, and TRUE.

Referenced by agmapnametoid().

char* aginternalmapprint ( Agraph_t g,
int  objtype,
IDTYPE  id 
)

Definition at line 155 of file imap.c.

References NILstr, and IMapEntry_s::str.

Referenced by agnameof().

void aglexbad ( void  )

Definition at line 2231 of file scan.c.

References YY_FLUSH_BUFFER.

Referenced by agconcat().

void aglexeof ( void  )

Definition at line 2229 of file scan.c.

References GRAPH_EOF_TOKEN, and unput.

void aglexinit ( Agdisc_t disc,
void *  ifile 
)

Definition at line 579 of file scan.c.

Referenced by agconcat().

int agmapnametoid ( Agraph_t g,
int  objtype,
char *  str,
IDTYPE result,
int  allocflag 
)
void agmarkhtmlstr ( char *  s)

Definition at line 188 of file refstr.c.

References NULL, and refstr_t::refcnt.

Referenced by agcopyattr().

void agmethod_delete ( Agraph_t g,
void *  obj 
)
void agmethod_init ( Agraph_t g,
void *  obj 
)
void agmethod_upd ( Agraph_t g,
void *  obj,
Agsym_t sym 
)

Definition at line 107 of file obj.c.

References agrecord_callback(), agupdcb(), Agclos_s::callbacks_enabled, Agclos_s::cb, CB_UPDATE, and Agraph_s::clos.

Referenced by agxset().

int agnamecmpf ( Dict_t d,
void *  ,
void *  ,
Dtdisc_t disc 
)
uint64_t agnextseq ( Agraph_t g,
int  objtype 
)

Definition at line 157 of file graph.c.

References Agraph_s::clos, and Agclos_s::seq.

Referenced by agidnode(), agnode(), and agopen1().

void agnodeattr_delete ( Agnode_t n)

Definition at line 399 of file attr.c.

References agattrrec(), and agdelrec().

Referenced by agdelnode().

void agnodeattr_init ( Agraph_t g,
Agnode_t n 
)

Definition at line 390 of file attr.c.

References agattrrec(), and Agattr_s::dict.

Agraph_t* agopen1 ( Agraph_t g)
char* agprintid ( Agobj_t obj)
int agraphattr_delete ( Agraph_t g)
void agraphattr_init ( Agraph_t g)

Definition at line 357 of file attr.c.

References agparent(), Agraph_s::desc, and Agdesc_s::has_attrs.

Referenced by agopen1().

void* agrebind0 ( Agraph_t g,
void *  obj 
)
void agrecclose ( Agobj_t obj)

Definition at line 263 of file rec.c.

References agfree(), agraphof(), agstrfree(), Agobj_s::data, Agrec_s::name, Agrec_s::next, and NIL.

Referenced by agclose(), agdeledge(), and agdelnode().

void agrecord_callback ( Agraph_t g,
Agobj_t obj,
int  kind,
Agsym_t optsym 
)

Definition at line 193 of file pend.c.

References agbindrec(), agerr(), AGERR, assert, CB_DELETION, CB_INITIALIZE, CB_UPDATE, and FALSE.

Referenced by agmethod_delete(), agmethod_init(), and agmethod_upd().

void agregister ( Agraph_t g,
int  objtype,
void *  obj 
)

Definition at line 169 of file id.c.

References AGCLOS, and AGDISC.

Referenced by agedge(), agnode(), agopen(), and agsubg().

CGHDR_API int agrename ( Agobj_t obj,
char *  newname 
)
void agset_node_disc ( Agraph_t g,
Dtdisc_t disc 
)
int agstrclose ( Agraph_t g)

Definition at line 69 of file refstr.c.

References agdtclose().

Referenced by agclose().

int agsyspopdisc ( Agraph_t g,
Agcbdisc_t cb,
int  stack 
)
void agsyspushdisc ( Agraph_t g,
Agcbdisc_t cb,
void *  state,
int  stack 
)
void agupdcb ( Agraph_t g,
void *  obj,
Agsym_t sym,
Agcbstack_t disc 
)

Variable Documentation

EXTERN Agraph_t* Ag_G_global
Dtdisc_t Ag_mainedge_id_disc

Definition at line 472 of file edge.c.

Referenced by agopen1().

Dtdisc_t Ag_mainedge_seq_disc

Definition at line 447 of file edge.c.

Referenced by agopen1().

Dtdisc_t Ag_subedge_id_disc

Definition at line 484 of file edge.c.

Referenced by agopen1().

Dtdisc_t Ag_subedge_seq_disc

Definition at line 459 of file edge.c.

Referenced by agopen1().

Dtdisc_t Ag_subgraph_id_disc

Definition at line 262 of file graph.c.

Referenced by agopen1().

Dtdisc_t Ag_subnode_id_disc

Definition at line 314 of file node.c.

Referenced by agopen1().

Dtdisc_t Ag_subnode_seq_disc

Definition at line 326 of file node.c.

Referenced by agopen1().

Agcbdisc_t AgAttrdisc
char* AgDataRecName

Definition at line 169 of file attr.c.