]> granicus.if.org Git - graphviz/commitdiff
Re-do some .h files to limit exposure of internal values, .h files,
authorerg <devnull@localhost>
Thu, 7 Dec 2006 22:49:37 +0000 (22:49 +0000)
committererg <devnull@localhost>
Thu, 7 Dec 2006 22:49:37 +0000 (22:49 +0000)
and dependencies on config.h; return to a simple, concrete boolean type

plugin/core/gvloadimage_core.c
plugin/core/gvrender_core_dot.c
plugin/gd/gvloadimage_gd.c
plugin/gd/gvrender_gd.c
plugin/gtk/gvdevice_gtk.c
plugin/pango/gvloadimage_pango.c
plugin/xlib/gvdevice_xlib.c

index f49a8e19524bc0189f7f19d72ec24f4020114529..597b68df83cbf5d22038b7abfe7a2e2acda014e6 100644 (file)
@@ -49,7 +49,7 @@ typedef enum {
     FORMAT_PS_PS, FORMAT__PS,
 } format_type;
 
-static void core_loadimage_svg(GVJ_t * job, usershape_t *us, boxf b, bool filled)
+static void core_loadimage_svg(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
 {
     assert(job);
     assert(us);
@@ -71,7 +71,7 @@ static void core_loadimage_svg(GVJ_t * job, usershape_t *us, boxf b, bool filled
     core_fputs(job, "/>\n");
 }
 
-static void core_loadimage_fig(GVJ_t * job, usershape_t *us, boxf bf, bool filled)
+static void core_loadimage_fig(GVJ_t * job, usershape_t *us, boxf bf, boolean filled)
 {
     int object_code = 2;        /* always 2 for polyline */
     int sub_type = 5;           /* always 5 for image */
@@ -113,7 +113,7 @@ static void core_loadimage_fig(GVJ_t * job, usershape_t *us, boxf bf, bool fille
            b.LL.x, b.LL.y);
 }
 
-static void core_loadimage_vrml(GVJ_t * job, usershape_t *us, boxf b, bool filled)
+static void core_loadimage_vrml(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
 {
     FILE *out;
     obj_state_t *obj;
@@ -156,7 +156,7 @@ static void ps_freeimage(usershape_t *us)
 }
 
 /* usershape described by a postscript file */
-static void core_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, bool filled)
+static void core_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
 {
     FILE *out;
 
@@ -193,7 +193,7 @@ static void core_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, bool filled)
                us->data = malloc(statbuf.st_size);
                read(fd, us->data, statbuf.st_size);
 #endif
-               us->must_inline = true;
+               us->must_inline = TRUE;
                 break;
             default:
                 break;
@@ -214,7 +214,7 @@ static void core_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, bool filled)
 }
 
 /* usershape described by a member of a postscript library */
