]> granicus.if.org Git - graphviz/commitdiff
Finish clean between two conflicting versions of DotIO.c, principally
authorEmden R. Gansner <erg@alum.mit.edu>
Sat, 1 Mar 2014 22:49:07 +0000 (17:49 -0500)
committerEmden R. Gansner <erg@alum.mit.edu>
Sat, 1 Mar 2014 22:49:07 +0000 (17:49 -0500)
removing last remnants of old libgraph usage.

lib/sparse/DotIO.c

index 653373b8bdb039cf6734a3b8fd56542fa90b7763..0468531c31e90ce55e14950c7ed5992e4bff656b 100644 (file)
 #include "color_palette.h"
 #include "colorutil.h"
 
-#define ag_xget(x,a) agxget(x,a)
-#define ag_xset(x,a,c) agxset(x,a,c)
-#define agedgeattr(g,a,c) (agattr(g,AGEDGE,a,c))
-#define agfindedgeattr(g,a) (agattr(g,AGEDGE,a,NULL))
-
 typedef struct {
     Agrec_t h;
     unsigned int id;
@@ -166,7 +161,6 @@ SparseMatrix_import_dot (Agraph_t* g, int dim, real **label_sizes, real **x, int
     exit (1);
   }
 
-
   /* Assign node ids */
   i = 0;
   for (n = agfstnode (g); n; n = agnxtnode (g, n))
@@ -197,9 +191,9 @@ SparseMatrix_import_dot (Agraph_t* g, int dim, real **label_sizes, real **x, int
     val = N_NEW(nedges, real);
   }
 
-  sym = agfindedgeattr(g, "weight");
+  sym = agattr(g, AGEDGE, "weight", NULL);
   if (D) {
-    symD = agfindedgeattr(g, "len");
+    symD = agattr(g, AGEDGE, "len", NULL);
     valD = N_NEW(nedges, real);
   }
   i = 0;
@@ -260,8 +254,7 @@ SparseMatrix_import_dot (Agraph_t* g, int dim, real **label_sizes, real **x, int
        (*label_sizes)[i*2+1] = 4*POINTS(0.5)*.5;
       }
     }
- }
-
+  }
 
   if (x && (psym = agattr(g, AGNODE, "pos", NULL))) {
     int has_positions = TRUE;
@@ -371,7 +364,7 @@ int Import_dot_splines(Agraph_t* g, int *ne, char ***xsplines){
 
   sym = agattr(g, AGNODE, "pos", 0); 
   if (!sym) return 0;
-
   if (!(*xsplines)) *xsplines = malloc(sizeof(char*)*nedges);
 
   i = 0;