]> granicus.if.org Git - graphviz/commitdiff
tidy the gvdevice headers, remove some unsigned qualifiers
authorellson <devnull@localhost>
Fri, 5 Sep 2008 12:24:02 +0000 (12:24 +0000)
committerellson <devnull@localhost>
Fri, 5 Sep 2008 12:24:02 +0000 (12:24 +0000)
plugin/gd/gvdevice_gd.c
plugin/gdk_pixbuf/gvdevice_gdk_pixbuf.c
plugin/lasi/gvrender_lasi.cpp
plugin/pango/gvrender_pango.c
plugin/quartz/gvplugin_quartz.c

index 7ab745c08c3f519b6259aeee3fe3d953b53dc27f..aee734986cebea39d85b4358913cad6d157b563f 100644 (file)
 #ifdef HAVE_LIBGD
 #include "gd.h"
 
-extern size_t gvdevice_write(GVJ_t * job, const unsigned char * s, unsigned int len);
-
 int gvdevice_gd_putBuf (gdIOCtx *context, const void *buffer, int len)
 {
-    return gvdevice_write((GVJ_t *)(context->tell), buffer, (unsigned int)len);
+    return gvdevice_write((GVJ_t *)(context->tell), buffer, len);
 }
 
 /* used by gif output */
 void gvdevice_gd_putC (gdIOCtx *context, int C)
 {
-    unsigned char c = C;
+    char c = C;
 
     gvdevice_write((GVJ_t *)(context->tell), &c, 1);
 }
index 399805168357b771666c2f345a572afb1c3bf111..bba7f59f86b09ab5ceff7f8ac2deee7b2db0f3ac 100644 (file)
@@ -34,7 +34,7 @@ typedef enum {
  * Does an in-place conversion of a CAIRO ARGB32 image to GDK RGBA
  */
 static void
-argb2rgba ( unsigned int width, unsigned int height, unsigned char *data)
+argb2rgba ( unsigned int width, unsigned int height, char *data)
 {
 /* define indexes to color bytes in each format */
 #define Ba 0
@@ -60,12 +60,10 @@ argb2rgba ( unsigned int width, unsigned int height, unsigned char *data)
     }
 }
 
-extern size_t gvdevice_write(GVJ_t * job, const unsigned char *s, unsigned int len);
-
 static gboolean
 writer ( const gchar *buf, gsize count, GError **error, gpointer data)
 {
-    if (count == gvdevice_write((GVJ_t *)data, (const unsigned char*)buf, count))
+    if (count == gvdevice_write((GVJ_t *)data, buf, count))
         return TRUE;
     return FALSE;
 }
@@ -96,7 +94,7 @@ static void gdk_pixbuf_format(GVJ_t * job)
     argb2rgba(job->width, job->height, job->imagedata);
 
     pixbuf = gdk_pixbuf_new_from_data(
-                job->imagedata,         // data
+                (unsigned char*)(job->imagedata), // data
                 GDK_COLORSPACE_RGB,     // colorspace
                 TRUE,                   // has_alpha
                 8,                      // bits_per_sample
index a33c85edbdcfdc1dcb751b92b862e9036767e141..b7a326b06c106ce7c2d44202b208fbbfe916c6b0 100644 (file)
@@ -25,6 +25,7 @@
 
 
 #include "gvplugin_render.h"
+#include "gvplugin_device.h"
 #include "ps.h"
 #include "agxbuf.h"
 #include "utils.h"
index 7cbad8d26a4c2b2c2b1cb4d8e21acae07b50cf31..47454ef0d8825f22b22d88edecb8da26bbc85b80 100644 (file)
@@ -68,12 +68,10 @@ static void cairogen_set_color(cairo_t * cr, gvcolor_t * color)
                         color->u.RGBA[2], color->u.RGBA[3]);
 }
 
-extern size_t gvdevice_write(GVJ_t * job, const unsigned char *s, unsigned int len);
-
 static cairo_status_t
 writer (void *closure, const unsigned char *data, unsigned int length)
 {
-    if (length == gvdevice_write((GVJ_t *)closure, data, length))
+    if (length == gvdevice_write((GVJ_t *)closure, (const char*)data, length))
        return CAIRO_STATUS_SUCCESS;
     return CAIRO_STATUS_WRITE_ERROR;
 }
@@ -186,7 +184,7 @@ static void cairogen_end_page(GVJ_t * job)
     case FORMAT_CAIRO:
     default:
         surface = cairo_get_target(cr);
-       job->imagedata = cairo_image_surface_get_data(surface); 
+       job->imagedata = (char *)(cairo_image_surface_get_data(surface));       
        break;
                /* formatting will be done by gvdevice_format() */
     }
index ed33668e356b19b6acfa6164cfb272b63a0ed42a..ae2e9f5128d43820581afef534b787ffe6aed356 100644 (file)
@@ -15,6 +15,7 @@
 **********************************************************/
 
 #include "gvplugin.h"
+#include "gvplugin_device.h"
 #include "gvplugin_quartz.h"
 
 extern gvplugin_installed_t gvrender_quartz_types;
@@ -42,11 +43,9 @@ CFStringRef format_uti [] = {
 
 /* data consumer backed by the gvdevice */
 
-extern size_t gvdevice_write(GVJ_t *job, const unsigned char *s, unsigned int len);
-
 static size_t device_data_consumer_put_bytes (void *info, const void *buffer, size_t count)
 {
-       return gvdevice_write((GVJ_t *)info, (const unsigned char*)buffer, count);
+       return gvdevice_write((GVJ_t *)info, (const char*)buffer, count);
 }
 
 CGDataConsumerCallbacks device_data_consumer_callbacks = {