]> granicus.if.org Git - graphviz/commitdiff
use C99 bools for 'isVert' members instead of booleans
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 27 Dec 2021 02:57:49 +0000 (18:57 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 5 Jan 2022 16:04:04 +0000 (08:04 -0800)
lib/ortho/maze.c
lib/ortho/sgraph.h
lib/ortho/structures.h

index 201c0ed358c32851ee336eb2f31d4ae83e9feb07..a90ea124b1477bc60b750a95c3870b00293f5d16 100644 (file)
@@ -14,6 +14,7 @@
 #define DEBUG
 
 #include <math.h>
+#include <stdbool.h>
 #include <stddef.h>
 #include <ortho/maze.h>
 #include <ortho/partition.h>
@@ -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;
        }
index 2c8c5b315586e19413e9056c451ad1f775bd3198..228aa78d5c206da1f3f3da4de95761284fe9d482 100644 (file)
@@ -11,6 +11,7 @@
 #pragma once
 
 #include <ortho/structures.h>
+#include <stdbool.h>
 
 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 {
index c273ee0b0e807bf0aef21fc0a56d4a7b4f9eac9a..0f91e3fb3233a9eeec89f61d0a167b8f53f0a006 100644 (file)
@@ -13,6 +13,7 @@
 #include "types.h"
 #include "cgraph.h"
 #include <ortho/rawgraph.h>
+#include <stdbool.h>
 #include <stddef.h>
 
 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 */