From: Matthew Fernandez Date: Sun, 19 Dec 2021 20:20:58 +0000 (-0800) Subject: beginpath: [nfc] use a C99 bool for a parameter instead of a boolean X-Git-Tag: 3.0.0~119^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9bb7e6cc51535bef4826a6bb35d8e5d3274eb335;p=graphviz beginpath: [nfc] use a C99 bool for a parameter instead of a boolean --- diff --git a/lib/common/render.h b/lib/common/render.h index 87f5b7f93..1db1f6b19 100644 --- a/lib/common/render.h +++ b/lib/common/render.h @@ -19,6 +19,7 @@ extern "C" { #ifdef HAVE_SYS_TYPES_H #include #endif +#include #if !defined(_WIN32) && !defined(DARWIN) #define __USE_GNU #include @@ -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, diff --git a/lib/common/splines.c b/lib/common/splines.c index e9bd1b9ae..dcac89bf4 100644 --- a/lib/common/splines.c +++ b/lib/common/splines.c @@ -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; diff --git a/lib/dotgen/dotsplines.c b/lib/dotgen/dotsplines.c index 7d7d80ab5..744d988b0 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -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)