From: erg Date: Thu, 24 Jan 2008 18:46:16 +0000 (+0000) Subject: Correct makeHier interface to use number of edges in reduced graph X-Git-Tag: LAST_LIBGRAPH~32^2~4815 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7214db9fac098d753d0151bb616fdbe50ae02f68;p=graphviz Correct makeHier interface to use number of edges in reduced graph --- diff --git a/cmd/smyrna/hier.c b/cmd/smyrna/hier.c index 901954c9f..e0ca07226 100644 --- a/cmd/smyrna/hier.c +++ b/cmd/smyrna/hier.c @@ -10,7 +10,7 @@ focus_t* fs; int ne; vtx_data* graph = makeGraph (topview*, &ne); - hierarchy = makeHier(topview*, graph, x_coords, y_coords); + hierarchy = makeHier(topview->NodeCount, ne, graph, x_coords, y_coords); freeGraph (graph); fs = initFocus (topview->Nodecount); // create focus set @@ -167,12 +167,10 @@ makeGraph (topview* tv, int* nedges) } Hierarchy* -makeHier (topview* tv, vtx_data* graph, double* x_coords, double* y_coords) +makeHier (int nn, int ne, vtx_data* graph, double* x_coords, double* y_coords) { vtx_data* delaunay; ex_vtx_data* geom_graph; - int nn = tv->Nodecount; - int ne = tv->Edgecount; int ngeom_edges; Hierarchy* hp = NEW(Hierarchy); diff --git a/cmd/smyrna/hier.h b/cmd/smyrna/hier.h index 884bc1523..1a3a9e52d 100644 --- a/cmd/smyrna/hier.h +++ b/cmd/smyrna/hier.h @@ -21,6 +21,6 @@ typedef struct { void positionAllItems (Hierarchy* hp, focus_t* fs, hierparms_t* parms); vtx_data* makeGraph (topview* tv, int* nedges); -Hierarchy* makeHier (topview*, vtx_data*, double*, double*); +Hierarchy* makeHier (int nnodes, int nedges, vtx_data*, double*, double*); #endif