From: ellson Date: Thu, 23 Oct 2008 02:18:13 +0000 (+0000) Subject: cgraph fixes X-Git-Tag: LAST_LIBGRAPH~32^2~3002 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8a8519cb6ea3ab37ca8b9b3aaa713ad4f5553e6;p=graphviz cgraph fixes --- diff --git a/lib/dotgen/position.c b/lib/dotgen/position.c index dbb3606b5..c28e54949 100644 --- a/lib/dotgen/position.c +++ b/lib/dotgen/position.c @@ -229,7 +229,7 @@ make_LR_constraints(graph_t * g) /* make edges to constrain left-to-right ordering */ for (i = GD_minrank(g); i <= GD_maxrank(g); i++) { double last; - last = rank[i].v[0]->u.rank = 0; + last = ND_rank(rank[i].v[0]) = 0; nodesep = sep[i & 1]; for (j = 0; j < rank[i].n; j++) { u = rank[i].v[j]; @@ -909,8 +909,8 @@ static void dot_compute_bb(graph_t * g, graph_t * root) LL.x = (double)(ND_rank(GD_ln(g))); UR.x = (double)(ND_rank(GD_rn(g))); } - LL.y = (double)(ND_coord(ND_rank(root)[GD_maxrank(g)].v[0]).y - GD_ht1(g)); - UR.y = (double)(ND_coord(ND_rank(root)[GD_minrank(g)].v[0]).y + GD_ht2(g)); + LL.y = ND_coord(GD_rank(root)[GD_maxrank(g)].v[0]).y - GD_ht1(g); + UR.y = ND_coord(GD_rank(root)[GD_minrank(g)].v[0]).y + GD_ht2(g); GD_bb(g).LL = LL; GD_bb(g).UR = UR; } diff --git a/lib/gvc/gvc.h b/lib/gvc/gvc.h index 6cc665435..72aa592b1 100644 --- a/lib/gvc/gvc.h +++ b/lib/gvc/gvc.h @@ -81,7 +81,9 @@ extern int gvLayoutJobs(GVC_t *gvc, graph_t *g); extern void attach_attrs(graph_t *g); /* Parse an html string */ +#ifndef WITH_CGRAPH extern char *agstrdup_html(char *s); +#endif extern int aghtmlstr(char *s); /* Render layout in a specified format to an open FILE */ diff --git a/lib/neatogen/Makefile.am b/lib/neatogen/Makefile.am index 9bd70ca13..e989ff876 100644 --- a/lib/neatogen/Makefile.am +++ b/lib/neatogen/Makefile.am @@ -1,18 +1,22 @@ # $Id$ $Revision$ ## Process this file with automake to produce Makefile.in +if WITH_CGRAPH +GRAPH = cgraph +else +GRAPH = graph +endif + AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/lib/common \ -I$(top_srcdir)/lib/gvc \ -I$(top_srcdir)/lib/pack \ -I$(top_srcdir)/lib/pathplan \ - -I$(top_srcdir)/lib/graph \ + -I$(top_srcdir)/lib/$(GRAPH) \ -I$(top_srcdir)/lib/sfdpgen \ -I$(top_srcdir)/lib/cdt $(IPSEPCOLA_INCLUDES) $(GTS_CFLAGS) -if WITH_CGRAPH -else noinst_LTLIBRARIES = libneatogen_C.la noinst_HEADERS = adjust.h edges.h geometry.h heap.h hedges.h info.h mem.h \ @@ -20,7 +24,6 @@ noinst_HEADERS = adjust.h edges.h geometry.h heap.h hedges.h info.h mem.h \ bfs.h closest.h conjgrad.h defs.h dijkstra.h embed_graph.h kkutils.h \ matrix_ops.h pca.h stress.h quad_prog_solver.h digcola.h \ quad_prog_vpsc.h delaunay.h sparsegraph.h multispline.h fPQ.h -endif IPSEPCOLA_SOURCES = constrained_majorization_ipsep.c \ mosek_quad_solve.c mosek_quad_solve.h quad_prog_vpsc.c