[cairo-commit] 3 commits - src/cairo-compiler-private.h src/cairo-fixed-private.h src/cairo-image-surface.c src/cairo-output-stream.c
Carl Worth
cworth at kemper.freedesktop.org
Thu Feb 28 15:24:15 PST 2008
src/cairo-compiler-private.h | 5 ++++-
src/cairo-fixed-private.h | 2 +-
src/cairo-image-surface.c | 3 ---
src/cairo-output-stream.c | 5 +----
4 files changed, 6 insertions(+), 9 deletions(-)
New commits:
commit 4c7784e91eb953b905f187dda2a76dc102d73d01
Author: Jody Goldberg <jody at gnome.org>
Date: Thu Feb 28 15:23:53 2008 -0800
Fix PDF ouput when cross-compiling with mingw
Need to use __WIN32__ instead of _MSC_VER to select _snprintf in
place of snprintf when cross compiling. Otherwise all all %ld
arguments get misprinted resulting in broken PDF output.
diff --git a/src/cairo-compiler-private.h b/src/cairo-compiler-private.h
index 1c6645e..9965949 100644
--- a/src/cairo-compiler-private.h
+++ b/src/cairo-compiler-private.h
@@ -111,8 +111,11 @@ CAIRO_BEGIN_DECLS
#define __attribute__(x)
#endif
-#ifdef _MSC_VER
+#ifdef __WIN32__
#define snprintf _snprintf
+#endif
+
+#ifdef _MSC_VER
#undef inline
#define inline __inline
#endif
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c
index 22245f7..a9bc6ef 100644
--- a/src/cairo-output-stream.c
+++ b/src/cairo-output-stream.c
@@ -36,16 +36,13 @@
#include "cairoint.h"
#include "cairo-output-stream-private.h"
+#include "cairo-compiler-private.h"
#include <stdio.h>
#include <locale.h>
#include <ctype.h>
#include <errno.h>
-#ifdef _MSC_VER
-#define snprintf _snprintf
-#endif /* _MSC_VER */
-
void
_cairo_output_stream_init (cairo_output_stream_t *stream,
commit 3d9db511c6990481add24f14225e36ea4d3f62d5
Author: Carl Worth <cworth at cworth.org>
Date: Thu Feb 28 15:07:50 2008 -0800
Remove references to PIXMAN_yuy2 and PIXMAN_yv12 enum values
These were added in cb5ea8abfdf2c92241d4dea8bb827648697fd8e9 to
quiet a compiler warning. We're reverting them now to avoid
gratuitously requiring a new pixman version just to pick up two
enum values that we aren't actually using.
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 2be0b01..1704997 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -59,7 +59,6 @@ _cairo_format_from_pixman_format (pixman_format_code_t pixman_format)
case PIXMAN_a4: case PIXMAN_r1g2b1: case PIXMAN_b1g2r1:
case PIXMAN_a1r1g1b1: case PIXMAN_a1b1g1r1: case PIXMAN_c4:
case PIXMAN_g4: case PIXMAN_g1:
- case PIXMAN_yuy2: case PIXMAN_yv12:
default:
return CAIRO_FORMAT_INVALID;
}
@@ -101,8 +100,6 @@ _cairo_content_from_pixman_format (pixman_format_code_t pixman_format)
case PIXMAN_c4:
case PIXMAN_g4:
case PIXMAN_g1:
- case PIXMAN_yuy2:
- case PIXMAN_yv12:
return CAIRO_CONTENT_COLOR;
case PIXMAN_a8:
case PIXMAN_a1:
commit a8e5c6b924447bb1303589cc31792a6c4bcc27ec
Author: Carl Worth <cworth at cworth.org>
Date: Thu Feb 28 15:05:12 2008 -0800
Fix typo in comment
diff --git a/src/cairo-fixed-private.h b/src/cairo-fixed-private.h
index 626c02a..f1d5820 100644
--- a/src/cairo-fixed-private.h
+++ b/src/cairo-fixed-private.h
@@ -186,7 +186,7 @@ _cairo_fixed_to_16_16 (cairo_fixed_t f)
#else
cairo_fixed_16_16_t x;
- /* Handle overflow/underflow by claping to the lowest/highest
+ /* Handle overflow/underflow by clamping to the lowest/highest
* value representable as 16.16
*/
if ((f >> CAIRO_FIXED_FRAC_BITS) < INT16_MIN) {
More information about the cairo-commit
mailing list