From 9a382d6483635aa1e55c452bb67955d99c469d94 Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 21 Oct 2008 19:48:31 +0000 Subject: [PATCH] dotgen -> cgraph --- lib/dotgen/class1.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/dotgen/class1.c b/lib/dotgen/class1.c index 45a497399..068b840aa 100644 --- a/lib/dotgen/class1.c +++ b/lib/dotgen/class1.c @@ -27,7 +27,11 @@ int nonconstraint_edge(edge_t * e) { char *constr; +#ifndef WITH_CGRAPH if (E_constr && (constr = agxget(e, E_constr->index))) { +#else /* WITH_CGRAPH */ + if (E_constr && (constr = agxget(e, E_constr))) { +#endif /* WITH_CGRAPH */ if (constr[0] && mapbool(constr) == FALSE) return TRUE; } @@ -41,12 +45,12 @@ interclust1(graph_t * g, node_t * t, node_t * h, edge_t * e) int offset, t_len, h_len, t_rank, h_rank; edge_t *rt, *rh; - if (ND_clust(e->tail)) - t_rank = ND_rank(e->tail) - ND_rank(GD_leader(ND_clust(e->tail))); + if (ND_clust(agtail(e))) + t_rank = ND_rank(agtail(e)) - ND_rank(GD_leader(ND_clust(agtail(e)))); else t_rank = 0; - if (ND_clust(e->head)) - h_rank = ND_rank(e->head) - ND_rank(GD_leader(ND_clust(e->head))); + if (ND_clust(aghead(e))) + h_rank = ND_rank(aghead(e)) - ND_rank(GD_leader(ND_clust(aghead(e)))); else h_rank = 0; offset = ED_minlen(e) + t_rank - h_rank; @@ -83,8 +87,8 @@ void class1(graph_t * g) if (nonconstraint_edge(e)) continue; - t = UF_find(e->tail); - h = UF_find(e->head); + t = UF_find(agtail(e)); + h = UF_find(aghead(e)); /* skip self, flat, and intra-cluster edges */ if (t == h) @@ -93,7 +97,7 @@ void class1(graph_t * g) /* inter-cluster edges require special treatment */ if (ND_clust(t) || ND_clust(h)) { - interclust1(g, e->tail, e->head, e); + interclust1(g, agtail(e), aghead(e), e); continue; } @@ -103,7 +107,7 @@ void class1(graph_t * g) virtual_edge(t, h, e); #ifdef NOTDEF - if ((t == e->tail) && (h == e->head)) { + if ((t == agtail(e)) && (h == aghead(e))) { if (rep = find_fast_edge(t, h)) merge_oneway(e, rep); else -- 2.40.0