Graphviz  2.41.20171026.1811
Functions
utils.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int strcasecmp (const char *s1, const char *s2)
 
int strncasecmp (const char *s1, const char *s2, size_t n)
 
nodequeuenew_queue (int)
 
void free_queue (nodequeue *)
 
void enqueue (nodequeue *, Agnode_t *)
 
Agnode_tdequeue (nodequeue *)
 
pointf Bezier (pointf *, int, double, pointf *, pointf *)
 
void attach_attrs (graph_t *g)
 
void attach_attrs_and_arrows (graph_t *, int *, int *)
 
char * xml_string (char *str)
 
char * xml_string0 (char *str, boolean raw)
 
void write_plain (GVJ_t *job, graph_t *g, FILE *f, boolean extend)
 
double yDir (double y)
 
char * ps_string (char *s, int)
 
char * strdup_and_subst_obj (char *str, void *obj)
 
char * xml_url_string (char *s)
 
void epsf_emit_body (GVJ_t *job, usershape_t *us)
 
void epsf_define (GVJ_t *job)
 
void undoClusterEdges (graph_t *g)
 
Dt_tmkClustMap (Agraph_t *g)
 
Agraph_tfindCluster (Dt_t *map, char *name)
 
attrsym_tsafe_dcl (graph_t *g, int obj_kind, char *name, char *def)
 
int late_int (void *, Agsym_t *, int, int)
 
double late_double (void *, Agsym_t *, double, double)
 
char * late_nnstring (void *, Agsym_t *, char *)
 
char * late_string (void *, Agsym_t *, char *)
 
boolean late_bool (void *, Agsym_t *, int)
 
double get_inputscale (graph_t *g)
 
Agnode_tUF_find (Agnode_t *)
 
Agnode_tUF_union (Agnode_t *, Agnode_t *)
 
void UF_remove (Agnode_t *, Agnode_t *)
 
void UF_singleton (Agnode_t *)
 
void UF_setname (Agnode_t *, Agnode_t *)
 
char * Fgets (FILE *fp)
 
const char * safefile (const char *filename)
 
boolean mapBool (char *, boolean)
 
boolean mapbool (char *)
 
int maptoken (char *, char **, int *)
 
boolean findStopColor (char *colorlist, char *clrs[2], float *frac)
 
int test_toggle (void)
 
void common_init_node (node_t *n)
 
int common_init_edge (edge_t *e)
 
void updateBB (graph_t *g, textlabel_t *lp)
 
void compute_bb (Agraph_t *)
 
boxf polyBB (polygon_t *poly)
 
boolean overlap_node (node_t *n, boxf b)
 
boolean overlap_label (textlabel_t *lp, boxf b)
 
boolean overlap_edge (edge_t *e, boxf b)
 
void get_gradient_points (pointf *A, pointf *G, int n, float angle, int flags)
 
void processClusterEdges (graph_t *g)
 
char * latin1ToUTF8 (char *)
 
char * htmlEntityUTF8 (char *, graph_t *g)
 
char * utf8ToLatin1 (char *ins)
 
char * scanEntity (char *t, agxbuf *xb)
 
pointf dotneato_closest (splines *spl, pointf p)
 
pointf neato_closest (splines *spl, pointf p)
 
pointf spline_at_y (splines *spl, double y)
 
Agsym_tsetAttr (graph_t *, void *, char *name, char *value, Agsym_t *)
 
void setEdgeType (graph_t *g, int dflt)
 
int edgeType (char *s, int dflt)
 
int is_a_cluster (Agraph_t *g)
 
void gv_nodesize (Agnode_t *n, boolean flip)
 
void start_timer (void)
 
double elapsed_sec (void)
 
void cat_libfile (GVJ_t *job, const char **arglib, const char **stdlib)
 
Agnodeinfo_tninf (Agnode_t *n)
 
Agraphinfo_tginf (Agraph_t *g)
 
Agedgeinfo_teinf (Agedge_t *e)
 

Function Documentation

void attach_attrs ( graph_t g)

Definition at line 399 of file output.c.

void attach_attrs_and_arrows ( graph_t ,
int ,
int  
)
pointf Bezier ( pointf ,
int  ,
double  ,
pointf ,
pointf  
)

Definition at line 221 of file utils.c.

void cat_libfile ( GVJ_t job,
const char **  arglib,
const char **  stdlib 
)

Definition at line 139 of file psusershape.c.

References agerr(), AGWARN, FALSE, Fgets(), gvputs(), safefile(), and TRUE.

int common_init_edge ( edge_t e)
void common_init_node ( node_t n)
void compute_bb ( Agraph_t )
Agnode_t* dequeue ( nodequeue )

Definition at line 58 of file utils.c.

References nodequeue::head, nodequeue::limit, NULL, nodequeue::store, and nodequeue::tail.

Referenced by build_ranks().

