From a079c5df2430fad564c7d4c7a2a4d6bf49021b81 Mon Sep 17 00:00:00 2001 From: ellson Date: Thu, 23 Oct 2008 21:04:06 +0000 Subject: [PATCH] use macros --- lib/pack/ptest.c | 4 ++-- lib/twopigen/circle.c | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/pack/ptest.c b/lib/pack/ptest.c index 6446f8eb5..89f593238 100644 --- a/lib/pack/ptest.c +++ b/lib/pack/ptest.c @@ -165,8 +165,8 @@ static void initPos(Agraph_t * g) char *p; point *sp; int pn; - attrsym_t *N_pos = agfindattr(g->proto->n, "pos"); - attrsym_t *E_pos = agfindattr(g->proto->e, "pos"); + attrsym_t *N_pos = agfindnodeattr(g, "pos"); + attrsym_t *E_pos = agfindedgeattr(g, "pos"); assert(N_pos); if (!E_pos) { diff --git a/lib/twopigen/circle.c b/lib/twopigen/circle.c index 8bf26e354..99ba44c96 100644 --- a/lib/twopigen/circle.c +++ b/lib/twopigen/circle.c @@ -258,11 +258,7 @@ static void setAbsolutePos(Agraph_t * g) double xf; double hyp; -#ifndef WITH_CGRAPH - p = late_string(g, agfindattr(g->root, "ranksep"), NULL); -#else /* WITH_CGRAPH */ - p = late_string(g, agattr(g->root,AGRAPH, "ranksep", NULL), NULL); -#endif /* WITH_CGRAPH */ + p = late_string(g, agfindgraphattr(g->root, "ranksep"), NULL); if (p) { if (sscanf(p, "%lf", &xf) == 0) xf = DEF_RANKSEP; -- 2.40.0