]> granicus.if.org Git - graphviz/commitdiff
Integrate topfish and sfdp into main tree, using GTS for triangulation;
authorerg <devnull@localhost>
Tue, 29 Apr 2008 21:59:17 +0000 (21:59 +0000)
committererg <devnull@localhost>
Tue, 29 Apr 2008 21:59:17 +0000 (21:59 +0000)
remove duplicated code

lib/neatogen/sparsegraph.h

index 74eff72e3220c3b27fbaee9e42a55815f84b1626..3c9c233c79d3da1a4f6fc5ffa725e9b0b7a47052 100644 (file)
@@ -20,6 +20,10 @@ extern "C" {
 #ifndef SPARSEGRAPH_H
 #define SPARSEGRAPH_H
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #ifdef __cplusplus
     enum Style { regular, invisible };
     struct vtx_data {
@@ -65,21 +69,21 @@ extern "C" {
            return x == other.x && y == other.y;
     }};
 #else
-#undef inline
-#define inline
-#define NOTUSED(var)      (void) var
 
 #ifdef USE_STYLES
     typedef enum { regular, invisible } Style;
 #endif
+    typedef struct {
+       int nedges;             /* no. of neighbors, including self */
+       int *edges;             /* edges[0..(nedges-1)] are neighbors; edges[0] is self */
+       float *ewgts;           /* preferred edge lengths */
+    } v_data; 
+
     typedef struct {
        int nedges;             /* no. of neighbors, including self */
        int *edges;             /* edges[0..(nedges-1)] are neighbors; edges[0] is self */
        float *ewgts;           /* preferred edge lengths */
        float *eweights;        /* edge weights */
-#if 0
-       node_t *np;             /* original node */
-#endif
 #ifdef USE_STYLES
        Style *styles;
 #endif
@@ -90,12 +94,8 @@ extern "C" {
 
     typedef int DistType;      /* must be signed!! */
 
-#ifdef UNUSED
-    typedef struct {
-       double x;
-       double y;
-    } Point;
-#endif
+extern void freeGraphData(vtx_data * graph);
+extern void freeGraph(v_data * graph);
 
 #endif