]> granicus.if.org Git - graphviz/commitdiff
write_plain: take a C99 bool for 'extend' parameter
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 13 Nov 2021 01:18:06 +0000 (17:18 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 15 Nov 2021 15:54:17 +0000 (07:54 -0800)
lib/common/output.c
lib/common/utils.h
plugin/core/gvrender_core_dot.c

index 1174b9ea24b44f8019e98d79e39f9a14e9b3312d..c60357f2eb89505f66fad530ede3ca8f981c9146 100644 (file)
@@ -12,6 +12,7 @@
 #include <cgraph/agxbuf.h>
 #include <gvc/gvc.h>
 #include <stdarg.h>
+#include <stdbool.h>
 #include <string.h>
 
 #define YDIR(y) (Y_invert ? (Y_off - (y)) : (y))
@@ -108,8 +109,7 @@ static void writenodeandport(FILE * f, node_t * node, char *port)
 
 /* _write_plain:
  */
-void write_plain(GVJ_t * job, graph_t * g, FILE * f, boolean extend)
-{
+void write_plain(GVJ_t *job, graph_t *g, FILE *f, bool extend) {
     int i, j, splinePoints;
     char *tport, *hport;
     node_t *n;
index 984accd15f3f59c6d29336d614feb41b94293cb5..80d231749444ea61e3af053d29493441c9e68d2d 100644 (file)
@@ -63,7 +63,7 @@ extern "C" {
                              int (*cb)(void *state, const char *s),
                              void *state);
 
-    UTILS_API void write_plain(GVJ_t * job, graph_t * g, FILE * f, boolean extend);
+    UTILS_API void write_plain(GVJ_t *job, graph_t *g, FILE *f, bool extend);
     UTILS_API double yDir (double y);
     UTILS_API char *ps_string(char *s, int);
     UTILS_API char *strdup_and_subst_obj(char *str, void *obj);
index d3105371df19c496134ca3b4235c80cd7d37bf24..99e8adfa63b51405241ceef7cc0e665a8a62937d 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <limits.h>
 #include <stdarg.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
@@ -524,10 +525,10 @@ static void dot_end_graph(GVJ_t *job)
     g->clos->disc.io = &io;
     switch (job->render.id) {
        case FORMAT_PLAIN:
-           write_plain(job, g, (FILE*)job, FALSE);
+           write_plain(job, g, (FILE*)job, false);
            break;
        case FORMAT_PLAIN_EXT:
-           write_plain(job, g, (FILE*)job, TRUE);
+           write_plain(job, g, (FILE*)job, true);
            break;
        case FORMAT_DOT:
        case FORMAT_CANON: