Add includes to get sized-integer types such as uint32_t.

Fix declaration of image data array to be uint32_t rather than unsigned long. Fixes four out of the remaining five failures in bug #4245.
This commit is contained in:
Carl Worth 2005-09-01 02:14:31 +00:00
parent 0f4beab507
commit 7e4465819b
11 changed files with 52 additions and 9 deletions

View file

@ -1,3 +1,20 @@
2005-09-01 Carl Worth <cworth@cworth.org>
* test/cairo-test.h: Add includes to get sized-integer types such
as uint32_t.
* test/filter-nearest-offset.c: (draw):
* test/mask-ctm.c: (draw):
* test/mask-surface-ctm.c: (draw):
* test/move-to-show-surface.c: (draw):
* test/paint-with-alpha.c: (draw):
* test/scale-source-surface-paint.c: (draw):
* test/set-source.c: (draw):
* test/source-surface-scale-paint.c: (draw):
* test/translate-show-surface.c: (draw): Fix declaration of image
data array to be uint32_t rather than unsigned long. Fixes four
out of the remaining five failures in bug #4245.
2005-08-31 Carl Worth <cworth@cworth.org>
* test/cairo-test.c: (create_xlib_surface): Add call to

View file

@ -26,10 +26,36 @@
#ifndef _CAIRO_TEST_H_
#define _CAIRO_TEST_H_
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <math.h>
#include <cairo.h>
#include <cairo-debug.h>
#if HAVE_STDINT_H
# include <stdint.h>
#elif HAVE_INTTYPES_H
# include <inttypes.h>
#elif HAVE_SYS_INT_TYPES_H
# include <sys/int_types.h>
#elif defined(_MSC_VER)
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
# ifndef HAVE_UINT64_T
# define HAVE_UINT64_T 1
# endif
#else
#error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, \etc.)
#endif
typedef enum cairo_test_status {
CAIRO_TEST_SUCCESS = 0,
CAIRO_TEST_FAILURE,

View file

@ -44,7 +44,7 @@ static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
{
cairo_surface_t *surface;
unsigned long data[STAMP_WIDTH * STAMP_HEIGHT] = {
uint32_t data[STAMP_WIDTH * STAMP_HEIGHT] = {
0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000,
0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000,

View file

@ -36,7 +36,7 @@ draw (cairo_t *cr, int width, int height)
{
cairo_surface_t *mask_surface;
cairo_pattern_t *mask;
unsigned long data[] = {
uint32_t data[] = {
0x80000000, 0x80000000,
0x80000000, 0x80000000,
};

View file

@ -35,7 +35,7 @@ static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
{
cairo_surface_t *mask;
unsigned long data[] = {
uint32_t data[] = {
0x80000000, 0x80000000,
0x80000000, 0x80000000,
};

View file

@ -55,7 +55,7 @@ static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
{
cairo_surface_t *surface;
unsigned long colors[4] = {
uint32_t colors[4] = {
0xffffffff, 0xffff0000,
0xff00ff00, 0xff0000ff
};

View file

@ -35,7 +35,7 @@ static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
{
cairo_surface_t *surface;
unsigned long data[16] = {
uint32_t data[16] = {
0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000,
0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000,

View file

@ -35,7 +35,7 @@ static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
{
cairo_surface_t *surface;
unsigned long data[16] = {
uint32_t data[16] = {
0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000,
0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000,

View file

@ -37,7 +37,7 @@ draw (cairo_t *cr, int width, int height)
int i;
/* This color value might need to change in the future when we fix
* the rounding in cairo-color.c */
unsigned long color = 0x7f19334C;
uint32_t color = 0x7f19334C;
cairo_surface_t *surface;
cairo_pattern_t *pattern;

View file

@ -35,7 +35,7 @@ static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
{
cairo_surface_t *surface;
unsigned long data[16] = {
uint32_t data[16] = {
0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000,
0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000,

View file

@ -53,7 +53,7 @@ static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
{
cairo_surface_t *surface;
unsigned long colors[4] = {
uint32_t colors[4] = {
0xffffffff, 0xffff0000,
0xff00ff00, 0xff0000ff
};