mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-05 05:12:15 +00:00
Use standard int types and <spice/types.h>
This commit is contained in:
parent
0e7183b35d
commit
6da4b78975
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
20
lookup3.h
20
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);
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user