]> granicus.if.org Git - graphviz/commitdiff
going to eliminate common_graphviz next
authorellson <devnull@localhost>
Tue, 14 Oct 2008 19:12:50 +0000 (19:12 +0000)
committerellson <devnull@localhost>
Tue, 14 Oct 2008 19:12:50 +0000 (19:12 +0000)
configure.ac
lib/Makefile.am
lib/common/arrows.c
lib/common/diagen.c
lib/common/emit.c
lib/common/htmltable.c
lib/common/labels.c
lib/common/types.h
lib/gvc/Makefile.am
lib/pack/Makefile.am
lib/patchwork/Makefile.am

index f3308dac01503de541bd10a44a7aeb58950dadbc..bf562dc2371045d280eac2c1188fe3b8b5fa5763 100644 (file)
@@ -2913,7 +2913,6 @@ AC_CONFIG_FILES(Makefile
        lib/expr/Makefile
        lib/expr/libexpr.pc
        lib/common/Makefile
-       lib/common_cgraph/Makefile
        lib/ingraphs/Makefile
        lib/vpsc/Makefile
        lib/gvc/Makefile
index dd4ac6c969668ea0f4923fa7b9ccf6f3b326a972..15286c0d059b1854adf5c7725d655c4e456d3104 100644 (file)
@@ -1,13 +1,13 @@
 # $Id$ $Revision$
 ## Process this file with automake to produce Makefile.in
 
-GRAPH_DIRS = circogen common dotgen fdpgen neatogen twopigen
+GRAPH_DIRS = circogen dotgen fdpgen neatogen twopigen
 
-CGRAPH_DIRS = circogen_cgraph common_cgraph dotgen_cgraph \
+CGRAPH_DIRS = circogen_cgraph dotgen_cgraph \
        fdpgen_cgraph neatogen_cgraph twopigen_cgraph
 
 SUBDIRS = cdt graph cgraph gd pathplan sfio vmalloc ast vpsc \
-       rbtree sparse sfdpgen patchwork inkpot expr pack gvc \
-       xdot ingraphs topfish glcomp $(GRAPH_DIRS) $(CGRAPH_DIRS)
+       rbtree sparse sfdpgen patchwork inkpot expr common \
+       pack gvc xdot ingraphs topfish glcomp $(GRAPH_DIRS) $(CGRAPH_DIRS)
 
 EXTRA_DIST = Makefile.old
index f0a3e1de5650f68cb607f4da2245d830b0b1bdf2..535385fd7dd352abe563408858122815d568a9f8 100644 (file)
@@ -183,7 +183,11 @@ void arrow_flags(Agedge_t * e, int *sflag, int *eflag)
     arrowdir_t *arrowdir;
 
     *sflag = ARR_TYPE_NONE;
+#ifdef WITH_CGRAPH
+    *eflag = agisdirected(agraphof(e)) ? ARR_TYPE_NORM : ARR_TYPE_NONE;
+#else
     *eflag = AG_IS_DIRECTED(e->tail->graph) ? ARR_TYPE_NORM : ARR_TYPE_NONE;
+#endif
     if (E_dir && ((attr = agxget(e, E_dir->index)))[0]) {
        for (arrowdir = Arrowdirs; arrowdir->dir; arrowdir++) {
            if (streq(attr, arrowdir->dir)) {
@@ -201,7 +205,11 @@ void arrow_flags(Agedge_t * e, int *sflag, int *eflag)
        edge_t *f;
        int s0, e0;
        /* pick up arrowhead of opposing edge */
+#ifdef WITH_CGRAPH
+       f = agedge(agraphof(e), aghead(e), agtail(e), (char *)NULL, FALSE);
+#else
        f = agfindedge(e->tail->graph, e->head, e->tail);
+#endif
        arrow_flags(f, &s0, &e0);
        *eflag = *eflag | s0;
        *sflag = *sflag | e0;
index 6c4757f562a1bccfe95f8212e5e3116337bd07d7..65faf9c64c9dcf454e249d53fd22af63e14d2a40 100644 (file)
@@ -834,13 +834,22 @@ dia_bezier(point * A, int n, int arrow_at_start, int arrow_at_end, int filled)
            || (strcmp(shape_t, "circle") == 0)
            || (strcmp(shape_t, "doublecircle") == 0)) {
            cp_h = diaptf(ND_coord(head));
+#ifdef WITH_CGRAPH
+           if (agisdirected(Rootgraph))
+#else
            if (AG_IS_DIRECTED(Rootgraph))
+#endif
+
                conn_h = ellipse_connection(cp_h, diapt(A[n - 1]));
            else
                conn_h = ellipse_connection(cp_h, diapt(A[0]));
         } else if (strcmp(shape_t, "record") == 0) { 
         } else {
+#ifdef WITH_CGRAPH
+           if (agisdirected(Rootgraph))
+#else
            if (AG_IS_DIRECTED(Rootgraph))
+#endif
                conn_h = box_connection(head, diapt(A[n - 1]));
            else
                conn_h = box_connection(head, diapt(A[0]));
@@ -850,13 +859,21 @@ dia_bezier(point * A, int n, int arrow_at_start, int arrow_at_end, int filled)
            || (strcmp(shape_t, "circle") == 0)
            || (strcmp(shape_t, "doublecircle") == 0)) {
            cp_t = diaptf(ND_coord(tail));
+#ifdef WITH_CGRAPH
+           if (agisdirected(Rootgraph))
+#else
            if (AG_IS_DIRECTED(Rootgraph))
+#endif
                conn_t = ellipse_connection(cp_t, diapt(A[0]));
            else
                conn_t = ellipse_connection(cp_t, diapt(A[n - 1]));
         } else if (strcmp(shape_t, "record") == 0) {
         } else {
+#ifdef WITH_CGRAPH
+           if (agisdirected(Rootgraph))
+#else
            if (AG_IS_DIRECTED(Rootgraph))
+#endif
                conn_t = box_connection(tail, diapt(A[0]));
            else
                conn_t = box_connection(tail, diapt(A[n - 1]));
index 4f47a9db446655e1f3b44dc1b005a7f0680ab9b7..19583041b38d18ee06d0379e422838b11ff7810d 100644 (file)
@@ -1839,7 +1839,12 @@ static void emit_edge(GVJ_t * job, edge_t * e)
 
        s = malloc(strlen(e->tail->name) + 2 + strlen(e->head->name) + 1);
        strcpy(s,e->tail->name);
+#ifdef WITH_CGRAPH
+       if (agisdirected(agraphof(e)))
+#else
        if (AG_IS_DIRECTED(e->tail->graph))
+#endif
+
            strcat(s,"->");
        else
            strcat(s,"--");
index 2e6b8d523170b1039746284fa007abbdd3af5dd3..67453fbb904d0a4091fd86d563d6caf02b3f10aa 100644 (file)
@@ -1581,7 +1581,11 @@ static char *nameOf(void *obj, agxbuf * xb)
        ep = (Agedge_t *) obj;
        agxbput(xb, ep->tail->name);
        agxbput(xb, ep->head->name);
+#ifdef WITH_CGRAPH
+       if (agisdirected(agraphof(ep)))
+#else
        if (AG_IS_DIRECTED(ep->tail->graph))
+#endif
            agxbput(xb, "->");
        else
            agxbput(xb, "--");
index bc93878430efbcb8f5fd2e4a284034bea1ecb58b..c0beaa38c10763ba805d8656a9a88bcb91efdbab 100644 (file)
@@ -152,8 +152,13 @@ textlabel_t *make_label(void *obj, char *str, int kind, double fontsize, char *f
                agerr(AGPREV, "in label of node %s\n", n->name);
                break;
            case AGEDGE:
+#ifdef WITH_CGRAPH
+               agerr(AGPREV, "in label of edge %s %s %s\n",
+                       e->tail->name, agisdirected(g)?"->":"--", e->head->name);
+#else
                agerr(AGPREV, "in label of edge %s %s %s\n",
                        e->tail->name, AG_IS_DIRECTED(g)?"->":"--", e->head->name);
+#endif
                break;
            }
        }
index aa3dca4cb93e3d99ac94de19cb863c4fcb11e96d..d6452a6a0db908ec52578a7893b72aa0bb90552a 100644 (file)
@@ -44,16 +44,16 @@ extern "C" {
     typedef int (*qsort_cmpf) (const void *, const void *);
     typedef int (*bsearch_cmpf) (const void *, const void *);
 
-    typedef struct Agraph_t graph_t;
+    typedef struct Agraph_s graph_t;
 
-    typedef struct Agnode_t node_t;
-    typedef struct Agedge_t edge_t;
+    typedef struct Agnode_s node_t;
+    typedef struct Agedge_s edge_t;
 
-    typedef struct Agsym_t attrsym_t;
+    typedef struct Agsym_s attrsym_t;
 
-    typedef struct htmllabel_t htmllabel_t;
+    typedef struct htmllabel_s htmllabel_t;
 
-    typedef union inside_t {
+    typedef union inside_s {
        struct {
            pointf* p;
            double* r;
index bf259ae80da910dc8aecc26b7b2246217e0c8261..4d1553139743db5dbe5c5200aa4a1dc84305a3d9 100644 (file)
@@ -3,10 +3,8 @@
 
 if WITH_CGRAPH
 GRAPH = cgraph
-COMMON = common_cgraph
 else
 GRAPH = graph
-COMMON = common
 endif
 
 pdfdir = $(pkgdatadir)/doc/pdf
@@ -14,7 +12,7 @@ pkgconfigdir = $(libdir)/pkgconfig
 
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
-       -I$(top_srcdir)/lib/$(COMMON) \
+       -I$(top_srcdir)/lib/common \
        -I$(top_srcdir)/lib/pathplan \
        -I$(top_srcdir)/lib/$(GRAPH) \
        -I$(top_srcdir)/lib/cdt \
@@ -51,7 +49,7 @@ pdf_DATA = gvc.3.pdf
 libgvc_C_la_SOURCES = gvrender.c gvlayout.c gvdevice.c gvloadimage.c \
        gvcontext.c gvjobs.c gvevent.c gvplugin.c gvconfig.c \
        gvtextlayout.c gvusershape.c gvc.c
-libgvc_C_la_LIBADD = $(top_builddir)/lib/$(COMMON)/libcommon_C.la \
+libgvc_C_la_LIBADD = $(top_builddir)/lib/common/libcommon_C.la \
        $(top_builddir)/lib/pack/libpack_C.la
 libgvc_C_la_DEPENDENCIES = $(top_builddir)/lib/rbtree/librbtree_C.la \
        $(top_builddir)/lib/pack/libpack_C.la
index 290713eacfac9cff889f442dc1c7cafec33b8f04..1ebdc7a05bcc6139d43139b6faec68b04f1ef09a 100644 (file)
@@ -6,16 +6,14 @@ pdfdir = $(pkgdatadir)/doc/pdf
 
 if WITH_CGRAPH
 GRAPH = cgraph
-COMMON = common_cgraph
 NEATOGEN = neatogen_cgraph
 else
 GRAPH = graph
-COMMON = common
 NEATOGEN = neatogen
 endif
 
 AM_CPPFLAGS = -I$(top_srcdir) \
-        -I$(top_srcdir)/lib/$(COMMON) \
+        -I$(top_srcdir)/lib/common \
        -I$(top_srcdir)/lib/gvc \
        -I$(top_srcdir)/lib/$(NEATOGEN) \
        -I$(top_srcdir)/lib/pathplan \
index 40b7597a0855ef3fc72a58f99bc37b515f9e3d53..e415cdd02d26b24ae87e5e525b08c5469e8c70ce 100644 (file)
@@ -3,19 +3,17 @@
 
 if WITH_CGRAPH
 GRAPH = cgraph
-COMMON = common_cgraph
 NEATOGEN = neatogen_cgraph
 FDPGEN = fdpgen_cgraph
 else
 GRAPH = graph
-COMMON = common
 NEATOGEN = neatogen
 FDPGEN = fdpgen
 endif
 
 AM_CPPFLAGS = \
         -I$(top_srcdir) \
-        -I$(top_srcdir)/lib/$(COMMON) \
+        -I$(top_srcdir)/lib/common \
        -I$(top_srcdir)/lib/gvc \
        -I$(top_srcdir)/lib/$(NEATOGEN) \
        -I$(top_srcdir)/lib/$(FDPGEN) \