-static void core_loadimage_pslib(GVJ_t * job, usershape_t *us, boxf b, bool filled)
+static void core_loadimage_pslib(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
 {
     int i;
     pointf AF[4];
index ef08380fc5658cdaffda6dbf6a72dd05d4ed7f6f..b79b569bdd1e2d47423dd64aedd00d8952516e05 100644 (file)
@@ -38,7 +38,7 @@
 extern void attach_attrs(graph_t * g);
 extern void attach_attrs_and_arrows(graph_t*, int*, int*);
 extern char *xml_string(char *str);
-extern void write_plain(GVJ_t * job, graph_t * g, FILE * f, bool extend);
+extern void write_plain(GVJ_t * job, graph_t * g, FILE * f, boolean extend);
 extern void output_point(agxbuf *xbuf, pointf p);
 
 #define GNEW(t)          (t*)malloc(sizeof(t))
@@ -293,10 +293,10 @@ static void dot_end_graph(GVJ_t *job)
 
     switch (job->render.id) {
        case FORMAT_PLAIN:
-           write_plain(job, g, job->output_file, false);
+           write_plain(job, g, job->output_file, FALSE);
            break;
        case FORMAT_PLAIN_EXT:
-           write_plain(job, g, job->output_file, true);
+           write_plain(job, g, job->output_file, TRUE);
            break;
        case FORMAT_DOT:
        case FORMAT_CANON:
index 50ef8742d8edcc8c3964b433bf4181df63b3af3d..be376dc3c85887beb5444f8c51057a24eb318cd0 100644 (file)
@@ -106,7 +106,7 @@ static gdImagePtr gd_loadimage(GVJ_t * job, usershape_t *us)
     return (gdImagePtr)(us->data);
 }
 
-static void gd_loadimage_gd(GVJ_t * job, usershape_t *us, boxf b, bool filled)
+static void gd_loadimage_gd(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
 {
     gdImagePtr im3, im2 = NULL, im = (gdImagePtr) job->surface;
 
@@ -126,7 +126,7 @@ static void gd_loadimage_gd(GVJ_t * job, usershape_t *us, boxf b, bool filled)
     }
 }
 
-static void gd_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, bool filled)
+static void gd_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
 {
     gdImagePtr im = NULL;
     FILE *out = job->output_file;
index 4c5246603eff1c8373d45c7d21b1b146cd46b4b0..76f008dff6d63e9569799731abe0204257254fc0 100644 (file)
@@ -35,7 +35,7 @@
 typedef enum { FORMAT_GD, FORMAT_GD2, FORMAT_GIF, FORMAT_JPEG, FORMAT_PNG,
        FORMAT_WBMP, FORMAT_XBM, } format_type;
 
-extern bool mapbool(char *);
+extern boolean mapbool(char *);
 extern char *safefile(char *shapefilename);
 extern pointf Bezier(pointf * V, int degree, double t, pointf * Left, pointf * Right);
 
@@ -67,8 +67,8 @@ static int white, black, transparent, basecolor;
 static void gdgen_begin_page(GVJ_t * job)
 {
     char *bgcolor_str = NULL, *truecolor_str = NULL;
-    bool truecolor_p = FALSE;  /* try to use cheaper paletted mode */
-    bool bg_transparent_p = FALSE;
+    boolean truecolor_p = FALSE;       /* try to use cheaper paletted mode */
+    boolean bg_transparent_p = FALSE;
     int bgcolor = 0;
     gdImagePtr im = NULL;
 
index 9e5447658ae5ba1ec9fde53236d524d02148883c..d601721fe88649664e6bdeaaaddf091964ebcbbd 100644 (file)
@@ -104,7 +104,7 @@ static void initialize_gtk(GVJ_t *firstjob)
     scr = DefaultScreen(dpy);
     firstjob->device_dpi.x = DisplayWidth(dpy, scr) * 25.4 / DisplayWidthMM(dpy, scr);
     firstjob->device_dpi.y = DisplayHeight(dpy, scr) * 25.4 / DisplayHeightMM(dpy, scr);
-    firstjob->device_sets_dpi = true;
+    firstjob->device_sets_dpi = TRUE;
 }
 
 static void finalize_gtk(GVJ_t *firstjob)
index c8565bb0bbd09ae015fa3fc35e9de70f2d731833..1469c87adc6face684bea826357fc544fc35adfe 100644 (file)
@@ -80,7 +80,7 @@ static cairo_surface_t* cairo_loadimage(GVJ_t * job, usershape_t *us)
     return surface;
 }
 
-static void pango_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, bool filled)
+static void pango_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
 {
     cairo_t *cr = (cairo_t *) job->surface; /* target context */
     cairo_surface_t *surface = NULL; /* source surface */
@@ -97,7 +97,7 @@ static void pango_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, bool fil
     }
 }
 
-static void pango_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, bool filled)
+static void pango_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean filled)
 {
     cairo_surface_t *surface = NULL; /* source surface */
     FILE *out = job->output_file;
index abfddc235a4d07b0ae0c488e15cd6e403426cdd0..20c914cedbee8f74b81fc2924d97afdc05ec3b32 100644 (file)
@@ -111,7 +111,7 @@ static void handle_client_message(GVJ_t * job, XClientMessageEvent * cmev)
         exit(0);
 }
 
-static bool handle_keypress(GVJ_t *job, XKeyEvent *kev)
+static boolean handle_keypress(GVJ_t *job, XKeyEvent *kev)
 {
     
     int i;
@@ -477,7 +477,7 @@ static void initialize_xlib(GVJ_t *firstjob)
 
     firstjob->device_dpi.x = DisplayWidth(dpy, scr) * 25.4 / DisplayWidthMM(dpy, scr);
     firstjob->device_dpi.y = DisplayHeight(dpy, scr) * 25.4 / DisplayHeightMM(dpy, scr);
-    firstjob->device_sets_dpi = true;
+    firstjob->device_sets_dpi = TRUE;
 }
 
 static void finalize_xlib(GVJ_t *firstjob)
@@ -490,7 +490,7 @@ static void finalize_xlib(GVJ_t *firstjob)
     struct timeval timeout;
 #ifdef HAVE_SYS_INOTIFY_H
     int wd=0;
-    bool watching_p = FALSE;
+    boolean watching_p = FALSE;
     static char *dir;
     char *p, *cwd = NULL;