Graphviz
2.41.20171026.1811
|
#include "render.h"
#include "agxbuf.h"
#include "htmltable.h"
#include "entities.h"
#include "logic.h"
#include "gvc.h"
#include <ctype.h>
#include <pwd.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | fontinfo |
struct | item |
struct | cl_edge_t |
struct | clust_t |
Macros | |
#define | W_DEGREE 5 |
#define | PATHSEP ":" |
#define | MAPC(n) (strncmp(agnameof(n),"cluster",7)?NULL:findCluster(cmap,agnameof(n))) |
#define | MAXENTLEN 8 |
#define MAXENTLEN 8 |
Definition at line 1345 of file utils.c.
Referenced by scanEntity().
Definition at line 221 of file utils.c.
References NULL, W_DEGREE, pointf_s::x, and pointf_s::y.
Referenced by bezier_clip(), dotneato_closest(), place_portlabel(), spline_at_y(), and update_bb_bz().
Definition at line 714 of file utils.c.
References agget(), aghead(), aghtmlstr(), agraphof(), agtail(), agxget(), E_headclip, E_headlabel, E_label, E_label_float, E_tailclip, E_taillabel, E_xlabel, ED_head_label, ED_head_port, ED_label, ED_label_ontop, ED_tail_label, ED_tail_port, ED_xlabel, EDGE_LABEL, EDGE_XLABEL, FALSE, fontinfo::fontcolor, fontinfo::fontname, fontinfo::fontsize, GD_has_labels, HEAD_ID, HEAD_LABEL, late_string(), LT_HTML, LT_NONE, make_label(), mapbool(), ND_has_port, ND_shape, NULL, str, TAIL_ID, TAIL_LABEL, and TRUE.
void common_init_node | ( | node_t * | n | ) |
Definition at line 629 of file utils.c.
References aghtmlstr(), agraphof(), agxget(), bind_shape(), DEFAULT_COLOR, DEFAULT_FONTNAME, DEFAULT_FONTSIZE, DEFAULT_NODEHEIGHT, DEFAULT_NODESHAPE, DEFAULT_NODEWIDTH, fontinfo::fontcolor, fontinfo::fontname, fontinfo::fontsize, GD_has_labels, late_double(), late_int(), late_nnstring(), LT_HTML, LT_NONE, LT_RECD, make_label(), MIN_FONTSIZE, MIN_NODEHEIGHT, MIN_NODEWIDTH, N_fontcolor, N_fontname, N_fontsize, N_height, N_label, N_shape, N_showboxes, N_width, N_xlabel, ND_height, ND_label, ND_shape, ND_showboxes, ND_width, ND_xlabel, NODE_XLABEL, SH_RECORD, shapeOf(), and str.
Referenced by neato_init_node().
void compute_bb | ( | graph_t * | g | ) |
Definition at line 852 of file utils.c.
References AGDATA, agfstnode(), agfstout(), agnnodes(), agnxtnode(), agnxtout(), B2BF, coord(), ED_head_label, ED_label, ED_spl, ED_tail_label, ED_xlabel, EXPANDBB, EXPANDBP, GD_bb, GD_clust, GD_flip, GD_label, GD_n_cluster, INT_MAX, boxf::LL, ND_xlabel, ND_xsize, ND_ysize, boxf::UR, pointf_s::x, and pointf_s::y.
Referenced by init_nop(), neato_layout(), packSubgraphs(), putGraphs(), and spline_edges().
Definition at line 202 of file utils.c.
References ND_pos, POINTS_PER_INCH, pointf_s::x, and pointf_s::y.
Referenced by compute_bb(), QuadTree_get_supernodes_internal(), and right_of().
Definition at line 58 of file utils.c.
References nodequeue::head, nodequeue::limit, NULL, nodequeue::store, and nodequeue::tail.
Referenced by build_ranks().
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().
double drand48 | ( | void | ) |
Definition at line 2005 of file utils.c.
Referenced by initLayout(), jitter_d(), makeObstacle(), move_node(), randompos(), and stress_majorization_kD_mkernel().
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 51 of file utils.c.
References nodequeue::limit, nodequeue::store, and nodequeue::tail.
Referenced by build_ranks(), and enqueue_neighbors().
char* Fgets | ( | FILE * | fp | ) |
Definition at line 2074 of file utils.c.
References clust_t::clp, dtmatch, and NULL.
void free_queue | ( | nodequeue * | q | ) |
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 | ) |
void gv_cleanup_edge | ( | edge_t * | e | ) |
Definition at line 1947 of file utils.c.
References agdelrec(), ED_head_label, ED_label, ED_path, ED_tail_label, ED_xlabel, free_label(), and gv_free_splines().
Referenced by circo_cleanup(), dot_cleanup(), fdp_cleanup(), neato_cleanup(), patchwork_cleanup(), sfdp_cleanup(), and twopi_cleanup().
void gv_cleanup_node | ( | node_t * | n | ) |
Definition at line 1959 of file utils.c.
References agdelrec(), free_label(), ND_label, ND_pos, ND_shape, and ND_xlabel.
Referenced by circo_cleanup(), fdp_cleanup(), neato_cleanup(), osage_cleanup(), patchwork_cleanup(), sfdp_cleanup(), twopi_cleanup(), and undoClusterEdges().
void gv_free_splines | ( | edge_t * | e | ) |
Definition at line 1935 of file utils.c.
Referenced by gv_cleanup_edge().
void gvToggle | ( | int | s | ) |
Definition at line 610 of file utils.c.
References gvToggle().
Referenced by gvToggle(), and main().
char* htmlEntityUTF8 | ( | char * | s, |
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().
Definition at line 915 of file utils.c.
References agnameof(), Agraph_s::root, and strncasecmp().
double late_double | ( | void * | obj, |
attrsym_t * | attr, | ||
double | def, | ||
double | low | ||
) |
Definition at line 87 of file utils.c.
References ag_xget.
Referenced by arrow_length(), common_init_node(), do_graph_label(), emit_clusters(), fdp_initParams(), get_inputscale(), graph_init(), and place_portlabel().
Definition at line 71 of file utils.c.
Referenced by common_init_node(), emit_clusters(), fdp_initParams(), and graph_init().
char* late_nnstring | ( | void * | obj, |
attrsym_t * | attr, | ||
char * | def | ||
) |
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 * | obj, |
attrsym_t * | attr, | ||
char * | def | ||
) |
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 * | s | ) |
Definition at line 1561 of file utils.c.
References agxbfree(), agxbinit(), agxbputc, and agxbuse.
Referenced by make_html_label(), and make_label().
Definition at line 454 of file utils.c.
References FALSE, strcasecmp(), and TRUE.
Referenced by init_nop(), mapbool(), and neato_layout().
boolean mapbool | ( | char * | p | ) |
Definition at line 472 of file utils.c.
References FALSE, and mapBool().
Referenced by circularLayout(), common_init_edge(), dot_mincross(), graph_init(), late_bool(), nonconstraint_edge(), and user_pos().
Definition at line 2064 of file utils.c.
References dtopen(), and Dtoset.
Referenced by dot_compoundEdges(), and processClusterEdges().
Definition at line 602 of file utils.c.
References spline_at_y(), and pointf_s::y.
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 1690 of file utils.c.
References splines::bb, ED_label, ED_spl, FALSE, splines::list, overlap_label(), splines::size, and TRUE.
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().
Definition at line 1626 of file utils.c.
References inside_t::bp, FALSE, boxf::LL, inside_t::n, ND_bb, ND_coord, ND_shape, NULL, OVERLAP, inside_t::s, and boxf::UR.
Definition at line 821 of file utils.c.
References boxf::LL, MAX, MIN, polygon_t::peripheries, polygon_t::sides, boxf::UR, polygon_t::vertices, pointf_s::x, and pointf_s::y.
Referenced by makeObstacle().
void processClusterEdges | ( | graph_t * | g | ) |
Definition at line 1192 of file utils.c.
References agbindrec(), agclose(), agdelete(), agfstnode(), agfstout(), agnxtnode(), agnxtout(), agsubg(), agxbfree(), agxbinit(), CL_EDGE_TAG, dtclose(), dtopen(), Dtoset, FALSE, IS_CLUST_NODE, mkClustMap(), cl_edge_t::n_cluster_edges, SMALLBUF, and TRUE.
Referenced by fdp_init_node_edge().
Definition at line 1333 of file utils.c.
References agattr(), and NULL.
Referenced by attach_attrs_and_arrows().
const char* safefile | ( | const char * | filename | ) |
Definition at line 376 of file utils.c.
References agerr(), AGWARN, DIRSEP, FALSE, Gvfilepath, Gvimagepath, HTTPServerEnVar, NULL, str, and TRUE.
Referenced by bind_shape(), cat_libfile(), epsf_init(), and gvusershape_file_access().
char* scanEntity | ( | char * | t, |
agxbuf * | xb | ||
) |
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().
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().
int strcasecmp | ( | const char * | s1, |
const char * | s2 | ||
) |
Definition at line 1896 of file utils.c.
References strcasecmp().
int test_toggle | ( | void | ) |
Definition at line 618 of file utils.c.
Referenced by move_node().
Definition at line 146 of file utils.c.
References ND_UF_parent.
Referenced by class1(), class2(), decompose(), UF_setname(), and UF_union().
Definition at line 181 of file utils.c.
References assert, ND_UF_parent, and ND_UF_size.
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 | ( | node_t * | u | ) |
Definition at line 188 of file utils.c.
References ND_ranktype, ND_UF_parent, ND_UF_size, NORMAL, and NULL.
Referenced by mark_clusters().
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 | ) |
Definition at line 1295 of file utils.c.
References agbindrec(), agclose(), agdelete(), agfstnode(), agfstout(), agnxtnode(), agnxtout(), agsubg(), assert, ED_compound, gv_cleanup_node(), N_NEW, and TRUE.
Referenced by attach_attrs_and_arrows().
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 * | s | ) |
Definition at line 1601 of file utils.c.
References agxbfree(), agxbinit(), agxbputc, and agxbuse.
Referenced by ps_string().