From ec917894ecbc7a910c74d1696911564d48a9bd09 Mon Sep 17 00:00:00 2001 From: erg Date: Wed, 1 Feb 2006 17:29:08 +0000 Subject: [PATCH] Remove unused globals; make two globals that are only used in xdgen.c static --- lib/common/globals.h | 4 ---- lib/common/input.c | 4 ---- lib/common/xdgen.c | 6 ++++++ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/common/globals.h b/lib/common/globals.h index 3007565d4..16ee41683 100644 --- a/lib/common/globals.h +++ b/lib/common/globals.h @@ -76,8 +76,6 @@ extern "C" { EXTERN int CL_type; /* NONE, LOCAL, GLOBAL */ EXTERN bool Concentrate; /* if parallel edges should be merged */ EXTERN double Epsilon; /* defined in input_graph */ - EXTERN double Nodesep; - EXTERN double Nodefactor; EXTERN int MaxIter; EXTERN int Ndim; EXTERN int State; /* last finished phase */ @@ -86,8 +84,6 @@ extern "C" { EXTERN int Y_invert; /* invert y in dot & plain output */ EXTERN int Y_off; /* ymin + ymax */ EXTERN double YF_off; /* Y_off in inches */ - EXTERN attrsym_t *g_draw; - EXTERN attrsym_t *g_l_draw; EXTERN attrsym_t *G_activepencolor, *G_activefillcolor, diff --git a/lib/common/input.c b/lib/common/input.c index 980ebf14c..77c8de9a5 100644 --- a/lib/common/input.c +++ b/lib/common/input.c @@ -540,8 +540,6 @@ void graph_init(graph_t * g, bool use_rankdir) GD_drawing(g)->filled = getdoubles2pt(g, "size", &(GD_drawing(g)->size)); getdoubles2pt(g, "page", &(GD_drawing(g)->page)); - getdouble(g, "nodesep", &Nodesep); - getdouble(g, "nodefactor", &Nodefactor); GD_drawing(g)->centered = mapbool(agget(g, "center")); @@ -570,8 +568,6 @@ void graph_init(graph_t * g, bool use_rankdir) #endif do_graph_label(g); - Nodesep = 1.0; - Nodefactor = 1.0; Initial_dist = MYHUGE; /* initialize nodes */ diff --git a/lib/common/xdgen.c b/lib/common/xdgen.c index 540889561..bb435861b 100644 --- a/lib/common/xdgen.c +++ b/lib/common/xdgen.c @@ -32,6 +32,8 @@ static agxbuf* xbufs[6] = { &xbuf4, &xbuf5, }; static Agraph_t *cluster_g; +static attrsym_t *g_draw; +static attrsym_t *g_l_draw; static int isInvis(char *style) { @@ -96,8 +98,12 @@ void extend_attrs(GVJ_t * job, graph_t *g, int s_arrows, int e_arrows) agsafeset (g, "xdotversion", XDOTVERSION, ""); if (GD_has_labels(g) & GRAPH_LABEL) g_l_draw = safe_dcl(g, g, "_ldraw_", "", agraphattr); + else + g_l_draw = NULL; if (GD_n_cluster(g)) g_draw = safe_dcl(g, g, "_draw_", "", agraphattr); + else + g_draw = NULL; n_draw = safe_dcl(g, g->proto->n, "_draw_", "", agnodeattr); n_l_draw = safe_dcl(g, g->proto->n, "_ldraw_", "", agnodeattr); -- 2.40.0