From 780d50830fb9f1b22d8ff2cd9b0b498f0664cdb4 Mon Sep 17 00:00:00 2001 From: erg Date: Thu, 7 Dec 2006 22:49:36 +0000 Subject: [PATCH] Re-do some .h files to limit exposure of internal values, .h files, and dependencies on config.h; return to a simple, concrete boolean type --- lib/dotgen/conc.c | 10 +++++----- lib/dotgen/dotprocs.h | 2 +- lib/dotgen/dotsplines.c | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/dotgen/conc.c b/lib/dotgen/conc.c index 636c46489..0a64213fd 100644 --- a/lib/dotgen/conc.c +++ b/lib/dotgen/conc.c @@ -25,7 +25,7 @@ #define UP 0 #define DOWN 1 -static bool samedir(edge_t * e, edge_t * f) +static boolean samedir(edge_t * e, edge_t * f) { edge_t *e0, *f0; @@ -39,13 +39,13 @@ static bool samedir(edge_t * e, edge_t * f) * (ND_rank(e0->tail) - ND_rank(e0->head)) > 0); } -static bool downcandidate(node_t * v) +static boolean 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 bool bothdowncandidates(node_t * u, node_t * v) +static boolean bothdowncandidates(node_t * u, node_t * v) { edge_t *e, *f; e = ND_in(u).list[0]; @@ -57,13 +57,13 @@ static bool bothdowncandidates(node_t * u, node_t * v) return FALSE; } -static bool upcandidate(node_t * v) +static boolean 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 bool bothupcandidates(node_t * u, node_t * v) +static boolean bothupcandidates(node_t * u, node_t * v) { edge_t *e, *f; e = ND_out(u).list[0]; diff --git a/lib/dotgen/dotprocs.h b/lib/dotgen/dotprocs.h index ccab9e9bb..7ca1bdaf7 100644 --- a/lib/dotgen/dotprocs.h +++ b/lib/dotgen/dotprocs.h @@ -77,7 +77,7 @@ extern "C" { #if defined(_BLD_dot) && defined(_DLL) # define extern __EXPORT__ #endif - extern void dot_nodesize(Agnode_t *, bool); + extern void dot_nodesize(Agnode_t *, boolean); extern void dot_concentrate(Agraph_t *); extern void dot_mincross(Agraph_t *); extern void dot_position(Agraph_t *); diff --git a/lib/dotgen/dotsplines.c b/lib/dotgen/dotsplines.c index d1f462ec8..88beba039 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -79,7 +79,7 @@ typedef struct { static void adjustregularpath(path *, int, int); static Agedge_t *bot_bound(Agedge_t *, int); -static bool pathscross(Agnode_t *, Agnode_t *, Agedge_t *, Agedge_t *); +static boolean pathscross(Agnode_t *, Agnode_t *, Agedge_t *, Agedge_t *); #ifdef OBSOLETE static void chooseflatsides(pathend_t *, pathend_t *, int *, int *, int *, int *, int *, int *); @@ -109,13 +109,13 @@ static Agedge_t *top_bound(Agedge_t *, int); #define GROWEDGES (edges = ALLOC (n_edges + CHUNK, edges, edge_t*)) -static bool spline_merge(node_t * n) +static boolean spline_merge(node_t * n) { return ((ND_node_type(n) == VIRTUAL) && ((ND_in(n).size > 1) || (ND_out(n).size > 1))); } -static bool swap_ends_p(edge_t * e) +static boolean swap_ends_p(edge_t * e) { while (ED_to_orig(e)) e = ED_to_orig(e); @@ -889,7 +889,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, - bool isBegin) + boolean isBegin) { box b; graph_t* g = n->graph; @@ -908,7 +908,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, bool isBegin) + pathend_t* endp, boolean isBegin) { box b; graph_t* g = n->graph; @@ -2132,7 +2132,7 @@ int dir; return rv; } -static bool pathscross(n0, n1, ie1, oe1) +static boolean pathscross(n0, n1, ie1, oe1) node_t *n0, *n1; edge_t *ie1, *oe1; { -- 2.40.0