}
list->argc = j;
-#ifndef WITH_CGRAPH
- a = agfindattr(g->root, s_href);
+ a = agfindgraphattr(agroot(g), s_href);
if (!a)
- a = agfindattr(g->root, s_URL);
+ a = agfindgraphattr(agroot(g), s_URL);
if (a)
+#ifndef WITH_CGRAPH
job->selected_href = strdup_and_subst_obj(agxget(g, a->index), (void*)g);
#else
- a = agattr(agroot(g), AGRAPH, s_href, NULL);
- if (!a)
- a = agattr(agroot(g), AGRAPH, s_URL, NULL);
- if (a)
job->selected_href = strdup_and_subst_obj(agxget(g, a), (void*)g);
#endif
}
}
list->argc = j;
-#ifndef WITH_CGRAPH
- a = agfindattr(n->graph->proto->n, s_href);
+ a = agfindnodeattr(agraphof(n), s_href);
if (!a)
- a = agfindattr(n->graph->proto->n, s_URL);
+ a = agfindnodeattr(agraphof(n), s_URL);
if (a)
+#ifndef WITH_CGRAPH
job->selected_href = strdup_and_subst_obj(agxget(n, a->index), (void*)n);
#else
- a = agattr(g, AGNODE, s_href, NULL);
- if (!a)
- a = agattr(g, AGNODE, s_URL, NULL);
- if (a)
job->selected_href = strdup_and_subst_obj(agxget(n, a), (void*)n);
#endif
}
}
alist->argc = j;
-#ifndef WITH_CGRAPH
- a = agfindattr(e->head->graph->proto->e, s_href);
+ a = agfindedgeattr(agraphof(aghead(e)), s_href);
if (!a)
- a = agfindattr(e->head->graph->proto->e, s_URL);
+ a = agfindedgeattr(agraphof(aghead(e)), s_URL);
if (a)
+#ifndef WITH_CGRAPH
job->selected_href = strdup_and_subst_obj(agxget(e, a->index), (void*)e);
#else
- a = agattr(agraphof(e), AGEDGE, s_href, NULL);
- if (!a)
- a = agattr(agraphof(e), AGEDGE, s_URL, NULL);
- if (a)
job->selected_href = strdup_and_subst_obj(agxget(e, a), (void*)e);
#endif
}
#endif /* WITH_CGRAPH */
g = (graph_t*)obj;
GD_gui_state(g) |= GUI_STATE_ACTIVE;
-#ifndef WITH_CGRAPH
- a = agfindattr(g->root, s_tooltip);
+ a = agfindgraphattr(agroot(g), s_tooltip);
if (a)
+#ifndef WITH_CGRAPH
job->active_tooltip = strdup_and_subst_obj(agxget(g, a->index), obj);
#else /* WITH_CGRAPH */
- a = agattr(agroot(g), AGRAPH, s_tooltip, NULL);
- if (a)
job->active_tooltip = strdup_and_subst_obj(agxget(g, a), obj);
#endif /* WITH_CGRAPH */
break;
case AGNODE:
n = (node_t*)obj;
ND_gui_state(n) |= GUI_STATE_ACTIVE;
-#ifndef WITH_CGRAPH
- a = agfindattr(n->graph->proto->n, s_tooltip);
+ a = agfindnodeattr(agraphof(n), s_tooltip);
if (a)
+#ifndef WITH_CGRAPH
job->active_tooltip = strdup_and_subst_obj(agxget(n, a->index), obj);
#else /* WITH_CGRAPH */
- a = agattr(agraphof(n), AGNODE, s_tooltip, NULL);
- if (a)
job->active_tooltip = strdup_and_subst_obj(agxget(n, a), obj);
#endif /* WITH_CGRAPH */
break;
case AGEDGE:
e = (edge_t*)obj;
ED_gui_state(e) |= GUI_STATE_ACTIVE;
-#ifndef WITH_CGRAPH
- a = agfindattr(e->head->graph->proto->e, s_tooltip);
+ a = agfindedgeattr(agraphof(aghead(e)), s_tooltip);
if (a)
+#ifndef WITH_CGRAPH
job->active_tooltip = strdup_and_subst_obj(agxget(e, a->index), obj);
#else /* WITH_CGRAPH */
- a = agattr(agraphof(e), AGEDGE, s_tooltip, NULL);
- if (a)
job->active_tooltip = strdup_and_subst_obj(agxget(e, a), obj);
#endif /* WITH_CGRAPH */
break;
int nG = agnnodes(g);
attrsym_t *N_pin;
-#ifndef WITH_CGRAPH
- N_pos = agfindattr(g->proto->n, "pos");
- N_pin = agfindattr(g->proto->n, "pin");
-#else
- N_pos = agattr(g, AGNODE, "pos", 0);
- N_pin = agattr(g, AGNODE, "pin", 0);
-#endif
+ N_pos = agfindnodeattr(g, "pos");
+ N_pin = agfindnodeattr(g, "pin");
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
neato_init_node(n);
node_t *n;
edge_t *e;
int nedges = 0;
-#ifndef WITH_CGRAPH
- attrsym_t *E_pos = agfindattr(g->proto->e, "pos");
-#else
- attrsym_t *E_pos = agattr(g, AGEDGE, "pos", NULL);
-#endif
+ attrsym_t *E_pos = agfindedgeattr(g, "pos");
if (!E_pos || (Nop < 2))
return NoEdges;
int i;
node_t *np;
pos_edge posEdges; /* How many edges have spline info */
-#ifndef WITH_CGRAPH
- attrsym_t *G_lp = agfindattr(g, "lp");
- attrsym_t *G_bb = agfindattr(g, "bb");
-#else /* WITH_CGRAPH */
- attrsym_t *G_lp = agattr(g, AGRAPH, "lp", NULL);
- attrsym_t *G_bb = agattr(g, AGRAPH, "bb", NULL);
-#endif /* WITH_CGRAPH */
+ attrsym_t *G_lp = agfindgraphattr(g, "lp");
+ attrsym_t *G_bb = agfindgraphattr(g, "bb");
/* If G_bb not defined, define it */
if (!G_bb)
int outdim;
setEdgeType (g, ET_LINE);
-#ifndef WITH_CGRAPH
- outdim = late_int(g, agfindattr(g, "dimen"), 2, 2);
- GD_ndim(g->root) = late_int(g, agfindattr(g, "dim"), outdim, 2);
-#else /* WITH_CGRAPH */
- outdim = late_int(g, agattr(g, AGRAPH, "dimen", NULL), 2, 2);
- GD_ndim(g->root) = late_int(g, agattr(g, AGRAPH, "dim", NULL), outdim, 2);
-#endif /* WITH_CGRAPH */
+ outdim = late_int(g, agfindgraphattr(g, "dimen"), 2, 2);
+ GD_ndim(agroot(g)) = late_int(g, agfindgraphattr(g, "dim"), outdim, 2);
Ndim = GD_ndim(g->root) = MIN(GD_ndim(g->root), MAXDIM);
GD_odim(g->root) = MIN(outdim, Ndim);
neato_init_node_edge(g);
#ifdef DIGCOLA
if (mode != MODE_MAJOR) {
-#ifndef WITH_CGRAPH
- double lgap = late_double(g, agfindattr(g, "levelsgap"), 0.0, -MAXDOUBLE);
-#else /* WITH_CGRAPH */
- double lgap = late_double(g, agattr(g, AGRAPH, "levelsgap", NULL), 0.0, -MAXDOUBLE);
-#endif /* WITH_CGRAPH */
+ double lgap = late_double(g, agfindgraphattr(g, "levelsgap"), 0.0, -MAXDOUBLE);
if (mode == MODE_HIER) {
stress_majorization_with_hierarchy(gp, nv, ne, coords, nodes, Ndim,
(init == INIT_SELF), model, MaxIter, lgap);