[cairo-commit] 4 commits - src/cairo-atsui-font.c src/cairo.h src/cairo-pdf-surface.c src/cairo-win32-surface.c

Carl Worth cworth at kemper.freedesktop.org
Thu May 18 21:52:47 PDT 2006


 src/cairo-atsui-font.c    |    7 +++++++
 src/cairo-pdf-surface.c   |    4 ++--
 src/cairo-win32-surface.c |    6 +++---
 src/cairo.h               |    6 +++---
 4 files changed, 15 insertions(+), 8 deletions(-)

New commits:
diff-tree 89384ae12474c257fb47e4231229235207ab8f85 (from e2713057f80c412a3ba947f9c7af2f18dd26105e)
Author: Carl Worth <cworth at cworth.org>
Date:   Thu May 18 21:48:38 2006 -0700

    PDF: Squelch a couple of bogus "may be used uninitialized" warnings.

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index a37a540..ff7c342 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -751,7 +751,7 @@ emit_image (cairo_pdf_surface_t		*surfac
     unsigned long rgb_size, compressed_size;
     pixman_bits_t *pixel;
     int i, x, y;
-    cairo_pdf_resource_t smask;
+    cairo_pdf_resource_t smask = {0}; /* squelch bogus compiler warning */
     cairo_bool_t need_smask;
 
     /* XXX: Need to rewrite this as a pdf_surface function with
@@ -886,7 +886,7 @@ emit_surface_pattern (cairo_pdf_surface_
     cairo_image_surface_t *image;
     void *image_extra;
     cairo_status_t status = CAIRO_STATUS_SUCCESS;
-    cairo_pdf_resource_t alpha, image_resource;
+    cairo_pdf_resource_t alpha, image_resource = {0}; /* squelch bogus compiler warning */
     cairo_matrix_t cairo_p2d, pdf_p2d;
     cairo_extend_t extend = cairo_pattern_get_extend (&pattern->base);
     int xstep, ystep;
diff-tree e2713057f80c412a3ba947f9c7af2f18dd26105e (from 5bdcfd14136d02ccaec275b2bcd5fb2744352f87)
Author: Vladimir Vukicevic <vladimir at pobox.com>
Date:   Wed Mar 15 14:10:59 2006 -0800

    Define kCGBitmapByteOrder32Host for when the SDK doesn't define it
    (cherry picked from bd9b5d29e39f424e912184dcd0dc2610637d5fdf commit)

diff --git a/src/cairo-atsui-font.c b/src/cairo-atsui-font.c
index acff503..878eaf8 100644
--- a/src/cairo-atsui-font.c
+++ b/src/cairo-atsui-font.c
@@ -50,6 +50,13 @@
 #define FloatToFixed(a)     ((Fixed)((float)(a) * fixed1))
 #endif
 
+/* If this isn't defined, we must be building on non-intel,
+ * hence it will be 0.
+ */
+#ifndef kCGBitmapByteOrder32Host
+#define kCGBitmapByteOrder32Host 0
+#endif
+
 typedef struct _cairo_atsui_font_face cairo_atsui_font_face_t;
 typedef struct _cairo_atsui_font cairo_atsui_font_t;
 
diff-tree 5bdcfd14136d02ccaec275b2bcd5fb2744352f87 (from e8069da97bc5c09d9bac91cf401d9e3c3ba91607)
Author: Vladimir Vukicevic <vladimir at cyclone.vlad1.com>
Date:   Thu Mar 16 14:14:35 2006 -0800

    Whitespace fix
    (cherry picked from 0bb567a2f1807d83508e2d7598a8bd8f4d94208d commit)

diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index 748d289..9ea5522 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -1119,8 +1119,8 @@ cairo_win32_surface_create (HDC hdc)
 	    format = CAIRO_FORMAT_ARGB32;
 	else if (depth == 24)
 	    format = CAIRO_FORMAT_RGB24;
-        else if (depth == 16)
-            format = CAIRO_FORMAT_RGB24;
+	else if (depth == 16)
+	    format = CAIRO_FORMAT_RGB24;
 	else if (depth == 8)
 	    format = CAIRO_FORMAT_A8;
 	else if (depth == 1)
diff-tree e8069da97bc5c09d9bac91cf401d9e3c3ba91607 (from 9b84b3da58a62b25c129626f918713036e41cc88)
Author: Vladimir Vukicevic <vladimir at cyclone.vlad1.com>
Date:   Thu Mar 16 17:00:37 2006 -0800

    CAIRO_SCALED_FONT_TYPE_* -> CAIRO_FONT_TYPE_*
    
    Some of these were missed when CAIRO_SCALED_FONT_TYPE_* was renamed.
    (cherry picked from 33dba4a690a5e4ec13ed294307b89cceac1ca696 commit)

diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index 12486cd..748d289 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -1004,7 +1004,7 @@ _cairo_win32_surface_show_glyphs (void		
     int output_count = 0;
 
     /* We can only handle win32 fonts */
-    if (cairo_scaled_font_get_type (scaled_font) != CAIRO_SCALED_FONT_TYPE_WIN32)
+    if (cairo_scaled_font_get_type (scaled_font) != CAIRO_FONT_TYPE_WIN32)
 	return CAIRO_INT_STATUS_UNSUPPORTED;
 
     /* We can only handle opaque solid color sources */
diff --git a/src/cairo.h b/src/cairo.h
index cd23df4..5bf6984 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -931,9 +931,9 @@ cairo_font_face_status (cairo_font_face_
 
 /**
  * cairo_font_type_t
- * @CAIRO_SCALED_FONT_TYPE_FT: The font is of type ft
- * @CAIRO_SCALED_FONT_TYPE_WIN32: The font is of type win32
- * @CAIRO_SCALED_FONT_TYPE_ATSUI: The font is of type atsui
+ * @CAIRO_FONT_TYPE_FT: The font is of type ft
+ * @CAIRO_FONT_TYPE_WIN32: The font is of type win32
+ * @CAIRO_FONT_TYPE_ATSUI: The font is of type atsui
  *
  * @cairo_font_type_t is used to describe the type of a given font
  * face or scaled font. The font types are also known as "font


More information about the cairo-commit mailing list