]> granicus.if.org Git - graphviz/commitdiff
beginpath: [nfc] use a C99 bool for a parameter instead of a boolean
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 19 Dec 2021 20:20:58 +0000 (12:20 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 20 Dec 2021 00:14:25 +0000 (16:14 -0800)
lib/common/render.h
lib/common/splines.c
lib/dotgen/dotsplines.c

index 87f5b7f931bcf85b8c9352463fd3aff7766d6090..1db1f6b19d746c78f41496428c4fe0efc4b5d126 100644 (file)
@@ -19,6 +19,7 @@ extern "C" {
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
+#include <stdbool.h>
 #if !defined(_WIN32) && !defined(DARWIN)
 #define __USE_GNU
 #include <stdlib.h>
@@ -73,7 +74,7 @@ extern "C" {
     RENDER_API int arrowEndClip(edge_t*, pointf*, int, int , bezier*, int eflag);
     RENDER_API int arrowStartClip(edge_t*, pointf* ps, int, int, bezier*, int sflag);
     RENDER_API void arrowOrthoClip(edge_t*, pointf* ps, int, int, bezier*, int sflag, int eflag);
-    RENDER_API void beginpath(path *, Agedge_t *, int, pathend_t *, boolean);
+    RENDER_API void beginpath(path *, Agedge_t *, int, pathend_t *, bool);
     RENDER_API void bezier_clip(inside_t * inside_context,
                            boolean(*insidefn) (inside_t * inside_context,
                                                pointf p), pointf * sp,
index e9bd1b9ae566b96563a17029c83cbdcabde5c49a..dcac89bf4659181184f95905b2aad9797cbb881e 100644 (file)
@@ -387,7 +387,7 @@ void add_box(path * P, boxf b)
 #define HT2(n) (ND_ht(n)/2)
 
 void
-beginpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
+beginpath(path * P, edge_t * e, int et, pathend_t * endp, bool merge)
 {
     int side, mask;
     node_t *n;
index 7d7d80ab5e7cdead061258ff78c4f37fc8977a29..744d988b07eea368e7eae655e19058d912c4d876 100644 (file)
@@ -1393,7 +1393,7 @@ makeFlatEnd (graph_t* g, spline_info_t* sp, path* P, node_t* n, edge_t* e, pathe
 
     b = endp->nb = maximal_bbox(g, sp, n, NULL, e);
     endp->sidemask = TOP;
-    if (isBegin) beginpath(P, e, FLATEDGE, endp, FALSE);
+    if (isBegin) beginpath(P, e, FLATEDGE, endp, false);
     else endpath(P, e, FLATEDGE, endp, FALSE);
     b.UR.y = endp->boxes[endp->boxn - 1].UR.y;
     b.LL.y = endp->boxes[endp->boxn - 1].LL.y;
@@ -1411,7 +1411,7 @@ makeBottomFlatEnd (graph_t* g, spline_info_t* sp, path* P, node_t* n, edge_t* e,
 
     b = endp->nb = maximal_bbox(g, sp, n, NULL, e);
     endp->sidemask = BOTTOM;
-    if (isBegin) beginpath(P, e, FLATEDGE, endp, FALSE);
+    if (isBegin) beginpath(P, e, FLATEDGE, endp, false);
     else endpath(P, e, FLATEDGE, endp, FALSE);
     b.UR.y = endp->boxes[endp->boxn - 1].UR.y;
     b.LL.y = endp->boxes[endp->boxn - 1].LL.y;
@@ -1852,7 +1852,7 @@ make_regular_edge(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int
        tn = agtail(e);
        hn = aghead(e);
        b = tend.nb = maximal_bbox(g, sp, tn, NULL, e);
-       beginpath(P, e, REGULAREDGE, &tend, spline_merge(tn));
+       beginpath(P, e, REGULAREDGE, &tend, spline_merge(tn) != FALSE);
        b.UR.y = tend.boxes[tend.boxn - 1].UR.y;
        b.LL.y = tend.boxes[tend.boxn - 1].LL.y;
        b = makeregularend(b, BOTTOM,
@@ -1919,7 +1919,7 @@ make_regular_edge(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int
            hn = aghead(e);
            boxes_clear(&boxes);
            tend.nb = maximal_bbox(g, sp, tn, ND_in(tn).list[0], e);
-           beginpath(P, e, REGULAREDGE, &tend, spline_merge(tn));
+           beginpath(P, e, REGULAREDGE, &tend, spline_merge(tn) != FALSE);
            b = makeregularend(tend.boxes[tend.boxn - 1], BOTTOM,
                       ND_coord(tn).y - GD_rank(g)[ND_rank(tn)].ht1);
            if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)