From: Matthew Fernandez Date: Mon, 27 Dec 2021 03:11:07 +0000 (-0800) Subject: getdoubles2ptf: return a C99 bool instead of boolean X-Git-Tag: 3.0.0~91^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=655f33c1898ed88f86111b942bb6fa1a8cdc30d6;p=graphviz getdoubles2ptf: return a C99 bool instead of boolean --- diff --git a/lib/common/input.c b/lib/common/input.c index f71966dfe..881cc3146 100644 --- a/lib/common/input.c +++ b/lib/common/input.c @@ -467,13 +467,12 @@ int dotneato_args_initialize(GVC_t * gvc, int argc, char **argv) * If only one number is given, it is used for both x and y. * Returns true if the attribute ends in '!'. */ -static boolean getdoubles2ptf(graph_t * g, char *name, pointf * result) -{ +static bool getdoubles2ptf(graph_t *g, char *name, pointf *result) { char *p; int i; double xf, yf; char c = '\0'; - boolean rv = FALSE; + bool rv = false; if ((p = agget(g, name))) { i = sscanf(p, "%lf,%lf%c", &xf, &yf, &c); @@ -481,14 +480,14 @@ static boolean getdoubles2ptf(graph_t * g, char *name, pointf * result) result->x = POINTS(xf); result->y = POINTS(yf); if (c == '!') - rv = TRUE; + rv = true; } else { c = '\0'; i = sscanf(p, "%lf%c", &xf, &c); if (i > 0 && xf > 0) { result->y = result->x = POINTS(xf); - if (c == '!') rv = TRUE; + if (c == '!') rv = true; } } } @@ -709,7 +708,7 @@ void graph_init(graph_t * g, bool use_rankdir) setRatio(g); GD_drawing(g)->filled = - getdoubles2ptf(g, "size", &(GD_drawing(g)->size)); + getdoubles2ptf(g, "size", &GD_drawing(g)->size) ? TRUE : FALSE; getdoubles2ptf(g, "page", &(GD_drawing(g)->page)); GD_drawing(g)->centered = mapbool(agget(g, "center"));