From ce51c7b460bb862a54d01d21dbf7701d61a597af Mon Sep 17 00:00:00 2001 From: erg Date: Thu, 7 Dec 2006 22:49:35 +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 --- cmd/tools/gvpack.c | 6 +++--- lib/cdt/cdt.h | 14 ++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cmd/tools/gvpack.c b/cmd/tools/gvpack.c index 170afa75a..21bce0f91 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -67,7 +67,7 @@ typedef struct { } pair_t; static int margin = 8; /* Default margin in packing */ -static bool doSplines = TRUE; /* Use edges in packing */ +static boolean 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; @@ -244,7 +244,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, bool fill) +static void init_graph(Agraph_t * g, boolean fill) { int d; @@ -588,7 +588,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; - bool doWarn = TRUE; + boolean doWarn = TRUE; if (verbose) fprintf(stderr, "Creating clone graph\n"); diff --git a/lib/cdt/cdt.h b/lib/cdt/cdt.h index 4112b5bda..0f2fdcdc4 100644 --- a/lib/cdt/cdt.h +++ b/lib/cdt/cdt.h @@ -24,9 +24,17 @@ #define CDT_VERSION 19991101L +#define Void_t void +#define _ARG_(x) x +#ifndef NIL +#define NIL(type) ((type)0) +#endif + +#include + #if _PACKAGE_ast # include -#else +#elif _BLD_cdt # include "ast_common.h" #endif @@ -155,7 +163,6 @@ extern "C" { #define DT_DISC 3 /* discipline is about to be changed */ #define DT_METH 4 /* method is about to be changed */ - _BEGIN_EXTERNS_ /* public data */ #if _BLD_cdt && defined(__EXPORT__) #define extern __EXPORT__ #endif @@ -183,7 +190,6 @@ extern "C" { #endif #undef extern - _END_EXTERNS_ _BEGIN_EXTERNS_ /* public functions */ #if _BLD_cdt && defined(__EXPORT__) #define extern __EXPORT__ #endif @@ -210,7 +216,7 @@ extern "C" { extern unsigned int dtstrhash _ARG_((unsigned int, Void_t *, int)); #undef extern - _END_EXTERNS_ + #define _DT_(d) ((Dt_t*)(d)) #define dtvnext(d) (_DT_(d)->view) #define dtvcount(d) (_DT_(d)->nview) -- 2.40.0