{
graph_t *g = job->obj->u.g;
+#ifndef WITH_CGRAPH
agsetiodisc(NULL, gvfwrite, gvferror);
+#else
+ // FIXME
+#endif
switch (job->render.id) {
case FORMAT_PLAIN:
write_plain(job, g, (FILE*)job, FALSE);
agwrite(g, (FILE*)job);
break;
}
+#ifndef WITH_CGRAPH
agsetiodisc(NULL, NULL, NULL);
+#else
+ // FIXME
+#endif
}
static void xdot_textpara(GVJ_t * job, pointf p, textpara_t * para)
char *ObjType, *ObjPart;
unsigned int ObjId;
obj_state_t *obj = job->obj;
- int ObjHandle, ObjFlag;
+ int ObjFlag;
+#ifndef WITH_CGRAPH
+ int ObjHandle;
+#endif
switch (obj->emit_state) {
case EMIT_NDRAW:
ObjPart = "shape";
ObjFlag = 1;
ObjId = AGID(obj->u.n);
+#ifndef WITH_CGRAPH
ObjHandle = obj->u.n->handle;
+#endif
break;
case EMIT_NLABEL:
ObjType = "node";
ObjPart = "label";
ObjFlag = 0;
ObjId = AGID(obj->u.n);
+#ifndef WITH_CGRAPH
ObjHandle = obj->u.n->handle;
+#endif
break;
case EMIT_EDRAW:
case EMIT_TDRAW:
ObjPart = "shape";
ObjFlag = 1;
ObjId = AGID(obj->u.e);
+#ifndef WITH_CGRAPH
ObjHandle = obj->u.e->handle;
+#endif
break;
case EMIT_ELABEL:
case EMIT_TLABEL:
ObjPart = "label";
ObjFlag = 0;
ObjId = AGID(obj->u.e);
+#ifndef WITH_CGRAPH
ObjHandle = obj->u.e->handle;
+#endif
break;
case EMIT_GDRAW:
ObjType = "graph";
ObjPart = "shape";
ObjFlag = 1;
ObjId = -1; /* hack! */
+#ifndef WITH_CGRAPH
ObjHandle = obj->u.g->handle;
+#endif
break;
case EMIT_GLABEL:
ObjType = "graph";
ObjFlag = 0;
ObjType = "graph label";
ObjId = -1; /* hack! */
+#ifndef WITH_CGRAPH
ObjHandle = obj->u.g->handle;
+#endif
break;
case EMIT_CDRAW:
ObjType = "graph";
ObjFlag = 1;
#ifndef WITH_CGRAPH
ObjId = obj->u.sg->meta_node->id;
+ ObjHandle = obj->u.sg->handle;
#else
ObjId = AGID(obj->u.sg);
#endif
- ObjHandle = obj->u.sg->handle;
break;
case EMIT_CLABEL:
ObjType = "graph";
ObjFlag = 0;
#ifndef WITH_CGRAPH
ObjId = obj->u.sg->meta_node->id;
+ ObjHandle = obj->u.sg->handle;
#else
ObjId = AGID(obj->u.sg);
#endif
- ObjHandle = obj->u.sg->handle;
break;
default:
assert (0);
break;
}
+#ifndef WITH_CGRAPH
gvprintf(job, " -tags {%d%s%d}", ObjFlag, ObjType, ObjHandle);
+#else
+ gvprintf(job, " -tags {%d%s%d}", ObjFlag, ObjType, ObjId);
+#endif
}
static void tkgen_canvas(GVJ_t * job)