From e0e01b3ced5fb09958a902d0d0c06de914576549 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 19 Dec 2021 19:36:24 -0800 Subject: [PATCH] place_portlabel: [nfc] take a C99 bool parameter instead of a boolean --- lib/common/render.h | 2 +- lib/common/splines.c | 6 +++--- lib/dotgen/dotsplines.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/common/render.h b/lib/common/render.h index 1beab295c..64b8def6f 100644 --- a/lib/common/render.h +++ b/lib/common/render.h @@ -120,7 +120,7 @@ extern "C" { RENDER_API bezier *new_spline(edge_t * e, int sz); RENDER_API char **parse_style(char *s); RENDER_API void place_graph_label(Agraph_t *); - RENDER_API int place_portlabel(edge_t * e, boolean head_p); + RENDER_API int place_portlabel(edge_t * e, bool head_p); RENDER_API void makePortLabels(edge_t * e); RENDER_API pointf edgeMidpoint(graph_t* g, edge_t * e); RENDER_API void addEdgeLabels(edge_t * e, pointf rp, pointf rq); diff --git a/lib/common/splines.c b/lib/common/splines.c index 12a766572..718b550ee 100644 --- a/lib/common/splines.c +++ b/lib/common/splines.c @@ -1240,11 +1240,11 @@ void makePortLabels(edge_t * e) if (!E_labelangle && !E_labeldistance) return; if (ED_head_label(e) && !ED_head_label(e)->set) { - if (place_portlabel(e, TRUE)) + if (place_portlabel(e, true)) updateBB(agraphof(agtail(e)), ED_head_label(e)); } if (ED_tail_label(e) && !ED_tail_label(e)->set) { - if (place_portlabel(e, FALSE)) + if (place_portlabel(e, false)) updateBB(agraphof(agtail(e)), ED_tail_label(e)); } } @@ -1361,7 +1361,7 @@ void addEdgeLabels(edge_t * e, pointf rp, pointf rq) * and head is at spl->list[spl->size-l].list[bez->size-1] * Return 1 on success */ -int place_portlabel(edge_t * e, boolean head_p) +int place_portlabel(edge_t * e, bool head_p) { textlabel_t *l; splines *spl; diff --git a/lib/dotgen/dotsplines.c b/lib/dotgen/dotsplines.c index 68035683b..a40e86a11 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -542,7 +542,7 @@ finish : if (E_headlabel) { for (e = agfstin(g, n); e; e = agnxtin(g, e)) if (ED_head_label(AGMKOUT(e))) { - place_portlabel(AGMKOUT(e), TRUE); + place_portlabel(AGMKOUT(e), true); updateBB(g, ED_head_label(AGMKOUT(e))); } @@ -550,7 +550,7 @@ finish : if (E_taillabel) { for (e = agfstout(g, n); e; e = agnxtout(g, e)) { if (ED_tail_label(e)) { - if (place_portlabel(e, FALSE)) + if (place_portlabel(e, false)) updateBB(g, ED_tail_label(e)); } } -- 2.40.0