]> granicus.if.org Git - graphviz/commitdiff
boolean -> bool (with configure checks and replacements for pre C99 compilers)
authorellson <devnull@localhost>
Tue, 18 Oct 2005 18:42:59 +0000 (18:42 +0000)
committerellson <devnull@localhost>
Tue, 18 Oct 2005 18:42:59 +0000 (18:42 +0000)
44 files changed:
cmd/gvpr/compile.c
cmd/tools/gvpack.c
configure.ac
lib/common/arrows.c
lib/common/emit.c
lib/common/figgen.c
lib/common/gdgen.c
lib/common/geom.c
lib/common/geom.h
lib/common/globals.h
lib/common/hpglgen.c
lib/common/input.c
lib/common/logic.h
lib/common/mifgen.c
lib/common/output.c
lib/common/postproc.c
lib/common/render.h
lib/common/shapes.c
lib/common/splines.c
lib/common/types.h
lib/common/utils.c
lib/common/utils.h
lib/dotgen/conc.c
lib/dotgen/dotprocs.h
lib/dotgen/dotsplines.c
lib/dotgen/flat.c
lib/dotgen/mincross.c
lib/dotgen/position.c
lib/fdpgen/fdp.h
lib/fdpgen/layout.c
lib/gvc/gvcint.h
lib/gvc/gvconfig.c
lib/gvc/gvcproc.h
lib/gvc/gvjobs.c
lib/gvc/gvlayout.c
lib/gvc/gvplugin.c
lib/gvc/gvplugin_render.h
lib/neatogen/defs.h
lib/neatogen/neatoinit.c
lib/neatogen/neatoprocs.h
lib/neatogen/neatosplines.c
lib/pack/ccomps.c
lib/pack/pack.c
lib/pack/pack.h

index 4abd0c78d8221950035fedb20b782e91093aa4b5..94f5558164be6c7d06e006064a54730a30e7badc 100644 (file)
@@ -1630,7 +1630,7 @@ static void checkGuard(Exnode_t * gp, char *src, int line)
            error_info.file = src;
            error_info.line = line;
        }
-       error(ERROR_WARNING, "assignment used as boolean in guard");
+       error(ERROR_WARNING, "assignment used as bool in guard");
     }
 }
 
index ddbe968686bec2f5fdf20340956c4b8fedf70dba..438253d0a0d80d01f1f27d9087507c042f65fe2e 100644 (file)
@@ -65,7 +65,7 @@ typedef struct {
 } pair_t;
 
 static int margin = 8;         /* Default margin in packing */
-static boolean doSplines = TRUE;       /* Use edges in packing */
+static bool doSplines = TRUE;  /* Use edges in packing */
 static pack_mode packMode = l_clust;   /* Default packing mode - use clusters */
 static int verbose = 0;
 static char **myFiles = 0;
@@ -241,7 +241,7 @@ static void init_node_edge(Agraph_t * g)
  * libcommon. If fill is true, we use init_nop (neato -n) to
  * read in attributes relevant to the layout.
  */
-static void init_graph(Agraph_t * g, boolean fill)
+static void init_graph(Agraph_t * g, bool fill)
 {
     int d;
 
@@ -584,7 +584,7 @@ static Agraph_t *cloneGraph(Agraph_t ** gs, int cnt)
     Dt_t *nnames;              /* dict of used node names */
     Agsym_t *G_bb;
     Agsym_t *rv;
-    boolean doWarn = TRUE;
+    bool doWarn = TRUE;
 
     if (verbose)
        fprintf(stderr, "Creating clone graph\n");
index fc51f923a911dddf54325c0958451e435c175c7e..281cb832d621a89420356e4f5de5f700fafd8e8f 100644 (file)
@@ -1245,6 +1245,7 @@ AC_CHECK_HEADERS(stdarg.h stddef.h stddef.h stdlib.h stdint.h malloc.h \
        sys/select.h fpu_control.h sys/fpu.h strings.h sys/socket.h sys/stat.h)
 AC_HEADER_TIME
 AC_HEADER_DIRENT
+AC_HEADER_STDBOOL
 
 # Check for socklen_t
 AC_MSG_CHECKING([for socklen_t])
index 909d30ad741da4b1473caf614558a67638075156..68e84fc4ededb28f6d3d5e337963ef00b191978a 100644 (file)
@@ -229,7 +229,7 @@ double arrow_length(edge_t * e, int flag)
 }
 
 /* inside function for calls to bezier_clip */
-static boolean inside(inside_t * inside_context, pointf p)
+static bool inside(inside_t * inside_context, pointf p)
 {
     return DIST2(p, inside_context->a.p[0]) <= inside_context->a.r[0];
 }
index 870493e58140534602b8243032cf7f8a5af608ba..75b882415ee49ec5152943352d2f5758fbb6bd18 100644 (file)
@@ -155,7 +155,7 @@ static void firstlayer(GVJ_t *job)
     job->layerNum = 1;
 }
 
-static boolean validlayer(GVJ_t *job)
+static bool validlayer(GVJ_t *job)
 {
     return (job->layerNum <= job->numLayers);
 }
@@ -310,7 +310,7 @@ static void firstpage(GVJ_t *job)
     job->pagesArrayElem = job->pagesArrayFirst;
 }
 
-static boolean validpage(GVJ_t *job)
+static bool validpage(GVJ_t *job)
 {
     return ((job->pagesArrayElem.x >= 0)
         && (job->pagesArrayElem.x < job->pagesArraySize.x)
@@ -330,7 +330,7 @@ static void nextpage(GVJ_t *job)
     }
 }
 
-static boolean write_edge_test(Agraph_t * g, Agedge_t * e)
+static bool write_edge_test(Agraph_t * g, Agedge_t * e)
 {
     Agraph_t *sg;
     int c;
@@ -343,7 +343,7 @@ static boolean write_edge_test(Agraph_t * g, Agedge_t * e)
     return TRUE;
 }
 
-static boolean write_node_test(Agraph_t * g, Agnode_t * n)
+static bool write_node_test(Agraph_t * g, Agnode_t * n)
 {
     Agraph_t *sg;
     int c;
@@ -432,7 +432,7 @@ fprintf(stderr,"pagesArrayElem = %d,%d pageSize = %g,%g pageOffset = %g,%g\n",
 }
 
 #if 0
-static boolean node_in_view(GVJ_t *job, node_t * n)
+static bool node_in_view(GVJ_t *job, node_t * n)
 {
     boxf b;
 
@@ -447,7 +447,7 @@ static boolean node_in_view(GVJ_t *job, node_t * n)
 }
 #endif
 
-static boolean is_natural_number(char *sstr)
+static bool is_natural_number(char *sstr)
 {
     unsigned char *str = (unsigned char *) sstr;
 
@@ -473,14 +473,14 @@ static int layer_index(GVC_t *gvc, char *str, int all)
     return -1;
 }
 
-static boolean selectedlayer(GVJ_t *job, char *spec)
+static bool selectedlayer(GVJ_t *job, char *spec)
 {
     GVC_t *gvc = job->gvc;
     int n0, n1;
     unsigned char buf[SMALLBUF];
     char *w0, *w1;
     agxbuf xb;
-    boolean rval = FALSE;
+    bool rval = FALSE;
 
     agxbinit(&xb, SMALLBUF, buf);
     agxbput(&xb, spec);
@@ -512,7 +512,7 @@ static boolean selectedlayer(GVJ_t *job, char *spec)
     return rval;
 }
 
-static boolean node_in_layer(GVJ_t *job, graph_t * g, node_t * n)
+static bool node_in_layer(GVJ_t *job, graph_t * g, node_t * n)
 {
     char *pn, *pe;
     edge_t *e;
@@ -534,7 +534,7 @@ static boolean node_in_layer(GVJ_t *job, graph_t * g, node_t * n)
     return FALSE;
 }
 
-static boolean edge_in_layer(GVJ_t *job, graph_t * g, edge_t * e)
+static bool edge_in_layer(GVJ_t *job, graph_t * g, edge_t * e)
 {
     char *pe, *pn;
     int cnt;
@@ -554,7 +554,7 @@ static boolean edge_in_layer(GVJ_t *job, graph_t * g, edge_t * e)
     return FALSE;
 }
 
-static boolean clust_in_layer(GVJ_t *job, graph_t * sg)
+static bool clust_in_layer(GVJ_t *job, graph_t * sg)
 {
     char *pg;
     node_t *n;
@@ -573,7 +573,7 @@ static boolean clust_in_layer(GVJ_t *job, graph_t * sg)
 }
 
 #if 1
-static boolean node_in_box(node_t *n, boxf b)
+static bool node_in_box(node_t *n, boxf b)
 {
     return boxf_overlap(ND_bb(n), b);
 }
@@ -689,7 +689,7 @@ static void emit_attachment(GVJ_t * job, textlabel_t * lp, splines * spl)
 }
 
 #if 0
