#ifndef WITH_CGRAPH
pg = late_string(sg, agfindattr(sg, "layer"), "");
#else
- pg = late_string(sg, agfindattr(sg, "layer"), "");
+ pg = late_string(sg, agattr(sg, AGRAPH, "layer", 0), "");
#endif
if (selectedlayer(job, pg))
return TRUE;
job->focus.x, job->focus.y, job->view.x, job->view.y);
#endif
+#ifndef WITH_CGRAPH
s = late_string(g, agfindattr(g, "comment"), "");
+#else
+ s = late_string(g, agattr(g, AGRAPH, "comment", 0), "");
+#endif
gvrender_comment(job, s);
emit_begin_graph(job, g);
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
for (e = agfstout(g, n); e; e = agnxtout(g, e)) {
+#ifndef WITH_CGRAPH
/* FIXME - there must be a proper way to get port info - these are
* supposed to be private to libgraph - from libgraph.h */
#define TAILX 1
#define HEADX 2
-#ifndef WITH_CGRAPH
if (extend && e->attr) {
tport = e->attr[TAILX];
hport = e->attr[HEADX];
}
#else /* WITH_CGRAPH */
if (extend) { //assuming these two attrs have already been created by cgraph
- tport = agget(e,TAILX);
- hport = agget(e,HEADX);
+ if (!(tport = agget(e,"tailport")))
+ tport = "";
+ if (!(hport = agget(e,"headport")))
+ hport = "";
}
#endif /* WITH_CGRAPH */
else