pointf dotneato_closest ( splines spl,
pointf  p 
)

Definition at line 477 of file utils.c.

References Bezier(), DIST2, bezier::list, splines::list, NULL, bezier::size, splines::size, pointf_s::x, and pointf_s::y.

Referenced by addEdgeLabels(), and edgeMidpoint().

int edgeType ( char *  s,
int  dflt 
)

Definition at line 1712 of file utils.c.

References agerr(), AGWARN, ET_COMPOUND, ET_CURVED, ET_LINE, ET_NONE, ET_ORTHO, ET_PLINE, ET_SPLINE, and strcasecmp().

Referenced by setEdgeType().

Agedgeinfo_t* einf ( Agedge_t e)

Definition at line 2085 of file utils.c.

References AGDATA.

double elapsed_sec ( void  )
void enqueue ( nodequeue ,
Agnode_t  
)

Definition at line 51 of file utils.c.

References nodequeue::limit, nodequeue::store, and nodequeue::tail.

Referenced by build_ranks(), and enqueue_neighbors().

void epsf_define ( GVJ_t job)
void epsf_emit_body ( GVJ_t job,
usershape_t us 
)

Definition at line 185 of file psusershape.c.

References usershape_s::data, gvputc(), and strncasecmp().

Referenced by epsf_define().

char* Fgets ( FILE *  fp)

Definition at line 282 of file utils.c.

References grealloc().

Referenced by cat_libfile().

Agraph_t* findCluster ( Dt_t map,
char *  name 
)

Definition at line 2074 of file utils.c.

References clust_t::clp, dtmatch, and NULL.

boolean findStopColor ( char *  colorlist,
char *  clrs[2],
float *  frac 
)
void free_queue ( nodequeue )

Definition at line 45 of file utils.c.

References nodequeue::store.

Referenced by build_ranks().

void get_gradient_points ( pointf A,
pointf G,
int  n,
float  angle,
int  flags 
)

Definition at line 1827 of file utils.c.

References MAX, max, MIN, pointf_s::x, and pointf_s::y.

double get_inputscale ( graph_t g)

Definition at line 112 of file utils.c.

References agfindgraphattr, late_double(), POINTS_PER_INCH, and PSinputscale.

Referenced by fdp_layout(), and neato_layout().

Agraphinfo_t* ginf ( Agraph_t g)

Definition at line 2084 of file utils.c.

References AGDATA.

void gv_nodesize ( Agnode_t n,
boolean  flip 
)

Definition at line 1970 of file utils.c.

References INCH2PS, ND_height, ND_ht, ND_lw, ND_rw, and ND_width.

Referenced by neato_init_node().

char* htmlEntityUTF8 ( char *  ,
graph_t g 
)

Definition at line 1473 of file utils.c.

References agerr(), agnameof(), AGWARN, agxbfree(), agxbinit(), agxbputc, and agxbuse.

Referenced by make_html_label(), and make_label().

int is_a_cluster ( Agraph_t g)

Definition at line 915 of file utils.c.

References agnameof(), Agraph_s::root, and strncasecmp().

boolean late_bool ( void *  ,
Agsym_t ,
int   
)

Definition at line 137 of file utils.c.

References agxget(), mapbool(), and NULL.

double late_double ( void *  ,
Agsym_t ,
double  ,
double   
)
int late_int ( void *  ,
Agsym_t ,
int  ,
int   
)

Definition at line 71 of file utils.c.

References ag_xget, and NULL.

Referenced by common_init_node(), emit_clusters(), fdp_initParams(), and graph_init().

char* late_nnstring ( void *  ,
Agsym_t ,
char *   
)

Definition at line 129 of file utils.c.

References late_string().

Referenced by common_init_node(), do_graph_label(), emit_clusters(), findAttrColor(), and write_plain().

char* late_string ( void *  ,
Agsym_t ,
char *   
)

Definition at line 122 of file utils.c.

References agxget().

Referenced by common_init_edge(), emit_graph(), graph_init(), and late_nnstring().

char* latin1ToUTF8 ( char *  )

Definition at line 1561 of file utils.c.

References agxbfree(), agxbinit(), agxbputc, and agxbuse.

Referenced by make_html_label(), and make_label().

boolean mapBool ( char *  ,
boolean   
)

Definition at line 454 of file utils.c.

References FALSE, strcasecmp(), and TRUE.

Referenced by init_nop(), mapbool(), and neato_layout().

boolean mapbool ( char *  )

Definition at line 472 of file utils.c.

int maptoken ( char *  ,
char **  ,
int  
)

Definition at line 443 of file utils.c.

References streq.

Referenced by graph_init().

Dt_t* mkClustMap ( Agraph_t g)

Definition at line 2064 of file utils.c.

References dtopen(), and Dtoset.

Referenced by dot_compoundEdges(), and processClusterEdges().

