]> granicus.if.org Git - graphviz/commitdiff
various partial fixes and stubs for compiling --with-cgraph
authorellson <devnull@localhost>
Thu, 12 Mar 2009 16:06:58 +0000 (16:06 +0000)
committerellson <devnull@localhost>
Thu, 12 Mar 2009 16:06:58 +0000 (16:06 +0000)
plugin/core/gvrender_core_dot.c
plugin/core/gvrender_core_tk.c

index 30e45acf848e2ac6e6739a5fd0eddfa284ff95d5..e1294b9f17722381a33e0a88318ce093738cf00b 100644 (file)
@@ -414,7 +414,11 @@ static void dot_end_graph(GVJ_t *job)
 {
     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);
@@ -433,7 +437,11 @@ static void dot_end_graph(GVJ_t *job)
                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)
index b0db577d47790d761bf2cc4250dff9e1c497f219..b35074940fbb9b3092a4cf20a8b8e3e2d5a0e05f 100644 (file)
@@ -60,7 +60,10 @@ static void tkgen_print_tags(GVJ_t *job)
     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:
@@ -68,14 +71,18 @@ static void tkgen_print_tags(GVJ_t *job)
        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:
@@ -84,7 +91,9 @@ static void tkgen_print_tags(GVJ_t *job)
        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:
@@ -93,14 +102,18 @@ static void tkgen_print_tags(GVJ_t *job)
        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";
@@ -108,7 +121,9 @@ static void tkgen_print_tags(GVJ_t *job)
        ObjFlag = 0;
        ObjType = "graph label";
        ObjId = -1;  /* hack! */
+#ifndef WITH_CGRAPH
        ObjHandle = obj->u.g->handle;
+#endif
        break;
     case EMIT_CDRAW:
        ObjType = "graph";
@@ -116,10 +131,10 @@ static void tkgen_print_tags(GVJ_t *job)
        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";
@@ -127,16 +142,20 @@ static void tkgen_print_tags(GVJ_t *job)
        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)