From b14196fb3408654776444e8896246980bc8960de Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 23 Aug 2020 16:29:26 -0700 Subject: [PATCH] disambiguate cmd/gvmap #includes Related to #1785. --- cmd/gvmap/Makefile.am | 1 + cmd/gvmap/cluster.c | 22 +++++++++++----------- cmd/gvmap/country_graph_coloring.c | 8 ++------ cmd/gvmap/country_graph_coloring.h | 2 +- cmd/gvmap/gvmap.c | 24 ++++++++++++------------ cmd/gvmap/gvmap.vcxproj | 4 ++-- cmd/gvmap/make_map.c | 22 ++++++++++------------ cmd/gvmap/make_map.h | 4 ++-- cmd/gvmap/power.c | 2 +- cmd/gvmap/power.h | 2 +- 10 files changed, 43 insertions(+), 48 deletions(-) diff --git a/cmd/gvmap/Makefile.am b/cmd/gvmap/Makefile.am index 4c9a3121c..96773cc5a 100644 --- a/cmd/gvmap/Makefile.am +++ b/cmd/gvmap/Makefile.am @@ -4,6 +4,7 @@ pdfdir = $(pkgdatadir)/doc/pdf AM_CPPFLAGS = \ + -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/common \ -I$(top_srcdir)/lib/neatogen \ -I$(top_srcdir)/lib/sfdpgen \ diff --git a/cmd/gvmap/cluster.c b/cmd/gvmap/cluster.c index 6840d4494..7c4c5c19d 100644 --- a/cmd/gvmap/cluster.c +++ b/cmd/gvmap/cluster.c @@ -16,20 +16,20 @@ #include #include #define STANDALONE -#include "general.h" -#include "QuadTree.h" +#include +#include #include -#include "SparseMatrix.h" +#include #include -#include "string.h" +#include #include "make_map.h" -#include "spring_electrical.h" -#include "post_process.h" -#include "overlap.h" -#include "clustering.h" -#include "ingraphs.h" -#include "DotIO.h" -#include "colorutil.h" +#include +#include +#include +#include +#include +#include +#include #ifdef _WIN32 /*dependencies*/ #pragma comment( lib, "cgraph.lib" ) diff --git a/cmd/gvmap/country_graph_coloring.c b/cmd/gvmap/country_graph_coloring.c index 86db10a58..4b4dc5e1e 100644 --- a/cmd/gvmap/country_graph_coloring.c +++ b/cmd/gvmap/country_graph_coloring.c @@ -16,12 +16,8 @@ #include #include "power.h" -/* #include "general.h" */ -/* #include "SparseMatrix.h" */ -/* #include "country_graph_coloring.h" */ -/* #include "power.h" */ -#include "PriorityQueue.h" -#include "time.h" +#include +#include /* int Verbose = FALSE; */ diff --git a/cmd/gvmap/country_graph_coloring.h b/cmd/gvmap/country_graph_coloring.h index 24fa32be0..086320c19 100644 --- a/cmd/gvmap/country_graph_coloring.h +++ b/cmd/gvmap/country_graph_coloring.h @@ -14,7 +14,7 @@ #ifndef COUNTRY_GRAPH_CLUSTERING_H #define COUNTRY_GRAPH_CLUSTERING_H -#include +#include enum {DO_SWAPPING = 1, DO_SWAPPING_CHEAP}; diff --git a/cmd/gvmap/gvmap.c b/cmd/gvmap/gvmap.c index 7550177af..66429e77b 100644 --- a/cmd/gvmap/gvmap.c +++ b/cmd/gvmap/gvmap.c @@ -16,21 +16,21 @@ #include #include #define STANDALONE -#include "general.h" -#include "QuadTree.h" +#include +#include #include -#include "SparseMatrix.h" +#include #include -#include "string.h" +#include #include "make_map.h" -#include "spring_electrical.h" -#include "post_process.h" -#include "overlap.h" -#include "clustering.h" -#include "ingraphs.h" -#include "DotIO.h" -#include "colorutil.h" -#include "color_palette.h" +#include +#include +#include +#include +#include +#include +#include +#include #ifdef _WIN32 #define strdup(x) _strdup(x) diff --git a/cmd/gvmap/gvmap.vcxproj b/cmd/gvmap/gvmap.vcxproj index b4073c3bd..a8ed94c87 100644 --- a/cmd/gvmap/gvmap.vcxproj +++ b/cmd/gvmap/gvmap.vcxproj @@ -51,7 +51,7 @@ Disabled - $(SolutionDir)windows\include;$(SolutionDir)windows\getopt;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\edgepaint;$(SolutionDir)lib\ingraphs;$(SolutionDir)lib\neatogen;$(SolutionDir)lib\sfdpgen;$(SolutionDir)lib\sparse;%(AdditionalIncludeDirectories) + $(SolutionDir)windows\include;$(SolutionDir)windows\getopt;$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\edgepaint;$(SolutionDir)lib\ingraphs;$(SolutionDir)lib\neatogen;$(SolutionDir)lib\sfdpgen;$(SolutionDir)lib\sparse;%(AdditionalIncludeDirectories) _DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks @@ -72,7 +72,7 @@ - $(SolutionDir)windows\include;$(SolutionDir)windows\getopt;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\edgepaint;$(SolutionDir)lib\ingraphs;$(SolutionDir)lib\neatogen;$(SolutionDir)lib\sfdpgen;$(SolutionDir)lib\sparse;%(AdditionalIncludeDirectories) + $(SolutionDir)windows\include;$(SolutionDir)windows\getopt;$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\edgepaint;$(SolutionDir)lib\ingraphs;$(SolutionDir)lib\neatogen;$(SolutionDir)lib\sfdpgen;$(SolutionDir)lib\sparse;%(AdditionalIncludeDirectories) NDEBUG;_CONSOLE;%(PreprocessorDefinitions) Level4 diff --git a/cmd/gvmap/make_map.c b/cmd/gvmap/make_map.c index 1ac91462d..04a71aa4b 100644 --- a/cmd/gvmap/make_map.c +++ b/cmd/gvmap/make_map.c @@ -12,19 +12,17 @@ *************************************************************************/ #define STANDALONE -#include "SparseMatrix.h" -#include "general.h" +#include +#include #include -#include "QuadTree.h" -#include "string.h" -/* #include "types.h" */ -#include +#include +#include +#include #include "make_map.h" -/* #include "ps.h" */ -#include "stress_model.h" +#include #include "country_graph_coloring.h" -#include "colorutil.h" -#include "delaunay.h" +#include +#include #ifdef SINGLE #define REAL float @@ -33,8 +31,8 @@ #endif /* not SINGLE */ /* #include "triangle.h" */ -#include "lab.h" -#include "node_distinct_coloring.h" +#include +#include void map_palette_optimal_coloring(char *color_scheme, char *lightness, SparseMatrix A0, real accuracy, int seed, float **rgb_r, float **rgb_g, float **rgb_b){ diff --git a/cmd/gvmap/make_map.h b/cmd/gvmap/make_map.h index 15d5d5ec8..2e3e2dd73 100644 --- a/cmd/gvmap/make_map.h +++ b/cmd/gvmap/make_map.h @@ -14,8 +14,8 @@ #ifndef MAKE_MAP_H #define MAKE_MAP_H -#include -#include +#include +#include int make_map_from_rectangle_groups(int exclude_random, int include_OK_points, int n, int dim, real *x, real *sizes, int *grouping, SparseMatrix graph, real bounding_box_margin[], int *nrandom,int *nart, int nedgep, diff --git a/cmd/gvmap/power.c b/cmd/gvmap/power.c index 4b0a29086..0a006b831 100644 --- a/cmd/gvmap/power.c +++ b/cmd/gvmap/power.c @@ -12,7 +12,7 @@ *************************************************************************/ #include "power.h" -#include "SparseMatrix.h" +#include void power_method(void (*matvec)(void *, int, int, real*, real **, int, int*), void *A, int n, int K, int random_seed, int maxit, real tol, real **eigv, real **eigs){ diff --git a/cmd/gvmap/power.h b/cmd/gvmap/power.h index 74296bcb6..88a526e37 100644 --- a/cmd/gvmap/power.h +++ b/cmd/gvmap/power.h @@ -14,7 +14,7 @@ #ifndef POWER_H #define POWER_H -#include +#include /* if you have a standard dense/sparse matrix, set matvec to matvec_dense/matvec_sparse*/ void power_method(void (*matvec)(void *M, int m, int n, real *u, real **v, int transposed, int *flag), -- 2.40.0