-static boolean edge_in_view(GVJ_t *job, edge_t * e)
+static bool edge_in_view(GVJ_t *job, edge_t * e)
 {
     int i, j, np;
     bezier bz;
@@ -739,7 +739,7 @@ void emit_edge_graphics(GVJ_t * job, edge_t * e)
     bezierf bzf;
     splinesf offspl, tmpspl;
     pointf pf0, pf1, pf2 = { 0, 0 }, pf3, *offlist, *tmplist;
-    boolean saved = FALSE;
+    bool saved = FALSE;
     double scale, numc2;
     char *p;
     extern int xdemitState;
@@ -919,7 +919,7 @@ void emit_edge_graphics(GVJ_t * job, edge_t * e)
        gvrender_end_context(job);
 }
 
-static boolean edge_in_box(edge_t *e, boxf b)
+static bool edge_in_box(edge_t *e, boxf b)
 {
     splines *spl;
     textlabel_t *lp;
@@ -1472,7 +1472,7 @@ void emit_clusters(GVJ_t * job, Agraph_t * g, int flags)
     }
 }
 
-static boolean is_style_delim(int c)
+static bool is_style_delim(int c)
 {
     switch (c) {
     case '(':
@@ -1534,9 +1534,9 @@ static void cleanup(void)
 char **parse_style(char *s)
 {
     static char *parse[FUNLIMIT];
-    static boolean is_first = TRUE;
+    static bool is_first = TRUE;
     int fun = 0;
-    boolean in_parens = FALSE;
+    bool in_parens = FALSE;
     unsigned char buf[SMALLBUF];
     char *p;
     int c;
index b846ab92c2e123c1aee9d1cfdf03b2ead57b18e8..ad8fe562872e5f43c2449d758bdb9ca1acd3afdb 100644 (file)
@@ -604,7 +604,7 @@ static void fig_polyline(point * A, int n)
 
 static void fig_user_shape(char *name, point * A, int n, int filled)
 {
-    static boolean onetime = TRUE;
+    static bool onetime = TRUE;
     if (onetime) {
        agerr(AGERR, "custom shapes not available with this driver\n");
        onetime = FALSE;
index a6cb5964ab7c2b4e1fff8583c74b6a5aecf733a6..ef7be1846c1550d7db51741455e5d69a188be590 100644 (file)
@@ -189,9 +189,9 @@ static void init2_gd(gdImagePtr im)
     cstk[0].penwidth = WIDTH_NORMAL;
 }
 
-static boolean is_format_truecolor_capable(int Output_lang)
+static bool is_format_truecolor_capable(int Output_lang)
 {
-    boolean rv = FALSE;
+    bool rv = FALSE;
 
     if (Output_lang == GD) {
        rv = TRUE;
@@ -224,8 +224,8 @@ static boolean is_format_truecolor_capable(int Output_lang)
 static void gd_begin_graph(GVC_t * gvc, graph_t * g, box bb, point pb)
 {
     char *bgcolor_str, *truecolor_str;
-    boolean truecolor_p = FALSE;       /* try to use cheaper paletted mode */
-    boolean bg_transparent_p = FALSE;
+    bool truecolor_p = FALSE;  /* try to use cheaper paletted mode */
+    bool bg_transparent_p = FALSE;
     int bgcolor;
 
     external_surface = gvc->job->external_surface;
index f8aeef29b0907e3ed156ca5834c98612848e5436..322f7235d8c02192efa01f4530c29ee9b02dd683 100644 (file)
@@ -197,22 +197,22 @@ boxf boxf_intersect(boxf b0, boxf b1)
     return b;
 }
 
-boolean box_overlap(box b0, box b1)
+bool box_overlap(box b0, box b1)
 {
     return OVERLAP(b0, b1);
 }
 
-boolean boxf_overlap(boxf b0, boxf b1)
+bool boxf_overlap(boxf b0, boxf b1)
 {
     return OVERLAP(b0, b1);
 }
 
-boolean box_contains(box b0, box b1)
+bool box_contains(box b0, box b1)
 {
     return CONTAINS(b0, b1);
 }
 
-boolean boxf_contains(boxf b0, boxf b1)
+bool boxf_contains(boxf b0, boxf b1)
 {
     return CONTAINS(b0, b1);
 }
index 1d30a2bb873208dc6f553cbe0d474050e304e520..4821bfad962ebe776c82dcb9c0fe8b0bc8863660 100644 (file)
@@ -79,10 +79,10 @@ extern box box_bb(box, box);
 extern boxf boxf_bb(boxf, boxf);
 extern box box_intersect(box, box);
 extern boxf boxf_intersect(boxf, boxf);
-extern boolean box_overlap(box, box);
-extern boolean boxf_overlap(boxf, boxf);
-extern boolean box_contains(box, box);
-extern boolean boxf_contains(boxf, boxf);
+extern bool box_overlap(box, box);
+extern bool boxf_overlap(boxf, boxf);
+extern bool box_contains(box, box);
+extern bool boxf_contains(boxf, boxf);
 extern box flip_rec_box(box b, point p);
 
 extern int lineToBox(pointf p1, pointf p2, boxf b);
index 367c0235c8f63f0b329c56781f9ad64243d1bf88..8cb1c46371e0c56fbbcedc4f6b5491d9496ae731 100644 (file)
@@ -64,7 +64,7 @@ extern "C" {
     EXTERN int Obj;
 #endif
 
-    EXTERN boolean Verbose, Reduce, MemTest, Config;
+    EXTERN bool Verbose, Reduce, MemTest, Config;
     EXTERN char *HTTPServerEnVar;
     EXTERN char *Output_file_name;
     EXTERN int graphviz_errors;
@@ -74,7 +74,7 @@ extern "C" {
     EXTERN int Show_cnt;
     EXTERN char** Show_boxes;  /* emit code for correct box coordinates */
     EXTERN int CL_type;                /* NONE, LOCAL, GLOBAL */
-    EXTERN boolean Concentrate;        /* if parallel edges should be merged */
+    EXTERN bool Concentrate;   /* if parallel edges should be merged */
     EXTERN double Epsilon;     /* defined in input_graph */
     EXTERN double Nodesep;
     EXTERN double Nodefactor;
index d69650fb044db7560755f72610e4d0a27a87d06e..651ddf5717ba16c04d559f1b667876c0ed6d0def 100644 (file)
@@ -62,7 +62,7 @@ static char *Sep = ";";
 static int PageWidth;          /* Width of page, in points. */
 static char *prefix;           /* Machine-dependent prefix and suffix */
 static char *suffix;
-/* static boolean      onetime = TRUE; */
+/* static bool onetime = TRUE; */
 
 #define MAXLINELEN   80
 static int bufcnt;             /* Number of characters output on current line */
@@ -830,7 +830,7 @@ static void hpgl_polyline(point * A, int n)
 
 static void hpgl_user_shape(char *name, point * A, int n, int filled)
 {
-    static boolean onetime = TRUE;
+    static bool onetime = TRUE;
     if (onetime) {
        agerr(AGERR, "custom shapes not available with this driver\n");
        onetime = FALSE;
index 3cae9ddf917195f8f9d29fab007210eb3e6536cb..6f0c7fd6c545da96e3c45ba36e2ea9b20c2fe378 100644 (file)
@@ -332,13 +332,13 @@ void global_def(char *dcl,
  * converts a graph attribute to a point.
  * Returns true if the attribute ends in '!'.
  */
-static boolean getdoubles2pt(graph_t * g, char *name, point * result)
+static bool getdoubles2pt(graph_t * g, char *name, point * result)
 {
     char *p;
     int i;
     double xf, yf;
     char c = '\0';
-    boolean rv = FALSE;
+    bool rv = FALSE;
 
     if ((p = agget(g, name))) {
        i = sscanf(p, "%lf,%lf%c", &xf, &yf, &c);
@@ -469,7 +469,7 @@ static void setRatio(graph_t * g)
     }
 }
 
-void graph_init(graph_t * g, boolean use_rankdir)
+void graph_init(graph_t * g, bool use_rankdir)
 {
     char *p;
     double xf;
index 65d3d01345ebda780f3ac213eb488d8d9f8a4bb8..715bf638e0531b9d3610de3365048b0ecd49cdac 100644 (file)
 extern "C" {
 #endif
 
-typedef unsigned char boolean;
-
 #define NOT(v) (!(v))
+
+#if ! defined HAVE_BOOL && ! defined __cplusplus
+typedef unsigned char bool;
+#define false 0
+#define true NOT(false)
+#endif
+
 #ifndef FALSE
-#define        FALSE 0
+#define        FALSE false
 #endif
 #ifndef TRUE
-#define TRUE NOT(FALSE)
+#define TRUE true
 #endif
 
 #ifndef NOTUSED
index 36f94975ef97fb1d0a7148df8abca2e132749633..0e7ec16f7020ea043a5f5d77fb6074380efb80c2 100644 (file)
@@ -554,7 +554,7 @@ static void mif_polyline(point * A, int n)
 
 static void mif_user_shape(char *name, point * A, int n, int filled)
 {
-    static boolean onetime = TRUE;
+    static bool onetime = TRUE;
     if (onetime) {
        agerr(AGERR, "custom shapes not available with this driver\n");
        onetime = FALSE;
index 3bbf883c046047583d9b6b283cca28aaf739dcbb..475a3e6f1945f9c00bc57d9196e9b099baccae7b 100644 (file)
@@ -61,7 +61,7 @@ static void writenodeandport(FILE * fp, node_t * node, char *port)
 
 /* _write_plain:
  */
-static void _write_plain(GVJ_t * job, graph_t * g, FILE * f, boolean extend)
+static void _write_plain(GVJ_t * job, graph_t * g, FILE * f, bool extend)
 {
     int i, j, splinePoints;
     char *tport, *hport;
index 5bb962ebea0fa27e278c753bd4710c707b7f0f41..1aed0cf3f18b24a977dfd8fb54f72bd748e42b79 100644 (file)
@@ -22,7 +22,7 @@
 
 
 static int Rankdir;
-static boolean Flip;
+static bool Flip;
 static point Offset;
 
 static void place_flip_graph_label(graph_t * g);
@@ -142,7 +142,7 @@ void translate_bb(graph_t * g, int rankdir)
        translate_bb(GD_clust(g)[c], rankdir);
 }
 
-void dot_nodesize(node_t * n, boolean flip)
+void dot_nodesize(node_t * n, bool flip)
 {
     double x, y;
     int ps;
index 8c128825f90f1d4e68842b6be09cce25ce69d78b..fe983a2318f537f4d975c55f6ab4e2e35ee837b9 100644 (file)
@@ -76,7 +76,7 @@ extern "C" {
        int must_inline;
     } ps_image_t;
 
-    typedef void (*nodesizefn_t) (Agnode_t *, boolean);
+    typedef void (*nodesizefn_t) (Agnode_t *, bool);
 
     extern void add_box(path *, box);
     extern void arrow_flags(Agedge_t * e, int *sflag, int *eflag);
@@ -87,11 +87,11 @@ extern "C" {
     extern int arrowEndClip(edge_t*, point*, int, int , bezier*, int eflag);
     extern int arrowStartClip(edge_t*, point* ps, int, int, bezier*, int sflag);
     extern void attach_attrs(Agraph_t *);
-    extern void beginpath(path *, Agedge_t *, int, pathend_t *, boolean);
+    extern void beginpath(path *, Agedge_t *, int, pathend_t *, bool);
     extern void bezier_clip(inside_t * inside_context,
-                           boolean(*insidefn) (inside_t * inside_context,
+                           bool(*insidefn) (inside_t * inside_context,
                                                pointf p), pointf * sp,
-                           boolean left_inside);
+                           bool left_inside);
     extern shape_desc *bind_shape(char *name, node_t *);
     extern void clip_and_install(edge_t *, edge_t *, point *, int,
                                 splineInfo *);
@@ -99,7 +99,7 @@ extern "C" {
     extern char* charsetToStr (int c);
     extern point coord(node_t * n);
     extern void do_graph_label(graph_t * sg);
-    extern void graph_init(graph_t * g, boolean use_rankdir);
+    extern void graph_init(graph_t * g, bool use_rankdir);
     extern void graph_cleanup(graph_t * g);
     extern void dotneato_args_initialize(GVC_t * gvc, int, char **);
     extern void dotneato_usage(int);
@@ -118,7 +118,7 @@ extern "C" {
     extern void emit_textlines(GVJ_t*, int, textline_t*, pointf,
               double, char*, double, char*);
     extern void enqueue_neighbors(nodequeue *, Agnode_t *, int);
-    extern void endpath(path *, Agedge_t *, int, pathend_t *, boolean);
+    extern void endpath(path *, Agedge_t *, int, pathend_t *, bool);
     extern void epsf_init(node_t * n);
     extern void epsf_free(node_t * n);
     extern void extend_attrs(GVJ_t * job, graph_t *g, int s_arrows, int e_arrows);
@@ -134,7 +134,7 @@ extern "C" {
                           Agsym_t * (*fun) (Agraph_t *, char *, char *));
     extern int gvRenderJobs (GVC_t * gvc, graph_t * g);
     extern point image_size(graph_t * g, char *shapefile);
-    extern boolean isPolygon(node_t *);
+    extern bool isPolygon(node_t *);
     extern char *strdup_and_subst_graph(char *str, Agraph_t * g);
     extern char *strdup_and_subst_node(char *str, Agnode_t * n);
     extern char *strdup_and_subst_edge(char *str, Agedge_t * e);
@@ -153,7 +153,7 @@ extern "C" {
     extern void osize_label(textlabel_t *, int *, int *, int *, int *);
     extern char **parse_style(char *s);
     extern void place_graph_label(Agraph_t *);
-    extern void place_portlabel(edge_t * e, boolean head_p);
+    extern void place_portlabel(edge_t * e, bool head_p);
     extern char *ps_string(char *s, int);
     extern int rank(graph_t * g, int balance, int maxiter);
     extern void routesplinesinit(void);
index a3912eeed4a9bc9aab44ae30e3223da365a733d0..802e317f8561bef380684559d82406f4544a47ed 100644 (file)
@@ -57,20 +57,20 @@ static shape_desc *point_desc;
 static void poly_init(node_t * n);
 static void poly_free(node_t * n);
 static port poly_port(node_t * n, char *portname, char *);
-static boolean poly_inside(inside_t * inside_context, pointf p);
+static bool poly_inside(inside_t * inside_context, pointf p);
 static int poly_path(node_t* n, port* p, int side, box rv[], int *kptr);
 static void poly_gencode(GVJ_t * job, node_t * n);
 
 static void record_init(node_t * n);
 static void record_free(node_t * n);
 static port record_port(node_t * n, char *portname, char *);
-static boolean record_inside(inside_t * inside_context, pointf p);
+static bool record_inside(inside_t * inside_context, pointf p);
 static int record_path(node_t* n, port* p, int side, box rv[], int *kptr);
 static void record_gencode(GVJ_t * job, node_t * n);
 
 static void point_init(node_t * n);
 
-static boolean epsf_inside(inside_t * inside_context, pointf p);
+static bool epsf_inside(inside_t * inside_context, pointf p);
 static void epsf_gencode(GVJ_t * job, node_t * n);
 
 /* polygon descriptions.  "polygon" with 0 sides takes all user control */
@@ -468,7 +468,7 @@ shape_kind shapeOf(node_t * n)
        return SH_USER;
 }
 
-boolean isPolygon(node_t * n)
+bool isPolygon(node_t * n)
 {
     return (ND_shape(n) && (ND_shape(n)->fns->initfn == poly_init));
 }
@@ -766,7 +766,7 @@ static void poly_free(node_t * n)
 
 #define GET_PORT_BOX(n,e) ((n) == (e)->head ? ED_head_port(e).bp : ED_tail_port(e).bp)
 
-static boolean poly_inside(inside_t * inside_context, pointf p)
+static bool poly_inside(inside_t * inside_context, pointf p)
 {
     static node_t *lastn;      /* last node argument */
     static polygon_t *poly;
@@ -1189,7 +1189,7 @@ static void poly_gencode(GVJ_t * job, node_t * n)
     pointf P, *vertices;
     static point *A;
     static int A_size;
-    boolean filled;
+    bool filled;
     extern int xdemitState;
     char *color;
 
@@ -1745,7 +1745,7 @@ static port record_port(node_t * n, char *portname, char *compass)
  * Note that this does not handle Mrecords correctly. It assumes 
  * everything is a rectangle.
  */
-static boolean
+static bool
 record_inside(inside_t * inside_context, pointf p)
 {
 
@@ -1924,7 +1924,7 @@ shape_desc *bind_shape(char *name, node_t * np)
     return rv;
 }
 
-static boolean epsf_inside(inside_t * inside_context, pointf p)
+static bool epsf_inside(inside_t * inside_context, pointf p)
 {
     pointf P;
     double x2;
index bb6e613b9f34e9f32cef039db43c5c10b3fe11fa..1b050c1ccfeecff4e762d4ded30532ff1ad2c38c 100644 (file)
@@ -99,12 +99,12 @@ arrow_clip(edge_t * fe, edge_t * le,
  * The points p are in node coordinates.
  */
 void bezier_clip(inside_t * inside_context,
-                boolean(*inside) (inside_t * inside_context, pointf p),
-                pointf * sp, boolean left_inside)
+                bool(*inside) (inside_t * inside_context, pointf p),
+                pointf * sp, bool left_inside)
 {
     pointf seg[4], best[4], pt, opt, *left, *right;
     double low, high, t, *idir, *odir;
-    boolean found;
+    bool found;
     int i;
 
     if (left_inside) {
@@ -153,7 +153,7 @@ void bezier_clip(inside_t * inside_context,
  */
 static void
 shape_clip0(inside_t * inside_context, node_t * n, point curve[4],
-           boolean left_inside)
+           bool left_inside)
 {
     int i, save_real_size;
     pointf c[4];
@@ -189,7 +189,7 @@ shape_clip0(inside_t * inside_context, node_t * n, point curve[4],
 void shape_clip(node_t * n, point curve[4])
 {
     int save_real_size;
-    boolean left_inside;
+    bool left_inside;
     pointf c;
     inside_t inside_context;
 
@@ -385,7 +385,7 @@ void add_box(path * P, box b)
  * to provide a polygon.
  */
 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;
@@ -575,7 +575,7 @@ beginpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
     }    
 }
 
-void endpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
+void endpath(path * P, edge_t * e, int et, pathend_t * endp, bool merge)
 {
     int side, mask;
     node_t *n;
@@ -1347,7 +1347,7 @@ makeSelfEdge(path * P, edge_t * edges[], int ind, int cnt, int sizex,
 }
 
 /* vladimir */
-void place_portlabel(edge_t * e, boolean head_p)
+void place_portlabel(edge_t * e, bool head_p)
 /* place the {head,tail}label (depending on HEAD_P) of edge E */
 /* N.B. Assume edges are normalized, so tail is at spl->list[0].list[0]
  * and head is at spl->list[spl->size-l].list[bez->size-1]
index f5c24a1f904130546072c9e7f215b0b0ddf4e4f1..55efdc4d415659a0be1f854f1c9f86ba0ebc68e0 100644 (file)
@@ -53,9 +53,9 @@ extern "C" {
        box *bp;                /* if not null, points to bbox of 
                                 * rectangular area that is port target
                                 */
-       boolean defined;        /* if true, edge has port info at this end */
-       boolean constrained;    /* if true, constraints such as theta are set */
-       boolean clip;           /* if true, clip end to node/port shape */
+       bool    defined;        /* if true, edge has port info at this end */
+       bool    constrained;    /* if true, constraints such as theta are set */
+       bool clip;           /* if true, clip end to node/port shape */
        unsigned char order;    /* for mincross */
        unsigned char side;     /* if port is on perimeter of node, this
                                  * contains the bitwise OR of the sides (TOP,
@@ -64,8 +64,8 @@ extern "C" {
     } port;
 
     typedef struct {
-       boolean(*swapEnds) (edge_t * e);        /* Should head and tail be swapped? */
-       boolean(*splineMerge) (node_t * n);     /* Is n a node in the middle of an edge? */
+       bool(*swapEnds) (edge_t * e);   /* Should head and tail be swapped? */
+       bool(*splineMerge) (node_t * n);        /* Is n a node in the middle of an edge? */
     } splineInfo;
 
     typedef struct pathend_t {
@@ -130,8 +130,8 @@ extern "C" {
            } txt;
            htmllabel_t *html;
        } u;
-       boolean set;            /* true if position is set */
-       boolean html;           /* true if html label */
+       bool set;               /* true if position is set */
+       bool html;              /* true if html label */
     } textlabel_t;
 
     typedef struct polygon_t { /* mutable shape information for a node */
@@ -169,7 +169,7 @@ extern "C" {
        void (*initfn) (node_t *);      /* initializes shape from node u.shape_info structure */
        void (*freefn) (node_t *);      /* frees  shape from node u.shape_info structure */
         port(*portfn) (node_t *, char *, char *);      /* finds aiming point and slope of port */
-        boolean(*insidefn) (inside_t * inside_context, pointf);        /* clips incident gvc->e spline on shape of gvc->n */
+        bool(*insidefn) (inside_t * inside_context, pointf);   /* clips incident gvc->e spline on shape of gvc->n */
        int (*pboxfn)(node_t* n, port* p, int side, box rv[], int *kptr); /* finds box path to reach port */
        void (*codefn) (GVJ_t * job, node_t * n);       /* emits graphics code for node */
     } shape_functions;
@@ -181,7 +181,7 @@ extern "C" {
        char *name;             /* as read from graph file */
        shape_functions *fns;
        polygon_t *polygon;     /* base polygon info */
-       boolean usershape;
+       bool usershape;
     } shape_desc;
 
 #ifndef DISABLE_CODEGENS
@@ -221,7 +221,7 @@ extern "C" {
        void (*beziercurve) (point * A, int n, int arrow_at_start,
                             int arrow_at_end, int filled);
        void (*polyline) (point * A, int n);
-       boolean bezier_has_arrows;
+       bool bezier_has_arrows;
        void (*comment) (char *str);
        void (*textsize) (void);        /* not used */
        void (*user_shape) (char *name, point * A, int sides, int filled);
@@ -254,8 +254,8 @@ extern "C" {
        node_t **av;            /* allocated list of nodes in rank  */
        int ht1, ht2;           /* height below/above centerline    */
        int pht1, pht2;         /* as above, but only primitive nodes   */
-       boolean candidate;      /* for transpose () */
-       boolean valid;
+       bool candidate; /* for transpose () */
+       bool valid;
        int cache_nc;           /* caches number of crossings */
        adjmatrix_t *flat;
     } rank_t;
@@ -271,9 +271,9 @@ extern "C" {
        point margin;
        point page;
        point  size;
-       boolean filled;
-       boolean landscape;
-       boolean centered;
+       bool filled;
+       bool landscape;
+       bool centered;
        ratio_t ratio_kind;
     } layout_t;
 
@@ -310,10 +310,10 @@ extern "C" {
        textlabel_t *label;     /* if the cluster has a title */
        box bb;                 /* bounding box */
        point border[4];        /* sizes of margins for graph labels */
-       boolean has_labels;
-       boolean has_images;
-       boolean active;
-       boolean selected;
+       bool has_labels;
+       bool has_images;
+       bool active;
+       bool selected;
        unsigned char charset; /* input character set */
        int rankdir;
        int ht1, ht2;           /* below and above extremal ranks */
@@ -343,9 +343,9 @@ extern "C" {
        short minrank, maxrank;
 
        /* various flags */
-       boolean has_flat_edges;
-       boolean showboxes;
-       boolean cluster_was_collapsed;
+       bool has_flat_edges;
+       bool    showboxes;
+       bool cluster_was_collapsed;
 
        int nodesep, ranksep;
        node_t *ln, *rn;        /* left, right nodes of bounding box */
@@ -353,11 +353,11 @@ extern "C" {
 
        /* for clusters */
        node_t *leader, **rankleader;
-       boolean expanded;
+       bool expanded;
        char installed;
        char set_type;
        char label_pos;
-       boolean exact_ranksep;
+       bool exact_ranksep;
 #endif
 
     } Agraphinfo_t;
@@ -425,19 +425,19 @@ extern "C" {
        textlabel_t *label;
        void *alg;
        char state;
-       boolean clustnode;
-       boolean active;
-       boolean selected;
+       bool clustnode;
+       bool active;
+       bool selected;
 
 #ifndef DOT_ONLY
-       boolean pinned;
+       bool pinned;
        short xsize, ysize;
        int id, heapindex, hops;
        double *pos, dist;
 #endif
 #ifndef NEATO_ONLY
-       boolean showboxes;
-       boolean  has_port;
+       bool showboxes;
+       bool  has_port;
 
        /* fast graph */
        char node_type, mark, onstack;
@@ -531,8 +531,8 @@ extern "C" {
        char label_ontop;
        edge_t *to_orig;        /* for dot's shapes.c    */
        void *alg;
-       boolean active;
-       boolean selected;
+       bool active;
+       bool selected;
 
 #ifndef DOT_ONLY
        double factor;
@@ -540,8 +540,8 @@ extern "C" {
        Ppolyline_t path;
 #endif
 #ifndef NEATO_ONLY
-       boolean showboxes;
-       boolean conc_opp_flag;
+       bool showboxes;
+       bool conc_opp_flag;
        short xpenalty;
        int weight;
        int cutvalue, tree_index;
index 3204bc38f34d4d4a00d30e6c65342d783ac82f09..4d59c957b573e6d17fdd77c2dfa2ae709f603b2c 100644 (file)
@@ -681,11 +681,11 @@ initFontLabelEdgeAttr(edge_t * e, struct fontinfo *fi,
  * Return true if head/tail end of edge should not be clipped
  * to node.
  */
-static boolean 
+static bool 
 noClip(edge_t *e, attrsym_t* sym)
 {
     char               *str;
-    boolean            rv = FALSE;
+    bool               rv = FALSE;
 
     if (sym) { /* mapbool isn't a good fit, because we want "" to mean TRUE */
        str = agxget(e,sym->index);
@@ -799,7 +799,7 @@ int common_init_edge(edge_t * e)
 
 /* addLabelBB:
  */
-static box addLabelBB(box bb, textlabel_t * lp, boolean flipxy)
+static box addLabelBB(box bb, textlabel_t * lp, bool flipxy)
 {
     int width, height;
     point p = lp->p;
@@ -1401,7 +1401,7 @@ utf8ToLatin1 (char* s)
     return ns;
 }
 
-boolean overlap_node(node_t *n, boxf b)
+bool overlap_node(node_t *n, boxf b)
 {
     boxf bb;
     inside_t ictxt;
@@ -1423,7 +1423,7 @@ boolean overlap_node(node_t *n, boxf b)
     return ND_shape(n)->fns->insidefn(&ictxt, p);
 }
 
-boolean overlap_label(textlabel_t *lp, boxf b)
+bool overlap_label(textlabel_t *lp, boxf b)
 {
     double sx, sy;
     boxf bb;
@@ -1437,7 +1437,7 @@ boolean overlap_label(textlabel_t *lp, boxf b)
     return OVERLAP(b, bb);
 }
 
-static boolean overlap_arrow(pointf p, pointf u, double scale, int flag, boxf b)
+static bool overlap_arrow(pointf p, pointf u, double scale, int flag, boxf b)
 {
     boxf bb;
 
@@ -1449,7 +1449,7 @@ static boolean overlap_arrow(pointf p, pointf u, double scale, int flag, boxf b)
     return FALSE;
 }
 
-static boolean overlap_bezier(bezier bz, boxf b)
+static bool overlap_bezier(bezier bz, boxf b)
 {
     int i;
     point pp;
@@ -1482,7 +1482,7 @@ static boolean overlap_bezier(bezier bz, boxf b)
     return FALSE;
 }
 
-boolean overlap_edge(edge_t *e, boxf b)
+bool overlap_edge(edge_t *e, boxf b)
 {
     int i;
     splines *spl;
index 9eee0e95399d1c57255085e5cbfe3eda67e6cc93..0b6f7afed5472f57519565838dc80980188f4863 100644 (file)
@@ -58,9 +58,9 @@ extern "C" {
 
     extern void updateBB(graph_t * g, textlabel_t * lp);
     extern void compute_bb(Agraph_t *);
-    extern boolean overlap_node(node_t *n, boxf b);
-    extern boolean overlap_label(textlabel_t *lp, boxf b);
-    extern boolean overlap_edge(edge_t *e, boxf b);
+    extern bool overlap_node(node_t *n, boxf b);
+    extern bool overlap_label(textlabel_t *lp, boxf b);
+    extern bool overlap_edge(edge_t *e, boxf b);
 
     extern int processClusterEdges(graph_t * g);
     extern void undoClusterEdges(graph_t * g);
index 0a64213fdbfc8915f0f599c42e6a5375cb4322f9..636c46489527d5152b3d15b27a0e4296c6853c5a 100644 (file)
@@ -25,7 +25,7 @@
 #define                UP              0
 #define                DOWN    1
 
-static boolean samedir(edge_t * e, edge_t * f)
+static bool samedir(edge_t * e, edge_t * f)
 {
     edge_t *e0, *f0;
 
@@ -39,13 +39,13 @@ static boolean samedir(edge_t * e, edge_t * f)
            * (ND_rank(e0->tail) - ND_rank(e0->head)) > 0);
 }
 
-static boolean downcandidate(node_t * v)
+static bool downcandidate(node_t * v)
 {
     return ((ND_node_type(v) == VIRTUAL) && (ND_in(v).size == 1)
            && (ND_out(v).size == 1) && (ND_label(v) == NULL));
 }
 
-static boolean bothdowncandidates(node_t * u, node_t * v)
+static bool bothdowncandidates(node_t * u, node_t * v)
 {
     edge_t *e, *f;
     e = ND_in(u).list[0];
@@ -57,13 +57,13 @@ static boolean bothdowncandidates(node_t * u, node_t * v)
     return FALSE;
 }
 
-static boolean upcandidate(node_t * v)
+static bool upcandidate(node_t * v)
 {
     return ((ND_node_type(v) == VIRTUAL) && (ND_out(v).size == 1)
            && (ND_in(v).size == 1) && (ND_label(v) == NULL));
 }
 
-static boolean bothupcandidates(node_t * u, node_t * v)
+static bool bothupcandidates(node_t * u, node_t * v)
 {
     edge_t *e, *f;
     e = ND_out(u).list[0];
index 7ca1bdaf72eccad8a2aadde6cbea035b65429e1b..ccab9e9bb7c1cdd5d0b76ac46e43f142c6816718 100644 (file)
@@ -77,7 +77,7 @@ extern "C" {
 #if defined(_BLD_dot) && defined(_DLL)
 #   define extern __EXPORT__
 #endif
-    extern void dot_nodesize(Agnode_t *, boolean);
+    extern void dot_nodesize(Agnode_t *, bool);
     extern void dot_concentrate(Agraph_t *);
     extern void dot_mincross(Agraph_t *);
     extern void dot_position(Agraph_t *);
index 4231c86fa61b596ced72867ea3e9a5d14b41687e..34bbc19a044b59795135b62bcfe8cda0b95ee00d 100644 (file)
@@ -110,13 +110,13 @@ static Agedge_t *top_bound(Agedge_t *, int);
 
 #define GROWEDGES (edges = ALLOC (n_edges + CHUNK, edges, edge_t*))
 
-static boolean spline_merge(node_t * n)
+static bool spline_merge(node_t * n)
 {
     return ((ND_node_type(n) == VIRTUAL)
            && ((ND_in(n).size > 1) || (ND_out(n).size > 1)));
 }
 
-static boolean swap_ends_p(edge_t * e)
+static bool swap_ends_p(edge_t * e)
 {
     while (ED_to_orig(e))
        e = ED_to_orig(e);
@@ -885,7 +885,7 @@ make_flat_adj_edges(path* P, edge_t** edges, int ind, int cnt, edge_t* e0)
  */
 static void
 makeFlatEnd (spline_info_t* sp, path* P, node_t* n, edge_t* e, pathend_t* endp,
-             boolean isBegin)
+             bool isBegin)
 {
     box b;
     graph_t* g = n->graph;
@@ -904,7 +904,7 @@ makeFlatEnd (spline_info_t* sp, path* P, node_t* n, edge_t* e, pathend_t* endp,
  */
 static void
 makeBottomFlatEnd (spline_info_t* sp, path* P, node_t* n, edge_t* e, 
-       pathend_t* endp, boolean isBegin)
+       pathend_t* endp, bool isBegin)
 {
     box b;
     graph_t* g = n->graph;
@@ -2120,7 +2120,7 @@ int dir;
     return rv;
 }
 
-static boolean pathscross(n0, n1, ie1, oe1)
+static bool pathscross(n0, n1, ie1, oe1)
 node_t *n0, *n1;
 edge_t *ie1, *oe1;
 {
index 494d4ca1c07b729c3285b9b761ab76a84840aa9a..76dfd77138f1f143cef5c3f56b8dcf9e3af0d557 100644 (file)
@@ -81,7 +81,7 @@ static void setbounds(node_t * v, int *bounds, int lpos, int rpos)
                    bounds[SRB] = ord;
            }
        } else {                /* forward */
-           boolean onleft, onright;
+           bool onleft, onright;
            onleft = onright = FALSE;
            for (i = 0; (f = ND_out(v).list[i]); i++) {
                if (ND_order(f->head) <= lpos) {
index 0c51ed08574743d5208b5b39403976ac2b9a58b4..c2c95e7e39e95da8b552e5606a70c13bb9b0ae53 100644 (file)
@@ -30,7 +30,7 @@
 #define flatindex(v)   ((v)->u.low)
 
        /* forward declarations */
-static boolean medians(graph_t * g, int r0, int r1);
+static bool medians(graph_t * g, int r0, int r1);
 static int nodeposcmpf(node_t ** n0, node_t ** n1);
 static int edgeidcmpf(edge_t ** e0, edge_t ** e1);
 static void flat_breakcycles(graph_t * g);
@@ -65,7 +65,7 @@ static graph_t *Root;
 static int GlobalMinRank, GlobalMaxRank;
 static edge_t **TE_list;
 static int *TI_list;
-static boolean ReMincross;
+static bool ReMincross;
 
 /* dot_mincross:
  * Minimize edge crossings
@@ -705,7 +705,7 @@ static void init_mincross(graph_t * g)
 static void flat_search(graph_t * g, node_t * v)
 {
     int i, j;
-    boolean hascl;
+    bool hascl;
     edge_t *e, *rev;
     adjmatrix_t *M = GD_rank(g)[ND_rank(v)].flat;
 
@@ -1030,7 +1030,7 @@ static void
 reorder(graph_t * g, int r, int reverse, int hasfixed)
 {
     int changed = 0, nelt;
-    boolean muststay, sawclust;
+    bool muststay, sawclust;
     node_t **vlist = GD_rank(g)[r].v;
     node_t **lp, **rp, **ep = vlist + GD_rank(g)[r].n;
 
@@ -1250,12 +1250,12 @@ flat_mval(node_t * n)
 
 #define VAL(node,port) (MC_SCALE * (node)->u.order + (port).order)
 
-static boolean medians(graph_t * g, int r0, int r1)
+static bool medians(graph_t * g, int r0, int r1)
 {
     int i, j, j0, lm, rm, lspan, rspan, *list;
     node_t *n, **v;
     edge_t *e;
-    boolean hasfixed = FALSE;
+    bool hasfixed = FALSE;
 
     list = TI_list;
     v = GD_rank(g)[r0].v;
index 749d8d2cb2f21430bb15fc3086c8dbb172593ee2..7f7b32b3fab2c9a42c56fe1d3df2ae50de721201 100644 (file)
@@ -876,7 +876,7 @@ static void set_aspect(graph_t * g)
 {
     double xf = 0.0, yf = 0.0, actual, desired;
     node_t *n;
-    boolean scale_it, filled;
+    bool scale_it, filled;
     point sz;
 
     rec_bb(g, g);
@@ -1144,7 +1144,7 @@ static void contain_nodes(graph_t * g)
 
 /* idealsize:
  * set g->drawing->size to a reasonable default.
- * returns a boolean to indicate if drawing is to
+ * returns a bool to indicate if drawing is to
  * be scaled and filled */
 static int idealsize(graph_t * g, double minallowed)
 {
index e33c26e14869862c444633851a8d795a1d807f16..eb6e2eb1c0f1ce03037bc2f7f971053c54523a8d 100644 (file)
@@ -101,7 +101,7 @@ extern "C" {
 #endif
 
     extern void fdp_layout(Agraph_t * g);
-    extern void fdp_nodesize(node_t *, boolean);
+    extern void fdp_nodesize(node_t *, bool);
     extern void fdp_init_graph(Agraph_t * g);
     extern void fdp_init_node_edge(Agraph_t * g);
     extern void fdp_cleanup(Agraph_t * g);
index 9164f1c135fd3dc6eda22054232d123e4655461f..f57bed89df7c7981a3049bf8366d49ba49271da0 100644 (file)
@@ -903,9 +903,9 @@ setClustNodes(graph_t* root)
      * How to combine parts, especially with disparate components?
      */
     if (c_cnt > 1) {
-       boolean *bp;
+       bool *bp;
        if (pinned) {
-           bp = N_NEW(c_cnt, boolean);
+           bp = N_NEW(c_cnt, bool);
            bp[0] = TRUE;
        } else
            bp = 0;
index bed55245e8b621cda70e0c8166315f428ec77e51..c376ad15586e94c5d5930875d4d11bef99e274a8 100644 (file)
@@ -149,7 +149,7 @@ extern "C" {
 #endif
 
        void *surface;          /* gd or cairo surface */
-       boolean external_surface; /* surface belongs to caller */
+       bool external_surface; /* surface belongs to caller */
 
        gvstyle_t *style;       /* active style from gvc->styles[] */
 
@@ -194,7 +194,7 @@ extern "C" {
        pointf compscale;       /* composite device scale incl: scale, zoom, dpi, y_goes_down */
        pointf offset;          /* composite translation */
        
-       boolean fit_mode,
+       bool fit_mode,
                needs_refresh,
                click,
                active,
@@ -246,7 +246,7 @@ extern "C" {
        char **info;
 
        char *config_path;
-       boolean config_found;
+       bool config_found;
 
        /* gvrender_config() */
        GVJ_t *jobs;    /* linked list of jobs */
@@ -276,7 +276,7 @@ extern "C" {
        point pb;               /* page size - including margins (inches) */
        boxf bb;                /* graph bb in graph units, not including margins */
        int rotation;           /* rotation - 0 = portrait, 90 = landscape */
-       boolean graph_sets_margin, graph_sets_pageSize, graph_sets_rotation;
+       bool graph_sets_margin, graph_sets_pageSize, graph_sets_rotation;
 
        /* layers */
        char *layerDelims;      /* delimiters in layer names */
index 649981a294d920d1d2b7a06265d05c4069762554..b2b2c0b1ecbc040ce6a037e88c755d4fff6ac520 100644 (file)
@@ -390,7 +390,7 @@ codegen_info_t *next_codegen(codegen_info_t * p)
     ++p;
 
 #ifdef QUARTZ_RENDER
-    static boolean unscanned = TRUE;
+    static bool unscanned = TRUE;
     if (!p->name && unscanned) {
         /* reached end of codegens but haven't yet scanned for Quicktime codegens... */
 
@@ -445,7 +445,7 @@ codegen_info_t *next_codegen(codegen_info_t * p)
 /*
   gvconfig - parse a config file and install the identified plugins
  */
-void gvconfig(GVC_t * gvc, boolean rescan)
+void gvconfig(GVC_t * gvc, bool rescan)
 {
 #if 0
     gvplugin_library_t **libraryp;
index cdc476d010ef306a1b5718568565c7d32994b36e..05fae3bd1caae3bdc446bdaee3cf5d6790981e9e 100644 (file)
@@ -32,12 +32,12 @@ extern "C" {
 /* configuration */
 
     extern char *gvconfig_libdir(void);
-    extern void gvconfig(GVC_t * gvc, boolean rescan);
+    extern void gvconfig(GVC_t * gvc, bool rescan);
     extern char *gvhostname(void);
 
 /* plugins */
 
-    extern boolean gvplugin_install(GVC_t * gvc, api_t api,
+    extern bool gvplugin_install(GVC_t * gvc, api_t api,
                    char *typestr, int quality, char *packagename, char *path,
                    gvplugin_installed_t * typeptr);
     extern gvplugin_available_t *gvplugin_load(GVC_t * gvc, api_t api, char *type);
@@ -50,7 +50,7 @@ extern "C" {
 /* job */
 
     extern void gvrender_output_filename_job(GVC_t * gvc, char *name);
-    extern boolean gvrender_output_langname_job(GVC_t * gvc, char *name);
+    extern bool gvrender_output_langname_job(GVC_t * gvc, char *name);
     extern GVJ_t *gvrender_first_job(GVC_t * gvc);
     extern GVJ_t *gvrender_next_job(GVC_t * gvc);
     extern void gvrender_delete_jobs(GVC_t * gvc);
index e0fbb347e582e3df6b5a1f44e4a2c48c18cb5427..d6f36abb007da7fc6c0b1f4b8b54a3b77d985c74 100644 (file)
@@ -75,7 +75,7 @@ void gvrender_output_filename_job(GVC_t * gvc, char *name)
 }
 
 /* -T switches */
-boolean gvrender_output_langname_job(GVC_t * gvc, char *name)
+bool gvrender_output_langname_job(GVC_t * gvc, char *name)
 {
     if (!gvc->jobs) {
        output_langname_job = gvc->job = gvc->jobs =
index d52b603f232cb5a955fa424fde32799f52e8ec6b..6f9866f89b928abda7ae1972385b32f268e2a7d9 100644 (file)
@@ -37,7 +37,7 @@
 #include "gvcint.h"
 #include "gvcproc.h"
 
-extern void graph_init(graph_t *g, boolean use_rankdir);
+extern void graph_init(graph_t *g, bool use_rankdir);
 extern void graph_cleanup(graph_t *g);
 
 int gvlayout_select(GVC_t * gvc, char *layout)
index c87f78ac01bc35a1046c73893450d082aa44a41f..9ef7ae98e25cb50d90a751758700a3a438da2f2d 100644 (file)
@@ -67,7 +67,7 @@ char *gvplugin_api_name(api_t api)
 /* install a plugin description into the list of available plugins */
 /* list is alpha sorted by type, the quality sorted within the type,
    then, if qualities are the same, last install wins */
-boolean gvplugin_install(GVC_t * gvc, api_t api,
+bool gvplugin_install(GVC_t * gvc, api_t api,
                 char *typestr, int quality, char *packagename, char *path,
                 gvplugin_installed_t * typeptr)
 {
@@ -255,7 +255,7 @@ gvplugin_available_t *gvplugin_load(GVC_t * gvc, api_t api, char *str)
 
 /* string buffer management
        - FIXME - must have 20 solutions for this same thing */
-static const char *append_buf(char sep, char *str, boolean new)
+static const char *append_buf(char sep, char *str, bool new)
 {
     static char *buf;
     static int bufsz, pos;
@@ -282,7 +282,7 @@ const char *gvplugin_list(GVC_t * gvc, api_t api, char *str)
     gvplugin_available_t **pnext, **plugin;
     const char *buf = NULL;
     char *s, *p, *typestr_last;
-    boolean new = TRUE;
+    bool new = TRUE;
 
     /* check for valid apis[] index */
     if (api < 0)
index 8b1cb67c039d65b11a9bbf76788b37f804c7eadf..98a36b1ba164bdea150577752af7a8941d1b66f0 100644 (file)
@@ -44,7 +44,7 @@ extern "C" {
        void (*end_edges) (GVJ_t * job);
        void (*begin_node) (GVJ_t * job, char *nodename, long id);
        void (*end_node) (GVJ_t * job);
-       void (*begin_edge) (GVJ_t * job, char *tailname, boolean directed,
+       void (*begin_edge) (GVJ_t * job, char *tailname, bool directed,
                            char *headname, long id);
        void (*end_edge) (GVJ_t * job);
        void (*begin_anchor) (GVJ_t * job, char *href, char *tooltip,
index ddc7b3bdc6aab588b8004d09f94eb38117d7f241..288f622245f730e85de263649391f15cc0e692ee 100644 (file)
@@ -74,9 +74,6 @@ extern "C" {
 
 #include <macros.h>
     extern void *gmalloc(size_t);
-    typedef unsigned char bool;
-#define true TRUE
-#define false FALSE
 #define DIGCOLA 1
 
 #ifdef USE_STYLES
index 5d7813fd18111001f714891989529cdcb2b517e2..6a0d7ba738a1b026a42149ed93036952dd8d0524 100644 (file)
@@ -43,7 +43,7 @@ static int Pack;              /* If >= 0, layout components separately and pack together
                                 */
 static char *cc_pfx = "_neato_cc";
 
-void neato_nodesize(node_t * n, boolean flip)
+void neato_nodesize(node_t * n, bool flip)
 {
     int w;
 
@@ -1180,7 +1180,7 @@ void neato_layout(Agraph_t * g)
            int n_cc;
            int i;
            pack_info pinfo;
-           boolean pin;
+           bool pin;
 
            cc = pccomps(g, &n_cc, cc_pfx, &pin);
 
@@ -1191,9 +1191,9 @@ void neato_layout(Agraph_t * g)
                adjustNodes(gc);
            }
            if (n_cc > 1) {
-               boolean *bp;
+               bool *bp;
                if (pin) {
-                   bp = N_NEW(n_cc, boolean);
+                   bp = N_NEW(n_cc, bool);
                    bp[0] = TRUE;
                } else
                    bp = 0;
index 0d949af01e561474c3c194585ad5de414c659971..37d594dfe1a103c16015a1b7cdca58d0be7ed4ea 100644 (file)
@@ -38,16 +38,16 @@ extern "C" {
     extern void heapdown(Agnode_t *);
     extern void heapup(Agnode_t *);
     extern void initial_positions(graph_t *, int);
-    extern int init_port(Agnode_t *, Agedge_t *, char *, boolean);
+    extern int init_port(Agnode_t *, Agedge_t *, char *, bool);
     extern void jitter3d(Agnode_t *, int);
     extern void jitter_d(Agnode_t *, int, int);
     extern Ppoly_t *makeObstacle(node_t * n, double SEP);
     extern void makeSelfArcs(path * P, edge_t * e, int stepx);
-    extern void makeSpline(edge_t *, Ppoly_t **, int, boolean);
+    extern void makeSpline(edge_t *, Ppoly_t **, int, bool);
     extern void make_spring(graph_t *, Agnode_t *, Agnode_t *, double);
     extern void move_node(graph_t *, int, Agnode_t *);
     extern int init_nop(graph_t * g);
-    extern void neato_nodesize(node_t * n, boolean flip);
+    extern void neato_nodesize(node_t * n, bool flip);
     extern void neato_cleanup(graph_t * g);
     extern void neato_cleanup_edge(edge_t * e);
     extern void neato_cleanup_graph(graph_t * g);
index d63cc3fa06fae00341aaf10cc044fc34dec251b9..a89c71956b77cf16afe315d6801b2026ec2755cf 100644 (file)
@@ -33,12 +33,12 @@ extern double drand48(void);
 extern void printvis(vconfig_t * cp);
 extern int in_poly(Ppoly_t argpoly, Ppoint_t q);
 
-static boolean spline_merge(node_t * n)
+static bool spline_merge(node_t * n)
 {
     return FALSE;
 }
 
-static boolean swap_ends_p(edge_t * e)
+static bool swap_ends_p(edge_t * e)
 {
     return FALSE;
 }
@@ -534,7 +534,7 @@ getPath(edge_t * e, vconfig_t * vconfig, int chkPts, Ppoly_t ** obs,
  * is on or inside one of the obstacles and, if so, tells the shortest path
  * computation to ignore them. 
  */
-void makeSpline(edge_t * e, Ppoly_t ** obs, int npoly, boolean chkPts)
+void makeSpline(edge_t * e, Ppoly_t ** obs, int npoly, bool chkPts)
 {
     Ppolyline_t line, spline;
     Pvector_t slopes[2];
@@ -679,7 +679,7 @@ static int _spline_edges(graph_t * g, double SEP, int splines)
  * Returns 0 on success.
  *
  * The edge function is given the graph, the separation to be added
- * around obstacles, and the type of edge. (At present, this is a boolean,
+ * around obstacles, and the type of edge. (At present, this is a bool,
  * with 1 meaning splines and 0 meaning line segments.) It must guarantee 
  * that all bounding boxes are current; in particular, the bounding box of 
  * g must reflect the addition of the edges.
index d4b55be8e45235046a4c9e9685e38d416ca8f04d..568cdfc048f8f9043bbf18ef1387a8b7596589e2 100644 (file)
@@ -70,7 +70,7 @@ static void insertFn(Agnode_t * n, void *state)
  * Note that the component subgraphs do not contain any edges. These must
  * be obtained from the root graph.
  */
-Agraph_t **pccomps(Agraph_t * g, int *ncc, char *pfx, boolean * pinned)
+Agraph_t **pccomps(Agraph_t * g, int *ncc, char *pfx, bool * pinned)
 {
     int c_cnt = 0;
     char buffer[SMALLBUF];
@@ -80,7 +80,7 @@ Agraph_t **pccomps(Agraph_t * g, int *ncc, char *pfx, boolean * pinned)
     Agraph_t **ccs;
     int len;
     int bnd = 10;
-    boolean pin = FALSE;
+    bool pin = FALSE;
 
     if (agnnodes(g) == 0) {
        *ncc = 0;
index 2fd2527b42e7dccbe563cf64a79631233799df20..8e564ff1ed1201a48eff2b49bfba8d27104a9675 100644 (file)
@@ -578,7 +578,7 @@ point *putGraphs(int ng, Agraph_t ** gs, Agraph_t * root,
     point *places;
     Dict_t *ps;
     int i;
-    boolean *fixed = pinfo->fixed;
+    bool *fixed = pinfo->fixed;
     int fixed_cnt = 0;
     box fixed_bb = { {0, 0}, {0, 0} };
     point center;
index 384a94420ea62b364177ea159b3a02afdf2bdbaf..7c8b415ea9501eb0aecf04d89bf7c135fdb190f5 100644 (file)
@@ -44,7 +44,7 @@ extern "C" {
        unsigned int margin;    /* margin left around objects, in points */
        int doSplines;          /* use splines in constructing graph shape */
        pack_mode mode;         /* granularity and method */
-       boolean *fixed;         /* fixed[i] == true implies g[i] should not be moved */
+       bool *fixed;            /* fixed[i] == true implies g[i] should not be moved */
     } pack_info;
 
     extern point *putGraphs(int, Agraph_t **, Agraph_t *, pack_info *);
@@ -56,7 +56,7 @@ extern "C" {
 
     extern int isConnected(Agraph_t *);
     extern Agraph_t **ccomps(Agraph_t *, int *, char *);
-    extern Agraph_t **pccomps(Agraph_t *, int *, char *, boolean *);
+    extern Agraph_t **pccomps(Agraph_t *, int *, char *, bool *);
     extern int nodeInduce(Agraph_t *);
 
 #ifdef __cplusplus