From: Emden R. Gansner Date: Mon, 3 Mar 2014 18:36:13 +0000 (-0500) Subject: Tweaks to files for Windows build. X-Git-Tag: 2.38.0~42^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=376c89af52e9e224feb73311bc8304ef5c467672;p=graphviz Tweaks to files for Windows build. --- diff --git a/cmd/edgepaint/edgepaint.vcproj b/cmd/edgepaint/edgepaint.vcproj index 6a8fea602..719c63745 100644 --- a/cmd/edgepaint/edgepaint.vcproj +++ b/cmd/edgepaint/edgepaint.vcproj @@ -2,9 +2,9 @@ @@ -41,7 +41,7 @@ diff --git a/cmd/edgepaint/edgepaintmain.c b/cmd/edgepaint/edgepaintmain.c index bf082e759..9ae1be9e9 100644 --- a/cmd/edgepaint/edgepaintmain.c +++ b/cmd/edgepaint/edgepaintmain.c @@ -18,7 +18,7 @@ #pragma comment( lib, "ingraphs.lib" ) #pragma comment( lib, "sparse.lib" ) #pragma comment( lib, "sfdp.lib" ) - #pragma comment( lib, "clarifylib.lib" ) + #pragma comment( lib, "edgepaintlib.lib" ) #pragma comment( lib, "neatogen.lib" ) #pragma comment( lib, "rbtree.lib" ) #pragma comment( lib, "cdt.lib" ) diff --git a/lib/common/render.h b/lib/common/render.h index 9515ded74..5ae9773ae 100644 --- a/lib/common/render.h +++ b/lib/common/render.h @@ -57,11 +57,6 @@ extern "C" { } epsf_t; typedef void (*nodesizefn_t) (Agnode_t *, boolean); -#ifdef GVDLL -#define extern __declspec(dllexport) -#else -#define extern -#endif /*visual studio*/ #ifdef WIN32_DLL diff --git a/lib/common/utils.h b/lib/common/utils.h index 5a3d1097d..fe0ba62ff 100644 --- a/lib/common/utils.h +++ b/lib/common/utils.h @@ -19,12 +19,6 @@ extern "C" { #endif -#ifdef GVDLL -#define extern __declspec(dllexport) -#else -#define extern -#endif - /*visual studio*/ #ifdef WIN32_DLL #ifndef GVC_EXPORTS diff --git a/lib/edgepaint/edge_distinct_coloring.h b/lib/edgepaint/edge_distinct_coloring.h index a059f7f9c..725228344 100644 --- a/lib/edgepaint/edge_distinct_coloring.h +++ b/lib/edgepaint/edge_distinct_coloring.h @@ -11,6 +11,6 @@ #ifndef EDGE_DISTINCT_COLORING_H #define EDGE_DISTINCT_COLORING_H -Agraph_t* edge_distinct_coloring(char *color_scheme, char *lightness, Agraph_t* g, real angle, real accuracy, real check_edges_with_same_endpoint, int seed); +Agraph_t* edge_distinct_coloring(char *color_scheme, char *lightness, Agraph_t* g, real angle, real accuracy, int check_edges_with_same_endpoint, int seed); #endif diff --git a/lib/neatogen/neatoprocs.h b/lib/neatogen/neatoprocs.h index 0a8dce67b..2339a25e8 100644 --- a/lib/neatogen/neatoprocs.h +++ b/lib/neatogen/neatoprocs.h @@ -18,11 +18,6 @@ extern "C" { #endif #include "adjust.h" -#ifdef GVDLL -#define extern __declspec(dllexport) -#else -#define extern -#endif extern int allow_edits(int); extern void avoid_cycling(graph_t *, Agnode_t *, double *); @@ -32,7 +27,6 @@ extern "C" { extern void D2E(Agraph_t *, int, int, double *); extern void diffeq_model(graph_t *, int); extern double distvec(double *, double *, double *); - extern void do_graph_label(Agraph_t *); extern void final_energy(graph_t *, int); extern double fpow32(double); extern Ppolyline_t getPath(edge_t *, vconfig_t *, int, Ppoly_t **, diff --git a/lib/pack/pack.h b/lib/pack/pack.h index 57660dd27..bd0e1e9c6 100644 --- a/lib/pack/pack.h +++ b/lib/pack/pack.h @@ -56,11 +56,6 @@ typedef unsigned int packval_t; packval_t* vals; /* for arrays, sort numbers */ int flags; } pack_info; -#ifdef GVDLL -#define extern __declspec(dllexport) -#else -#define extern -#endif /*visual studio*/ #ifdef WIN32_DLL diff --git a/lib/sfdpgen/post_process.c b/lib/sfdpgen/post_process.c index 32afa6c66..9ad29ea05 100644 --- a/lib/sfdpgen/post_process.c +++ b/lib/sfdpgen/post_process.c @@ -341,7 +341,7 @@ StressMajorizationSmoother StressMajorizationSmoother2_new(SparseMatrix A, int d sm->data = NULL; sm->scheme = SM_SCHEME_NORMAL; sm->tol_cg = 0.01; - sm->maxit_cg = sqrt((double) A->m); + sm->maxit_cg = (int)sqrt((double) A->m); lambda = sm->lambda = N_GNEW(m,real); for (i = 0; i < m; i++) sm->lambda[i] = lambda0; @@ -543,7 +543,7 @@ StressMajorizationSmoother SparseStressMajorizationSmoother_new(SparseMatrix A, sm->scheme = SM_SCHEME_NORMAL; sm->D = A; sm->tol_cg = 0.01; - sm->maxit_cg = sqrt((double) A->m); + sm->maxit_cg = (int)sqrt((double) A->m); lambda = sm->lambda = MALLOC(sizeof(real)*m); for (i = 0; i < m; i++) sm->lambda[i] = lambda0; @@ -652,7 +652,7 @@ static real total_distance(int m, int dim, real* x, real* y){ void SparseStressMajorizationSmoother_delete(SparseStressMajorizationSmoother sm){ - return StressMajorizationSmoother_delete(sm); + StressMajorizationSmoother_delete(sm); } @@ -696,7 +696,7 @@ static void get_edge_label_matrix(relative_position_constraints data, int m, int for (i = 0; i < n_constr_nodes; i++){ ii = constr_nodes[i]; k = ia[ii+1] - ia[ii];/*usually k = 2 */ - nz += (k+1)*(k+1); + nz += (int)((k+1)*(k+1)); } irn = data->irn = MALLOC(sizeof(int)*nz); @@ -1054,7 +1054,7 @@ TriangleSmoother TriangleSmoother_new(SparseMatrix A, int dim, real lambda0, rea sm->data = NULL; sm->scheme = SM_SCHEME_NORMAL; sm->tol_cg = 0.01; - sm->maxit_cg = sqrt((double) A->m); + sm->maxit_cg = (int)sqrt((double) A->m); lambda = sm->lambda = N_GNEW(m,real); for (i = 0; i < m; i++) sm->lambda[i] = lambda0; diff --git a/lib/sfdpgen/sfdp.vcproj b/lib/sfdpgen/sfdp.vcproj index d7eca114b..64084698e 100644 --- a/lib/sfdpgen/sfdp.vcproj +++ b/lib/sfdpgen/sfdp.vcproj @@ -1,207 +1,203 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/sfdpgen/spring_electrical.c b/lib/sfdpgen/spring_electrical.c index 29485cd63..13d084a2b 100644 --- a/lib/sfdpgen/spring_electrical.c +++ b/lib/sfdpgen/spring_electrical.c @@ -2259,6 +2259,6 @@ void multilevel_spring_electrical_embedding(int dim, SparseMatrix A, SparseMatri #else void multilevel_spring_electrical_embedding(int dim, SparseMatrix A, SparseMatrix D, spring_electrical_control ctrl, real *node_weights, real *label_sizes, real *x, int n_edge_label_nodes, int *edge_label_nodes, int *flag){ - return multilevel_spring_electrical_embedding_core(dim, A, D, ctrl, node_weights, label_sizes, x, n_edge_label_nodes, edge_label_nodes, flag); + multilevel_spring_electrical_embedding_core(dim, A, D, ctrl, node_weights, label_sizes, x, n_edge_label_nodes, edge_label_nodes, flag); } #endif diff --git a/lib/sfdpgen/stress_model.c b/lib/sfdpgen/stress_model.c index b42a51868..b53bc404b 100644 --- a/lib/sfdpgen/stress_model.c +++ b/lib/sfdpgen/stress_model.c @@ -96,7 +96,7 @@ void stress_model(int dim, SparseMatrix A, SparseMatrix D, real **x, int edge_le } #else void stress_model(int dim, SparseMatrix A, SparseMatrix D, real **x, int edge_len_weighted, int maxit_sm, real tol, int *flag){ - return stress_model_core(dim, D, x, edge_len_weighted, maxit_sm, tol, flag); + stress_model_core(dim, D, x, edge_len_weighted, maxit_sm, tol, flag); } #endif diff --git a/lib/sfdpgen/uniform_stress.c b/lib/sfdpgen/uniform_stress.c index c8bf7fc38..23269079c 100644 --- a/lib/sfdpgen/uniform_stress.c +++ b/lib/sfdpgen/uniform_stress.c @@ -45,7 +45,7 @@ UniformStressSmoother UniformStressSmoother_new(int dim, SparseMatrix A, real *x ((real*) sm->data)[1] = M; sm->data_deallocator = FREE; sm->tol_cg = 0.01; - sm->maxit_cg = sqrt((double) A->m); + sm->maxit_cg = (int)sqrt((double) A->m); /* Lw and Lwd have diagonals */ sm->Lw = SparseMatrix_new(m, m, A->nz + m, MATRIX_TYPE_REAL, FORMAT_CSR); diff --git a/lib/sparse/SparseMatrix.c b/lib/sparse/SparseMatrix.c index 914824cc9..d38abe656 100644 --- a/lib/sparse/SparseMatrix.c +++ b/lib/sparse/SparseMatrix.c @@ -2328,8 +2328,7 @@ SparseMatrix SparseMatrix_to_complex(SparseMatrix A){ case MATRIX_TYPE_INTEGER:{ int *a = (int*) A->a; int nz = A->nz; - A->a = MALLOC(2*sizeof(real)*nz); - real *aa = A->a; + real *aa = A->a = MALLOC(2*sizeof(real)*nz); for (i = nz - 1; i >= 0; i--){ aa[2*i] = (real) a[i]; aa[2*i - 1] = 0; diff --git a/lib/sparse/general.c b/lib/sparse/general.c index 7bdc79e4f..ac9f18c18 100644 --- a/lib/sparse/general.c +++ b/lib/sparse/general.c @@ -12,6 +12,7 @@ *************************************************************************/ #include "general.h" +#include #ifdef DEBUG double _statistics[10]; @@ -353,8 +354,9 @@ int digitsQ(char *s){ int validQ_int_string(char *to_convert, int *v){ /* check to see if this is a string is integer */ char *p = to_convert; - int errno = 0; - long val = strtoul(to_convert, &p, 10); + unsigned long val; + errno = 0; + val = strtoul(to_convert, &p, 10); if (errno != 0 ||// conversion failed (EINVAL, ERANGE) to_convert == p || // conversion failed (no characters consumed) *p != 0 diff --git a/lib/sparse/gvsparse.vcproj b/lib/sparse/gvsparse.vcproj index c9caccb5e..c987d1be1 100644 --- a/lib/sparse/gvsparse.vcproj +++ b/lib/sparse/gvsparse.vcproj @@ -1,219 +1,223 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +