]> granicus.if.org Git - graphviz/commitdiff
place_portlabel: [nfc] take a C99 bool parameter instead of a boolean
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 20 Dec 2021 03:36:24 +0000 (19:36 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 25 Dec 2021 18:38:17 +0000 (10:38 -0800)
lib/common/render.h
lib/common/splines.c
lib/dotgen/dotsplines.c

index 1beab295ca5fb8ed2faba046c4e0a9d14af76477..64b8def6ff175d761647627b0b69d9ce713cc2da 100644 (file)
@@ -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);
index 12a766572779d87461efbf0c6a8d204068c743ee..718b550eedf5b81c7eed530ba00e3aef2fe4c37b 100644 (file)
@@ -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;
index 68035683b1ef081ec192116a773f1e867b90cfb6..a40e86a115709528950e1f44d0ccde560975f69d 100644 (file)
@@ -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));
                    }
                }