From 58dcfd2bdf480a60c1cbcb5e38eec5c00656bb9e Mon Sep 17 00:00:00 2001 From: Emden Gansner Date: Thu, 13 Sep 2012 11:41:53 -0400 Subject: [PATCH] Additional fix to make sure all declarations occur before statements --- lib/neatogen/constraint.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/neatogen/constraint.c b/lib/neatogen/constraint.c index 578fae6ed..7c6411d34 100644 --- a/lib/neatogen/constraint.c +++ b/lib/neatogen/constraint.c @@ -227,15 +227,15 @@ static graph_t *mkNConstraintG(graph_t * g, Dt_t * list, { nitem *p; nitem *nxp; + node_t *n; + edge_t *e; + node_t *lastn = NULL; #ifndef WITH_CGRAPH graph_t *cg = agopen("cg", AGDIGRAPHSTRICT); #else graph_t *cg = agopen("cg", Agstrictdirected, NIL(Agdisc_t *)); agbindrec(cg, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE); // graph custom data #endif - node_t *n; - edge_t *e; - node_t *lastn = NULL; for (p = (nitem *) dtflatten(list); p; p = (nitem *) dtlink(list, (Dtlink_t *) p)) { @@ -316,12 +316,6 @@ static graph_t *mkConstraintG(graph_t * g, Dt_t * list, nitem *p; nitem *nxt = NULL; nitem *nxp; -#ifndef WITH_CGRAPH - graph_t *cg = agopen("cg", AGDIGRAPHSTRICT); -#else - graph_t *cg = agopen("cg", Agstrictdirected, NIL(Agdisc_t *)); - agbindrec(cg, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE); // graph custom data -#endif graph_t *vg; node_t *prev = NULL; node_t *root = NULL; @@ -333,6 +327,12 @@ static graph_t *mkConstraintG(graph_t * g, Dt_t * list, double root_val; #endif node_t *lastn = NULL; +#ifndef WITH_CGRAPH + graph_t *cg = agopen("cg", AGDIGRAPHSTRICT); +#else + graph_t *cg = agopen("cg", Agstrictdirected, NIL(Agdisc_t *)); + agbindrec(cg, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE); // graph custom data +#endif /* count distinct nodes */ cnt = 0; -- 2.40.0