summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-02-04 18:46:22 +0100
committerAlexander Larsson <alexl@redhat.com>2010-02-04 18:49:05 +0100
commit39be5a8b13ae793aacf641ef605a4cef8eabf373 (patch)
tree0a97d69e844486bcb29ef958033c8e4f66c06207 /common
parent90104b39aec42210bf823a1a5f23e1822f32c038 (diff)
downloadspice-39be5a8b13ae793aacf641ef605a4cef8eabf373.tar.gz
spice-39be5a8b13ae793aacf641ef605a4cef8eabf373.tar.xz
spice-39be5a8b13ae793aacf641ef605a4cef8eabf373.zip
Use standard int types and <spice/types.h>
Diffstat (limited to 'common')
-rw-r--r--common/cairo_canvas.c6
-rw-r--r--common/canvas_base.c8
-rw-r--r--common/canvas_utils.h8
-rw-r--r--common/gdi_canvas.c2
-rw-r--r--common/gl_canvas.c2
-rw-r--r--common/lookup3.h20
-rw-r--r--common/lz_config.h8
-rw-r--r--common/quic_config.h7
8 files changed, 15 insertions, 46 deletions
diff --git a/common/cairo_canvas.c b/common/cairo_canvas.c
index 1a4993da..f1988787 100644
--- a/common/cairo_canvas.c
+++ b/common/cairo_canvas.c
@@ -146,7 +146,7 @@ static void canvas_set_line_attr_no_dash(CairoCanvas *canvas, SpiceLineAttr *att
cairo_set_dash(cairo, NULL, 0, 0);
}
-static void canvas_set_dash(CairoCanvas *canvas, UINT8 nseg, SPICE_ADDRESS addr, int start_is_gap)
+static void canvas_set_dash(CairoCanvas *canvas, uint8_t nseg, SPICE_ADDRESS addr, int start_is_gap)
{
SPICE_FIXED28_4* style = (SPICE_FIXED28_4*)SPICE_GET_ADDRESS(addr);
double offset = 0;
@@ -1136,8 +1136,8 @@ void canvas_draw_rop3(CairoCanvas *canvas, SpiceRect *bbox, SpiceClip *clip, Spi
x_pos = bbox->left;
y_pos = bbox->top;
cairo_user_to_device(cairo, &x_pos, &y_pos);
- pos.x = (INT32)x_pos;
- pos.y = (INT32)y_pos;
+ pos.x = (int32_t)x_pos;
+ pos.y = (int32_t)y_pos;
d = canvas_surface_from_self(canvas, &pos, width, heigth);
s = canvas_get_image(&canvas->base, rop3->src_bitmap);
diff --git a/common/canvas_base.c b/common/canvas_base.c
index fe9ef9b7..de467c7a 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -199,10 +199,10 @@ typedef struct CanvasBase {
#endif
typedef struct ATTR_PACKED DataChunk {
- UINT32 size;
+ uint32_t size;
SPICE_ADDRESS prev;
SPICE_ADDRESS next;
- UINT8 data[0];
+ uint8_t data[0];
} DataChunk;
#undef ATTR_PACKED
@@ -217,8 +217,8 @@ typedef struct ATTR_PACKED DataChunk {
static inline void canvas_localize_palette(CanvasBase *canvas, SpicePalette *palette)
{
if (canvas->color_shift == 5) {
- UINT32 *now = palette->ents;
- UINT32 *end = now + palette->num_ents;
+ uint32_t *now = palette->ents;
+ uint32_t *end = now + palette->num_ents;
for (; now < end; now++) {
*now = canvas_16bpp_to_32bpp(*now);
}
diff --git a/common/canvas_utils.h b/common/canvas_utils.h
index 8ccc3044..10f2d640 100644
--- a/common/canvas_utils.h
+++ b/common/canvas_utils.h
@@ -18,13 +18,7 @@
#ifndef _H_CANVAS_UTILS
#define _H_CANVAS_UTILS
-#ifdef __GNUC__
-#include <stdint.h>
-#else
-#include <stddef.h>
-#include <basetsd.h>
-typedef UINT8 uint8_t;
-#endif //__GNUC__
+#include <spice/types.h>
#include "cairo.h"
#include "lz.h"
diff --git a/common/gdi_canvas.c b/common/gdi_canvas.c
index b60bef2a..df5ae64b 100644
--- a/common/gdi_canvas.c
+++ b/common/gdi_canvas.c
@@ -1477,7 +1477,7 @@ static int get_cap(int end_style)
}
}
-static uint32_t *gdi_get_userstyle(GdiCanvas *canvas, UINT8 nseg, SPICE_ADDRESS addr, int start_is_gap)
+static uint32_t *gdi_get_userstyle(GdiCanvas *canvas, uint8_t nseg, SPICE_ADDRESS addr, int start_is_gap)
{
SPICE_FIXED28_4* style = (SPICE_FIXED28_4*)SPICE_GET_ADDRESS(addr);
double offset = 0;
diff --git a/common/gl_canvas.c b/common/gl_canvas.c
index eaf1e91e..fd1a2c9d 100644
--- a/common/gl_canvas.c
+++ b/common/gl_canvas.c
@@ -282,7 +282,7 @@ static void set_brush(GLCanvas *canvas, SpiceBrush *brush)
}
}
-static void set_op(GLCanvas *canvas, UINT16 rop_decriptor)
+static void set_op(GLCanvas *canvas, uint16_t rop_decriptor)
{
GLCOp op;
diff --git a/common/lookup3.h b/common/lookup3.h
index a2fbdeab..00bc4eba 100644
--- a/common/lookup3.h
+++ b/common/lookup3.h
@@ -18,25 +18,7 @@
#ifndef __LOOKUP3_H
#define __LOOKUP3_H
-#ifdef __GNUC__
-
-#include <stdint.h>
-
-#else
-
-#ifdef QXLDD
-#include <windef.h>
-#include "os_dep.h"
-#else
-#include <stddef.h>
-#include <basetsd.h>
-#endif
-
-typedef UINT32 uint32_t;
-typedef UINT16 uint16_t;
-typedef UINT8 uint8_t;
-
-#endif
+#include <spice/types.h>
uint32_t hashlittle(const void *key, size_t length, uint32_t initval);
diff --git a/common/lz_config.h b/common/lz_config.h
index 1020e7ba..748d79df 100644
--- a/common/lz_config.h
+++ b/common/lz_config.h
@@ -20,6 +20,8 @@
#ifndef __LZ_CONFIG_H
#define __LZ_CONFIG_H
+#include <spice/types.h>
+
#ifndef FALSE
#define FALSE 0
#endif
@@ -31,7 +33,6 @@
#ifdef __GNUC__
-#include <stdint.h>
#include <string.h>
#define INLINE inline
@@ -45,15 +46,10 @@
#else
#include <stddef.h>
-#include <basetsd.h>
#include <string.h>
#define INLINE inline
#endif // QXLDD
-typedef UINT32 uint32_t;
-typedef UINT16 uint16_t;
-typedef UINT8 uint8_t;
-
#endif //__GNUC__
#endif //__LZ_CONFIG_H
diff --git a/common/quic_config.h b/common/quic_config.h
index ab418b13..c9eb8fa2 100644
--- a/common/quic_config.h
+++ b/common/quic_config.h
@@ -18,9 +18,10 @@
#ifndef __QUIC_CONFIG_H
#define __QUIC_CONFIG_H
+#include <spice/types.h>
+
#ifdef __GNUC__
-#include <stdint.h>
#include <string.h>
#define INLINE inline
@@ -36,16 +37,12 @@
#define MEMCLEAR(ptr, size) RtlZeroMemory(ptr, size)
#else
#include <stddef.h>
-#include <basetsd.h>
#include <string.h>
#define INLINE inline
#define MEMCLEAR(ptr, size) memset(ptr, 0, size)
#endif
-typedef UINT32 uint32_t;
-typedef UINT16 uint16_t;
-typedef UINT8 uint8_t;
#endif