Graphviz
2.41.20171026.1811
|
#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>
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) |
#define AGCLOS | ( | g, | |
d | |||
) | ((g)->clos->state.d) |
Definition at line 67 of file cghdr.h.
Referenced by agalloc(), agallocid(), agclose(), agfree(), agfreeid(), agheap(), agmapnametoid(), agnameof(), agrealloc(), and agregister().
#define AGDISC | ( | g, | |
d | |||
) | ((g)->clos->disc.d) |
Definition at line 66 of file cghdr.h.
Referenced by agalloc(), agallocid(), agclose(), agfree(), agfreeid(), agmapnametoid(), agnameof(), agrealloc(), agregister(), and agwrite().
#define AGNEW | ( | g, | |
t | |||
) | ((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 FAILURE -1 |
Definition at line 63 of file cghdr.h.
Referenced by agapply(), agassociate(), agclose(), agdeledge(), agdelete(), agdelnode(), agdelrec(), agexpose(), aghide(), agnodebefore(), agpopdisc(), agrelabel_node(), agrename(), agset(), agsplice(), and agstrfree().
#define ISALNUM | ( | c | ) | ((isalnum(c)) || ((c) == '_') || (!isascii(c))) |
#define LOCALNAMEPREFIX '%' |
Definition at line 64 of file cghdr.h.
Referenced by aginternalmapclearlocalnames(), agmapnametoid(), and agnameof().
Definition at line 58 of file cghdr.h.
Referenced by agdeledge(), agedge(), agfstedge(), agfstin(), agfstout(), agidedge(), agnxtedge(), agnxtin(), agnxtout(), agsplice(), and agsubedge().
Definition at line 56 of file cghdr.h.
Referenced by agclose(), agcmpgraph_of(), agconcat(), aghide(), agidsubg(), agraphof(), agread(), agroot(), and agsubg().
Definition at line 57 of file cghdr.h.
Referenced by agcmpnode(), agcmpnode_of(), agdelnode(), agfindhidden(), agfindnode_by_id(), agfindnode_by_name(), agfstnode(), agidnode(), aglstnode(), agnode(), agnxtnode(), agprvnode(), agrelabel_node(), and agsubnode().
#define NILstr NIL(char*) |
Definition at line 60 of file cghdr.h.
Referenced by agedge(), aginternalmapprint(), and agmapnametoid().
Definition at line 59 of file cghdr.h.
Referenced by agattrsym(), agget(), agmethod_delete(), agmethod_init(), and agset().
#define NOTUSED | ( | var | ) | (void) var |
Definition at line 54 of file cghdr.h.
Referenced by agdeledgeimage(), agdelnodeimage(), agdictobjfree(), agdictobjmem(), agedgeidcmpf(), agedgeseqcmpf(), agnoderenew(), and agnodesetfinger().
Definition at line 52 of file cghdr.h.
Referenced by aggetrec(), arrow_flags(), bind_shape(), dotneato_args_initialize(), find_user_shape(), graph_init(), gvrender_set_style(), knownColorScheme(), makeAddPoly(), makePoly(), maptoken(), node_position(), and parsePackModeInfo().
#define SUCCESS 0 |
Definition at line 62 of file cghdr.h.
Referenced by agapply(), agassociate(), agclose(), agdeledge(), agdelete(), agdelnode(), agdelrec(), agexpose(), aghide(), agnodebefore(), agpopdisc(), agrelabel_node(), agrename(), agsplice(), agstrfree(), and agxset().
int aaglex | ( | void | ) |
int aagparse | ( | void | ) |
Referenced by agconcat().
Definition at line 126 of file id.c.
References AGCLOS, and AGDISC.
Referenced by agidedge(), agidnode(), and agidsubg().
Definition at line 61 of file apply.c.
References agerr(), AGERR, AGINEDGE, AGNODE, AGOUTEDGE, AGRAPH, AGTYPE, FAILURE, and SUCCESS.
Referenced by agclean(), agdeledge(), agdelnode(), agdelrec(), agnodebefore(), agrelabel_node(), and agsplice().
Definition at line 231 of file attr.c.
References aggetrec(), and FALSE.
Referenced by agattrsym(), agedgeattr_delete(), agedgeattr_init(), agget(), agnodeattr_delete(), agnodeattr_init(), agraphattr_delete(), agxget(), and agxset().
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 | ||
) |
Definition at line 146 of file obj.c.
References agdelcb(), AGEDGE, AGNODE, AGRAPH, AGTYPE, Agcbdisc_s::del, Agcbdisc_s::edge, Agcbstack_s::f, Agcbdisc_s::graph, NIL, Agcbdisc_s::node, Agcbstack_s::prev, and Agcbstack_s::state.
Referenced by agdelcb(), and agmethod_delete().
Definition at line 327 of file edge.c.
References agfstin(), agfstout(), AGIN2OUT, AGINEDGE, agnxtin(), agnxtout(), AGOUT2IN, agsubrep(), AGTYPE, assert, Agraph_s::e_id, Agraph_s::e_seq, Agsubnode_s::in_id, Agsubnode_s::in_seq, Agedge_s::node, NOTUSED, Agsubnode_s::out_id, and Agsubnode_s::out_seq.
Referenced by agdeledge(), and agdelnodeimage().
Definition at line 174 of file node.c.
References agdeledgeimage(), agfstedge(), agnxtedge(), dtdelete, Agraph_s::n_id, Agraph_s::n_seq, Agsubnode_s::node, and NOTUSED.
Referenced by agdelnode().
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 | |||
) |
Definition at line 79 of file utils.c.
References agdictobjmem(), dtclose(), dtdisc(), _dtdisc_s::memoryf, and NIL.
Referenced by agclose(), agraphattr_delete(), and agstrclose().
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().
Definition at line 409 of file attr.c.
References agattrrec(), and Agattr_s::dict.
Definition at line 16 of file node.c.
References Agnode_s::base, dtsearch, Agtag_s::id, Agraph_s::n_id, NILnode, Agsubnode_s::node, and Agobj_s::tag.
Referenced by agdelnode(), agfindnode_by_name(), agidnode(), agnode(), agrelabel_node(), and agsubnode().
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 | ||
) |
Definition at line 84 of file obj.c.
References AGEDGE, aginitcb(), AGNODE, AGRAPH, AGTYPE, Agcbdisc_s::edge, Agcbstack_s::f, Agcbdisc_s::graph, Agcbdisc_s::ins, NIL, Agcbdisc_s::node, Agcbstack_s::prev, and Agcbstack_s::state.
Referenced by aginitcb(), and agmethod_init().
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().
Definition at line 165 of file imap.c.
References AGEDGE, agfree(), AGINEDGE, agstrfree(), Agraph_s::clos, dtdelete, FALSE, Agclos_s::lookup_by_id, Agclos_s::lookup_by_name, IMapEntry_s::str, and TRUE.
Referenced by agfreeid(), and aginternalmapclearlocalnames().
Definition at line 118 of file imap.c.
References agdtopen(), AGEDGE, AGINEDGE, AGNEW, agstrdup(), Agraph_s::clos, dtinsert, Dttree, IMapEntry_s::id, Agclos_s::lookup_by_id, Agclos_s::lookup_by_name, NIL, and IMapEntry_s::str.
Referenced by agmapnametoid().
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().
Definition at line 155 of file imap.c.
References NILstr, and IMapEntry_s::str.
Referenced by agnameof().
void aglexbad | ( | void | ) |
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().
Definition at line 96 of file id.c.
References AGCLOS, AGDISC, aginternalmapinsert(), aginternalmaplookup(), LOCALNAMEPREFIX, and NILstr.
Referenced by agedge(), agfindnode_by_name(), agnode(), agopen(), agrelabel_node(), agrename(), and agsubg().
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 | ||
) |
Definition at line 138 of file obj.c.
References agdelcb(), agrecord_callback(), Agclos_s::callbacks_enabled, Agclos_s::cb, CB_DELETION, Agraph_s::clos, and NILsym.
Referenced by agclose(), agdeledge(), and agdelnode().
void agmethod_init | ( | Agraph_t * | g, |
void * | obj | ||
) |
Definition at line 76 of file obj.c.
References aginitcb(), agrecord_callback(), Agclos_s::callbacks_enabled, Agclos_s::cb, CB_INITIALIZE, Agraph_s::clos, and NILsym.
Referenced by agopen1().
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().
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().
Definition at line 390 of file attr.c.
References agattrrec(), and Agattr_s::dict.
Definition at line 69 of file graph.c.
References Ag_mainedge_id_disc, Ag_mainedge_seq_disc, Ag_subedge_id_disc, Ag_subedge_seq_disc, Ag_subgraph_id_disc, Ag_subnode_id_disc, Ag_subnode_seq_disc, agdtopen(), agmethod_init(), agnextseq(), agparent(), AGRAPH, agraphattr_init(), agroot(), AGSEQ, Agraph_s::desc, dtinsert, Dttree, Agraph_s::e_id, Agraph_s::e_seq, Agraph_s::g_dict, Agdesc_s::has_attrs, Agraph_s::n_id, and Agraph_s::n_seq.
Referenced by agopen().
char* agprintid | ( | Agobj_t * | obj | ) |
Definition at line 370 of file attr.c.
References Ag_G_global, agattrrec(), agdatadict(), agdelrec(), agdtclose(), Agdatadict_s::dict, Agdatadict_s::e, FALSE, Agdatadict_s::g, Agattr_s::h, Agdatadict_s::h, Agdatadict_s::n, and Agrec_s::name.
Referenced by agclose().
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().
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().
Definition at line 37 of file obj.c.
References agfreeid(), AGID, agidsubg(), AGINEDGE, agmapnametoid(), AGNODE, AGOUTEDGE, agparent(), AGRAPH, agraphof(), agrelabel_node(), agrename(), agroot(), AGTYPE, FAILURE, FALSE, SUCCESS, and TRUE.
Referenced by agrename().
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 | ||
) |
Definition at line 115 of file obj.c.
References AGEDGE, AGNODE, AGRAPH, AGTYPE, agupdcb(), Agcbdisc_s::edge, Agcbstack_s::f, Agcbdisc_s::graph, Agcbdisc_s::mod, NIL, Agcbdisc_s::node, Agcbstack_s::prev, and Agcbstack_s::state.
Referenced by agmethod_upd(), and agupdcb().
Definition at line 78 of file cghdr.h.
Referenced by agconcat(), aginternalmapclearlocalnames(), aginternalmapclose(), agraphattr_delete(), switch(), and while().
Agcbdisc_t AgAttrdisc |