**********************************************************/
-#include <convert.h>
-#ifndef USE_CGRAPH
-#include <aghdr.h>
-#endif
+#include "convert.h"
#include <ctype.h>
#define SMALLBUF 128
writeSubgs(stp, g, gxlFile);
dd = (Agdatadict_t *) agdatadict(g);
-#ifdef USE_CGRAPH
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
-#else
- for (n = agfstnode(g); n; n = agnxtnode(n)) {
-#endif
realn = agidnode(stp->root, AGID(n), 0);
if (!writeval(realn)) {
writeval(realn) = 1;
writeNode(stp, n, gxlFile, dd->dict.n);
}
-#ifdef USE_CGRAPH
for (e = agfstout(g, n); e; e = agnxtout(g, e)) {
-#else
- for (e = agfstout(n); e; e = agnxtout(e)) {
-#endif
if (writeEdgeTest(g, e))
writeEdge(stp, e, gxlFile, dd->dict.e);
}
Agedge_t *e;
iterate_subgs(stp, g);
-#ifdef USE_CGRAPH
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
-#else
- for (n = agfstnode(g); n; n = agnxtnode(n)) {
-#endif
char *gxlId;
char *nodename = agnameof(n);
addToMap(stp->nodeMap, nodename, gxlId);
}
-#ifdef USE_CGRAPH
for (e = agfstout(g, n); e; e = agnxtout(g, e)) {
-#else
- for (e = agfstout(n); e; e = agnxtout(e)) {
-#endif
if (writeEdgeTest(g, e)) {
char *edge_id = agget(e, GXL_ID);
if (!EMPTY(edge_id))