]> granicus.if.org Git - graphviz/commitdiff
Fix compatibility with cgraph library
authorEmden Gansner <erg@research.att.com>
Thu, 18 Aug 2011 19:09:18 +0000 (15:09 -0400)
committerEmden Gansner <erg@research.att.com>
Thu, 18 Aug 2011 19:09:18 +0000 (15:09 -0400)
lib/neatogen/adjust.c
lib/sfdpgen/spring_electrical.c

index 9fe908ae779b2df0f2d0befa5685c3dc987bc932..9bef15874e5596f97d0a0db62986e63bfd05f84a 100644 (file)
@@ -749,8 +749,9 @@ SparseMatrix makeMatrix(Agraph_t* g, int dim, SparseMatrix *D)
        /* edge length */
            if (symD) {
 #ifndef WITH_CGRAPH
-#else
                if (sscanf (agxget (e, symD->index), "%lf", &v) != 1) v = 1;
+#else
+               if (sscanf (agxget (e, symD), "%lf", &v) != 1) v = 1;
 #endif
                valD[i] = v;
            }
index 7651b696dea162190a88eddf86322a234a8c024a..28d70a3cdad921310d7760b5266aca5d6771fd1e 100644 (file)
  * Contributors: See CVS logs. Details at http://www.graphviz.org/
  *************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "SparseMatrix.h"
 #include "spring_electrical.h"
 #include "QuadTree.h"