From: Matthew Fernandez Date: Thu, 20 May 2021 00:34:15 +0000 (-0700) Subject: use C99 bools for some boolean gvmap flags X-Git-Tag: 2.47.3~26^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1a27fb3fead92753c34ecf60adffbd7f40427a9;p=graphviz use C99 bools for some boolean gvmap flags This leads to slightly clearer and more readable code. --- diff --git a/cmd/gvmap/gvmap.c b/cmd/gvmap/gvmap.c index 73032c712..312580d17 100644 --- a/cmd/gvmap/gvmap.c +++ b/cmd/gvmap/gvmap.c @@ -10,6 +10,7 @@ #include "config.h" +#include #include #include #define STANDALONE @@ -40,7 +41,7 @@ typedef struct { real bbox_margin[2]; int useClusters; int clusterMethod; - int plotedges; + bool plotedges; int color_scheme; real line_width; char *color_scheme_str; @@ -49,7 +50,7 @@ typedef struct { real *bg_color; int improve_contiguity_n; int nart; - int color_optimize; + bool color_optimize; int maxcluster; int nedgep; char *line_color; @@ -166,7 +167,7 @@ init(int argc, char **argv, params_t* pm) pm->highlight_cluster = 0; pm->useClusters = 0; pm->clusterMethod = CLUSTERING_MODULARITY; - pm->plotedges = 0; + pm->plotedges = false; pm->show_points = 0; pm->color_scheme = COLOR_SCHEME_PASTEL; pm->line_width = 0; @@ -174,7 +175,7 @@ init(int argc, char **argv, params_t* pm) pm->bg_color = NULL; pm->improve_contiguity_n = 0; pm->nart = -1; - pm->color_optimize = 1; + pm->color_optimize = true; pm->maxcluster = 0; pm->nedgep = 0; @@ -242,13 +243,13 @@ init(int argc, char **argv, params_t* pm) pm->useClusters = 1; break; case 'e': - pm->plotedges = 1; + pm->plotedges = true; break; case 'o': pm->outfile = openFile(optarg, "w", pm->cmd); break; case 'O': - pm->color_optimize = 0; + pm->color_optimize = false; break; case 'a': if ((sscanf(optarg,"%d",&r) > 0)){