From: erg Date: Thu, 7 Dec 2006 22:49:36 +0000 (+0000) Subject: Re-do some .h files to limit exposure of internal values, .h files, X-Git-Tag: LAST_LIBGRAPH~32^2~5776 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc0a0ea9bb41b38584a503aac7c5651c7ad3f951;p=graphviz 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 --- diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c index 0652e873c..e033cba1e 100644 --- a/lib/gvc/gvconfig.c +++ b/lib/gvc/gvconfig.c @@ -38,7 +38,7 @@ #include "gvcint.h" #include "gvcproc.h" -extern const bool Demand_Loading; +extern const int Demand_Loading; #ifdef WITH_CODEGENS #ifdef QUARTZ_RENDER @@ -388,7 +388,7 @@ codegen_info_t *next_codegen(codegen_info_t * p) ++p; #ifdef QUARTZ_RENDER - static bool unscanned = TRUE; + static boolean unscanned = TRUE; if (!p->name && unscanned) { /* reached end of codegens but haven't yet scanned for Quicktime codegens... */ @@ -443,7 +443,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, bool rescan) +void gvconfig(GVC_t * gvc, boolean rescan) { #if 0 gvplugin_library_t **libraryp; diff --git a/lib/gvc/gvcproc.h b/lib/gvc/gvcproc.h index 5d49d2540..b4377aaaa 100644 --- a/lib/gvc/gvcproc.h +++ b/lib/gvc/gvcproc.h @@ -28,12 +28,12 @@ extern "C" { /* configuration */ extern char *gvconfig_libdir(void); - extern void gvconfig(GVC_t * gvc, bool rescan); + extern void gvconfig(GVC_t * gvc, boolean rescan); extern char *gvhostname(void); /* plugins */ - extern bool gvplugin_install(GVC_t * gvc, api_t api, + extern boolean 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); @@ -46,7 +46,7 @@ extern "C" { /* job */ extern void gvjobs_output_filename(GVC_t * gvc, char *name); - extern bool gvjobs_output_langname(GVC_t * gvc, char *name); + extern boolean gvjobs_output_langname(GVC_t * gvc, char *name); extern GVJ_t *gvjobs_first(GVC_t * gvc); extern GVJ_t *gvjobs_next(GVC_t * gvc); extern void gvjobs_delete(GVC_t * gvc); @@ -57,10 +57,10 @@ extern "C" { /* textlayout */ extern int gvtextlayout_select(GVC_t * gvc); - extern bool gvtextlayout(GVC_t *gvc, textpara_t *para, char **fontpath); + extern boolean gvtextlayout(GVC_t *gvc, textpara_t *para, char **fontpath); /* loadimage */ - extern void gvloadimage(GVJ_t *job, usershape_t *us, boxf b, bool filled, char *target); + extern void gvloadimage(GVJ_t *job, usershape_t *us, boxf b, boolean filled, char *target); /* usershapes */ extern point gvusershape_size(graph_t *g, char *name); @@ -108,14 +108,14 @@ extern "C" { extern void gvrender_set_fillcolor(GVJ_t * job, char *name); extern void gvrender_set_style(GVJ_t * job, char **s); extern void gvrender_ellipse(GVJ_t * job, pointf p, - double rx, double ry, bool filled); - extern void gvrender_polygon(GVJ_t * job, pointf * AF, int n, bool filled); - extern void gvrender_box(GVJ_t * job, boxf BF, bool filled); + double rx, double ry, boolean filled); + extern void gvrender_polygon(GVJ_t * job, pointf * AF, int n, boolean filled); + extern void gvrender_box(GVJ_t * job, boxf BF, boolean filled); extern void gvrender_beziercurve(GVJ_t * job, pointf * AF, int n, - int arrow_at_start, int arrow_at_end, bool filled); + int arrow_at_start, int arrow_at_end, boolean filled); extern void gvrender_polyline(GVJ_t * job, pointf * AF, int n); extern void gvrender_comment(GVJ_t * job, char *str); - extern void gvrender_usershape(GVJ_t * job, char *name, pointf * AF, int n, bool filled); + extern void gvrender_usershape(GVJ_t * job, char *name, pointf * AF, int n, boolean filled); /* layout */ diff --git a/lib/gvc/gvevent.c b/lib/gvc/gvevent.c index 7bc7df36d..d9bf079bd 100644 --- a/lib/gvc/gvevent.c +++ b/lib/gvc/gvevent.c @@ -27,8 +27,8 @@ extern char *strdup_and_subst_obj(char *str, void * n); extern void emit_graph(GVJ_t * job, graph_t * g); -extern bool overlap_edge(edge_t *e, boxf b); -extern bool overlap_node(node_t *n, boxf b); +extern boolean overlap_edge(edge_t *e, boxf b); +extern boolean overlap_node(node_t *n, boxf b); extern int gvLayout(GVC_t *gvc, graph_t *g, char *engine); extern int gvRenderFilename(GVC_t *gvc, graph_t *g, char *format, char *filename); extern void graph_cleanup(graph_t *g); diff --git a/lib/gvc/gvjobs.c b/lib/gvc/gvjobs.c index 1922d177d..c839a9f8e 100644 --- a/lib/gvc/gvjobs.c +++ b/lib/gvc/gvjobs.c @@ -66,7 +66,7 @@ void gvjobs_output_filename(GVC_t * gvc, char *name) } /* -T switches */ -bool gvjobs_output_langname(GVC_t * gvc, char *name) +boolean gvjobs_output_langname(GVC_t * gvc, char *name) { if (!gvc->jobs) { output_langname_job = gvc->job = gvc->jobs = zmalloc(sizeof(GVJ_t));