Add some signed types and use them in the places we have silly casts now.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@298 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
1b25adae3f
commit
90a283925e
4
orders.c
4
orders.c
@ -56,12 +56,12 @@ rdp_in_present(STREAM s, uint32 * present, uint8 flags, int size)
|
|||||||
static void
|
static void
|
||||||
rdp_in_coord(STREAM s, uint16 * coord, BOOL delta)
|
rdp_in_coord(STREAM s, uint16 * coord, BOOL delta)
|
||||||
{
|
{
|
||||||
uint8 change;
|
sint8 change;
|
||||||
|
|
||||||
if (delta)
|
if (delta)
|
||||||
{
|
{
|
||||||
in_uint8(s, change);
|
in_uint8(s, change);
|
||||||
*coord += (signed char) change;
|
*coord += change;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
7
types.h
7
types.h
@ -26,8 +26,11 @@ typedef int BOOL;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef unsigned char uint8;
|
typedef unsigned char uint8;
|
||||||
|
typedef signed char sint8;
|
||||||
typedef unsigned short uint16;
|
typedef unsigned short uint16;
|
||||||
|
typedef signed short sint16;
|
||||||
typedef unsigned int uint32;
|
typedef unsigned int uint32;
|
||||||
|
typedef signed int sint32;
|
||||||
|
|
||||||
typedef void *HBITMAP;
|
typedef void *HBITMAP;
|
||||||
typedef void *HGLYPH;
|
typedef void *HGLYPH;
|
||||||
@ -82,8 +85,8 @@ BRUSH;
|
|||||||
|
|
||||||
typedef struct _FONTGLYPH
|
typedef struct _FONTGLYPH
|
||||||
{
|
{
|
||||||
uint16 offset;
|
sint16 offset;
|
||||||
uint16 baseline;
|
sint16 baseline;
|
||||||
uint16 width;
|
uint16 width;
|
||||||
uint16 height;
|
uint16 height;
|
||||||
HBITMAP pixmap;
|
HBITMAP pixmap;
|
||||||
|
4
xwin.c
4
xwin.c
@ -1216,8 +1216,8 @@ ui_draw_glyph(int mixmode,
|
|||||||
}\
|
}\
|
||||||
if (glyph != NULL)\
|
if (glyph != NULL)\
|
||||||
{\
|
{\
|
||||||
ui_draw_glyph (mixmode, x + (short) glyph->offset,\
|
ui_draw_glyph (mixmode, x + glyph->offset,\
|
||||||
y + (short) glyph->baseline,\
|
y + glyph->baseline,\
|
||||||
glyph->width, glyph->height,\
|
glyph->width, glyph->height,\
|
||||||
glyph->pixmap, 0, 0, bgcolour, fgcolour);\
|
glyph->pixmap, 0, 0, bgcolour, fgcolour);\
|
||||||
if (flags & TEXT2_IMPLICIT_X)\
|
if (flags & TEXT2_IMPLICIT_X)\
|
||||||
|
Loading…
Reference in New Issue
Block a user