From: Matthew Fernandez Date: Mon, 27 Dec 2021 02:57:49 +0000 (-0800) Subject: use C99 bools for 'isVert' members instead of booleans X-Git-Tag: 3.0.0~91^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=345df5c8461156c220e909ef7a89b84f00079c79;p=graphviz use C99 bools for 'isVert' members instead of booleans --- diff --git a/lib/ortho/maze.c b/lib/ortho/maze.c index 201c0ed35..a90ea124b 100644 --- a/lib/ortho/maze.c +++ b/lib/ortho/maze.c @@ -14,6 +14,7 @@ #define DEBUG #include +#include #include #include #include @@ -282,7 +283,7 @@ createSEdges (cell* cp, sgraph* g) } static snode* -findSVert (sgraph* g, Dt_t* cdt, pointf p, snodeitem* ditems, boolean isVert) +findSVert (sgraph* g, Dt_t* cdt, pointf p, snodeitem* ditems, bool isVert) { snodeitem* n = dtmatch (cdt, &p); @@ -343,24 +344,24 @@ mkMazeGraph (maze* mp, boxf bb) if (cp->bb.UR.x < bb.UR.x) { pt.x = cp->bb.UR.x; pt.y = cp->bb.LL.y; - np = findSVert (g, vdict, pt, ditems, TRUE); + np = findSVert(g, vdict, pt, ditems, true); np->cells[0] = cp; cp->sides[M_RIGHT] = np; } if (cp->bb.UR.y < bb.UR.y) { pt.x = cp->bb.LL.x; pt.y = cp->bb.UR.y; - np = findSVert (g, hdict, pt, ditems, FALSE); + np = findSVert(g, hdict, pt, ditems, false); np->cells[0] = cp; cp->sides[M_TOP] = np; } if (cp->bb.LL.x > bb.LL.x) { - np = findSVert (g, vdict, cp->bb.LL, ditems, TRUE); + np = findSVert(g, vdict, cp->bb.LL, ditems, true); np->cells[1] = cp; cp->sides[M_LEFT] = np; } if (cp->bb.LL.y > bb.LL.y) { - np = findSVert (g, hdict, cp->bb.LL, ditems, FALSE); + np = findSVert(g, hdict, cp->bb.LL, ditems, false); np->cells[1] = cp; cp->sides[M_BOTTOM] = np; } diff --git a/lib/ortho/sgraph.h b/lib/ortho/sgraph.h index 2c8c5b315..228aa78d5 100644 --- a/lib/ortho/sgraph.h +++ b/lib/ortho/sgraph.h @@ -11,6 +11,7 @@ #pragma once #include +#include typedef struct snode snode; typedef struct sedge sedge; @@ -28,7 +29,7 @@ struct snode { */ int* adj_edge_list; int index; - boolean isVert; /* true if node corresponds to vertical segment */ + bool isVert; /* true if node corresponds to vertical segment */ }; struct sedge { diff --git a/lib/ortho/structures.h b/lib/ortho/structures.h index c273ee0b0..0f91e3fb3 100644 --- a/lib/ortho/structures.h +++ b/lib/ortho/structures.h @@ -13,6 +13,7 @@ #include "types.h" #include "cgraph.h" #include +#include #include typedef struct { @@ -33,7 +34,7 @@ typedef enum {B_NODE, B_UP, B_LEFT, B_DOWN, B_RIGHT} bend; * and (3,8) has isVert = 1, common coordinate = 3, p1 = 2, p2 = 8 */ typedef struct segment { - boolean isVert; + bool isVert; boolean flipped; double comm_coord; /* the common coordinate */ paird p; /* end points */