pointf neato_closest ( splines spl,
pointf  p 
)

Definition at line 602 of file utils.c.

References spline_at_y(), and pointf_s::y.

nodequeue* new_queue ( int  )

Definition at line 34 of file utils.c.

References nodequeue::head, nodequeue::limit, N_NEW, NEW, nodequeue::store, and nodequeue::tail.

Referenced by build_ranks().

Agnodeinfo_t* ninf ( Agnode_t n)

Definition at line 2083 of file utils.c.

References AGDATA.

boolean overlap_edge ( edge_t e,
boxf  b 
)

Definition at line 1690 of file utils.c.

boolean overlap_label ( textlabel_t lp,
boxf  b 
)

Definition at line 1643 of file utils.c.

References textlabel_t::dimen, boxf::LL, OVERLAP, textlabel_t::pos, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by overlap_edge().

boolean overlap_node ( node_t n,
boxf  b 
)

Definition at line 1626 of file utils.c.

boxf polyBB ( polygon_t poly)
void processClusterEdges ( graph_t g)
char* ps_string ( char *  s,
int   
)
attrsym_t* safe_dcl ( graph_t g,
int  obj_kind,
char *  name,
char *  def 
)

Definition at line 1333 of file utils.c.

References agattr(), and NULL.

Referenced by attach_attrs_and_arrows().

const char* safefile ( const char *  filename)
char* scanEntity ( char *  t,
agxbuf xb 
)

Definition at line 1352 of file utils.c.

References agxbput(), agxbputc, MAXENTLEN, and NR_OF_ENTITIES.

Agsym_t* setAttr ( graph_t ,
void *  ,
char *  name,
char *  value,
Agsym_t  
)

Definition at line 924 of file utils.c.

References agattr(), AGEDGE, AGNODE, agobjkind(), AGRAPH, agxset(), and NULL.

void setEdgeType ( graph_t g,
int  dflt 
)

Definition at line 1802 of file utils.c.

References agget(), edgeType(), ET_NONE, and GD_flags.

Referenced by circo_init_graph(), neato_layout(), sfdp_layout(), and twopi_init_graph().

pointf spline_at_y ( splines spl,
double  y 
)

Definition at line 537 of file utils.c.

References ABS, assert, BETWEEN, Bezier(), bezier::list, splines::list, NULL, bezier::size, splines::size, pointf_s::x, and pointf_s::y.

Referenced by neato_closest().

void start_timer ( void  )
int strcasecmp ( const char *  s1,
const char *  s2 
)

Definition at line 21 of file strcasecmp.c.

char* strdup_and_subst_obj ( char *  str,
void *  obj 
)

Definition at line 451 of file labels.c.

int strncasecmp ( const char *  s1,
const char *  s2,
size_t  n 
)
int test_toggle ( void  )

Definition at line 618 of file utils.c.

Referenced by move_node().

Agnode_t* UF_find ( Agnode_t )

Definition at line 146 of file utils.c.

References ND_UF_parent.

Referenced by class1(), class2(), decompose(), UF_setname(), and UF_union().

void UF_remove ( Agnode_t ,
Agnode_t  
)

Definition at line 181 of file utils.c.

References assert, ND_UF_parent, and ND_UF_size.

void UF_setname ( Agnode_t ,
Agnode_t  
)

Definition at line 195 of file utils.c.

References assert, ND_UF_parent, ND_UF_size, and UF_find().

Referenced by mark_clusters().

void UF_singleton ( Agnode_t )

Definition at line 188 of file utils.c.

References ND_ranktype, ND_UF_parent, ND_UF_size, NORMAL, and NULL.

Referenced by mark_clusters().

Agnode_t* UF_union ( Agnode_t ,
Agnode_t  
)

Definition at line 156 of file utils.c.

References ND_id, ND_UF_parent, ND_UF_size, NULL, and UF_find().

void undoClusterEdges ( graph_t g)
void updateBB ( graph_t g,
textlabel_t lp 
)

Definition at line 842 of file utils.c.

References GD_bb, and GD_flip.

Referenced by addEdgeLabels(), makePortLabels(), and makeSelfArcs().

char* utf8ToLatin1 ( char *  ins)

Definition at line 1601 of file utils.c.

References agxbfree(), agxbinit(), agxbputc, and agxbuse.

Referenced by ps_string().

void write_plain ( GVJ_t job,
graph_t g,
FILE *  f,
boolean  extend 
)
char* xml_string ( char *  str)

Definition at line 485 of file labels.c.

char* xml_string0 ( char *  str,
boolean  raw 
)

Definition at line 497 of file labels.c.

References gmalloc(), grealloc(), NULL, and sub.

Referenced by xml_string().

char* xml_url_string ( char *  s)

Definition at line 572 of file labels.c.

double yDir ( double  y)

Definition at line 25 of file output.c.

References YDIR.