From 2b79bb0556de14178309d6a4d19f9ab316f35404 Mon Sep 17 00:00:00 2001 From: arif Date: Mon, 15 Jun 2009 16:26:11 +0000 Subject: [PATCH] few changes to make sfdp fit to WIN32 env. --- lib/neatogen/gvneatogen.vcproj | 2 +- lib/sfdpgen/Makefile.am | 2 +- lib/sfdpgen/QuadTree.c | 7 +- lib/sfdpgen/post_process.c | 2 +- lib/sfdpgen/sfdp.vcproj | 200 +++++++++++++++++++++++++++++++++ lib/sfdpgen/sfdpinit.c | 4 +- 6 files changed, 208 insertions(+), 9 deletions(-) create mode 100644 lib/sfdpgen/sfdp.vcproj diff --git a/lib/neatogen/gvneatogen.vcproj b/lib/neatogen/gvneatogen.vcproj index b49b2a9ec..029564e94 100644 --- a/lib/neatogen/gvneatogen.vcproj +++ b/lib/neatogen/gvneatogen.vcproj @@ -101,7 +101,7 @@ /> - typedef double real; - +#include "geom.h" +#include "arith.h" #include "QuadTree.h" #include "memory.h" -#include "arith.h" #include "math.h" #define MALLOC gmalloc #define REALLOC grealloc @@ -77,7 +76,7 @@ real* node_data_get_coord(void *d){ int node_data_get_id(void *d){ node_data nd = (node_data) d; - return nd->id; + return (int)nd->id; } #define node_data_get_data(d) (((node_data) (d))->data) diff --git a/lib/sfdpgen/post_process.c b/lib/sfdpgen/post_process.c index ec52d7050..84b4a372d 100644 --- a/lib/sfdpgen/post_process.c +++ b/lib/sfdpgen/post_process.c @@ -352,7 +352,7 @@ void StressMajorizationSmoother_smooth(StressMajorizationSmoother sm, int dim, r } maxit = sqrt((double) m); - res = SparseMatrix_solve(Lw, dim, x, y, 0.01, maxit, SOLVE_METHOD_CG, &flag); + res = SparseMatrix_solve(Lw, dim, x, y, 0.01, (int)maxit, SOLVE_METHOD_CG, &flag); if (flag) goto RETURN; diff --git a/lib/sfdpgen/sfdp.vcproj b/lib/sfdpgen/sfdp.vcproj new file mode 100644 index 000000000..6ba3711b8 --- /dev/null +++ b/lib/sfdpgen/sfdp.vcproj @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/sfdpgen/sfdpinit.c b/lib/sfdpgen/sfdpinit.c index f46b36a32..8c422de1b 100644 --- a/lib/sfdpgen/sfdpinit.c +++ b/lib/sfdpgen/sfdpinit.c @@ -248,9 +248,9 @@ tuneControl (graph_t* g, spring_electrical_control ctrl) void sfdp_layout(graph_t * g) { int doAdjust; - sfdp_init_graph(g); - doAdjust = (Ndim == 2); adjust_data am; + sfdp_init_graph(g); + doAdjust = (Ndim == 2); if (agnnodes(g)) { Agraph_t **ccs; -- 2.40.0