silence a load of gcc warnings

svn path=/trunk/; revision=30418
This commit is contained in:
Ged Murphy 2007-11-13 13:10:07 +00:00
parent a55222a1c5
commit fdc6a1425d
13 changed files with 78 additions and 77 deletions

View file

@ -38,7 +38,7 @@ static int g_clip_right1 = 800;
static int g_clip_bottom1 = 600; static int g_clip_bottom1 = 600;
/* for bs_patblt */ /* for bs_patblt */
static unsigned char g_hatch_patterns[] = static char g_hatch_patterns[] =
{ {
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0 - bsHorizontal */ 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0 - bsHorizontal */
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, /* 1 - bsVertical */ 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, /* 1 - bsVertical */

View file

@ -25,7 +25,7 @@
extern int g_pstcache_fd[]; extern int g_pstcache_fd[];
#define NUM_ELEMENTS(array) (sizeof(array) / sizeof(array[0])) #define NUM_ELEMENTS(array) (sizeof(array) / sizeof(array[0]))
#define IS_PERSISTENT(id) (g_pstcache_fd[id] > 0) //#define IS_PERSISTENT(id) (g_pstcache_fd[id] > 0)
#define TO_TOP -1 #define TO_TOP -1
#define NOT_SET -1 #define NOT_SET -1
#define IS_SET(idx) (idx >= 0) #define IS_SET(idx) (idx >= 0)

View file

@ -984,7 +984,7 @@ OnMainCreate(HWND hwnd,
MAKEINTRESOURCEW(IDD_GENERAL), MAKEINTRESOURCEW(IDD_GENERAL),
pInfo->hTab, pInfo->hTab,
(DLGPROC)GeneralDlgProc, (DLGPROC)GeneralDlgProc,
pInfo)) (LPARAM)pInfo))
{ {
WCHAR str[256]; WCHAR str[256];
ZeroMemory(&item, sizeof(TCITEM)); ZeroMemory(&item, sizeof(TCITEM));
@ -999,7 +999,7 @@ OnMainCreate(HWND hwnd,
MAKEINTRESOURCEW(IDD_DISPLAY), MAKEINTRESOURCEW(IDD_DISPLAY),
pInfo->hTab, pInfo->hTab,
(DLGPROC)DisplayDlgProc, (DLGPROC)DisplayDlgProc,
pInfo)) (LPARAM)pInfo))
{ {
WCHAR str[256]; WCHAR str[256];
ZeroMemory(&item, sizeof(TCITEM)); ZeroMemory(&item, sizeof(TCITEM));

View file

@ -174,8 +174,8 @@ licence_process_demand(STREAM s)
/* Now encrypt the HWID */ /* Now encrypt the HWID */
crypt_key = ssl_rc4_info_create(); crypt_key = ssl_rc4_info_create();
ssl_rc4_set_key(crypt_key, g_licence_key, 16); ssl_rc4_set_key(crypt_key, (char *)g_licence_key, 16);
ssl_rc4_crypt(crypt_key, hwid, hwid, sizeof(hwid)); ssl_rc4_crypt(crypt_key, (char *)hwid, (char *)hwid, sizeof(hwid));
ssl_rc4_info_delete(crypt_key); ssl_rc4_info_delete(crypt_key);
licence_present(null_data, null_data, licence_data, licence_size, hwid, signature); licence_present(null_data, null_data, licence_data, licence_size, hwid, signature);
@ -239,7 +239,7 @@ licence_parse_authreq(STREAM s, uint8 ** token, uint8 ** signature)
static void static void
licence_process_authreq(STREAM s) licence_process_authreq(STREAM s)
{ {
uint8 *in_token, *in_sig; uint8 *in_token = NULL, *in_sig;
uint8 out_token[LICENCE_TOKEN_SIZE], decrypt_token[LICENCE_TOKEN_SIZE]; uint8 out_token[LICENCE_TOKEN_SIZE], decrypt_token[LICENCE_TOKEN_SIZE];
uint8 hwid[LICENCE_HWID_SIZE], crypt_hwid[LICENCE_HWID_SIZE]; uint8 hwid[LICENCE_HWID_SIZE], crypt_hwid[LICENCE_HWID_SIZE];
uint8 sealed_buffer[LICENCE_TOKEN_SIZE + LICENCE_HWID_SIZE]; uint8 sealed_buffer[LICENCE_TOKEN_SIZE + LICENCE_HWID_SIZE];
@ -252,8 +252,8 @@ licence_process_authreq(STREAM s)
/* Decrypt the token. It should read TEST in Unicode. */ /* Decrypt the token. It should read TEST in Unicode. */
crypt_key = ssl_rc4_info_create(); crypt_key = ssl_rc4_info_create();
ssl_rc4_set_key(crypt_key, g_licence_key, 16); ssl_rc4_set_key(crypt_key, (char *)g_licence_key, 16);
ssl_rc4_crypt(crypt_key, in_token, decrypt_token, LICENCE_TOKEN_SIZE); ssl_rc4_crypt(crypt_key, (char *)in_token, (char *)decrypt_token, LICENCE_TOKEN_SIZE);
ssl_rc4_info_delete(crypt_key); ssl_rc4_info_delete(crypt_key);
/* Generate a signature for a buffer of token and HWID */ /* Generate a signature for a buffer of token and HWID */
@ -264,8 +264,8 @@ licence_process_authreq(STREAM s)
/* Now encrypt the HWID */ /* Now encrypt the HWID */
crypt_key = ssl_rc4_info_create(); crypt_key = ssl_rc4_info_create();
ssl_rc4_set_key(crypt_key, g_licence_key, 16); ssl_rc4_set_key(crypt_key, (char *)g_licence_key, 16);
ssl_rc4_crypt(crypt_key, hwid, crypt_hwid, LICENCE_HWID_SIZE); ssl_rc4_crypt(crypt_key, (char *)hwid, (char *)crypt_hwid, LICENCE_HWID_SIZE);
ssl_rc4_info_delete(crypt_key); ssl_rc4_info_delete(crypt_key);
licence_send_authresp(out_token, crypt_hwid, out_sig); licence_send_authresp(out_token, crypt_hwid, out_sig);
@ -286,8 +286,8 @@ licence_process_issue(STREAM s)
return; return;
crypt_key = ssl_rc4_info_create(); crypt_key = ssl_rc4_info_create();
ssl_rc4_set_key(crypt_key, g_licence_key, 16); ssl_rc4_set_key(crypt_key, (char *)g_licence_key, 16);
ssl_rc4_crypt(crypt_key, s->p, s->p, length); ssl_rc4_crypt(crypt_key, (char *)s->p, (char *)s->p, length);
ssl_rc4_info_delete(crypt_key); ssl_rc4_info_delete(crypt_key);
in_uint16(s, check); in_uint16(s, check);

View file

@ -13,6 +13,7 @@
#ifndef __TODO_MSTSC_H #ifndef __TODO_MSTSC_H
#define __TODO_MSTSC_H #define __TODO_MSTSC_H
#define IS_PERSISTENT(id) (id < 8 && g_pstcache_fd[id] > 0)
#define MAXKEY 256 #define MAXKEY 256
#define MAXVALUE 256 #define MAXVALUE 256

View file

@ -22,8 +22,6 @@
#define MAX_CELL_SIZE 0x1000 /* pixels */ #define MAX_CELL_SIZE 0x1000 /* pixels */
#define IS_PERSISTENT(id) (id < 8 && g_pstcache_fd[id] > 0)
extern int g_server_depth; extern int g_server_depth;
extern BOOL g_bitmap_cache; extern BOOL g_bitmap_cache;
extern BOOL g_bitmap_cache_persist_enable; extern BOOL g_bitmap_cache_persist_enable;
@ -55,7 +53,7 @@ pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx)
{ {
uint8 *celldata; uint8 *celldata;
int fd; int fd;
CELLHEADER cellhdr; CELLHEADER cellhdr = {0,};
HBITMAP bitmap; HBITMAP bitmap;
if (!g_bitmap_cache_persist_enable) if (!g_bitmap_cache_persist_enable)

View file

@ -120,7 +120,7 @@ rdp_recv(uint8 * type)
static STREAM static STREAM
rdp_init_data(int maxlen) rdp_init_data(int maxlen)
{ {
STREAM s; STREAM s = NULL;
s = sec_init(g_encryption ? SEC_ENCRYPT : 0, maxlen + 18); s = sec_init(g_encryption ? SEC_ENCRYPT : 0, maxlen + 18);
s_push_layer(s, rdp_hdr, 18); s_push_layer(s, rdp_hdr, 18);
@ -285,17 +285,17 @@ static void
rdp_send_logon_info(uint32 flags, char *domain, char *user, rdp_send_logon_info(uint32 flags, char *domain, char *user,
char *password, char *program, char *directory) char *password, char *program, char *directory)
{ {
char *ipaddr = tcp_get_address(); //char *ipaddr = tcp_get_address();
int len_domain = 2 * strlen(domain); int len_domain = 2 * strlen(domain);
int len_user = 2 * strlen(user); int len_user = 2 * strlen(user);
int len_password = 2 * strlen(password); int len_password = 2 * strlen(password);
int len_program = 2 * strlen(program); int len_program = 2 * strlen(program);
int len_directory = 2 * strlen(directory); int len_directory = 2 * strlen(directory);
int len_ip = 2 * strlen(ipaddr); //int len_ip = 2 * strlen(ipaddr);
int len_dll = 2 * strlen("C:\\WINNT\\System32\\mstscax.dll"); //int len_dll = 2 * strlen("C:\\WINNT\\System32\\mstscax.dll");
int packetlen = 0; //int packetlen = 0;
uint32 sec_flags = g_encryption ? (SEC_LOGON_INFO | SEC_ENCRYPT) : SEC_LOGON_INFO; uint32 sec_flags = g_encryption ? (SEC_LOGON_INFO | SEC_ENCRYPT) : SEC_LOGON_INFO;
STREAM s; STREAM s = NULL;
//time_t t = time(NULL); //time_t t = time(NULL);
//time_t tzone; //time_t tzone;

View file

@ -125,17 +125,17 @@ sec_hash_48(uint8 * out, uint8 * in, uint8 * salt1, uint8 * salt2, uint8 salt)
memset(pad, salt + i, i + 1); memset(pad, salt + i, i + 1);
sha = ssl_sha1_info_create(); sha = ssl_sha1_info_create();
ssl_sha1_clear(sha); ssl_sha1_clear(sha);
ssl_sha1_transform(sha, pad, i + 1); ssl_sha1_transform(sha, (char *)pad, i + 1);
ssl_sha1_transform(sha, in, 48); ssl_sha1_transform(sha, (char *)in, 48);
ssl_sha1_transform(sha, salt1, 32); ssl_sha1_transform(sha, (char *)salt1, 32);
ssl_sha1_transform(sha, salt2, 32); ssl_sha1_transform(sha, (char *)salt2, 32);
ssl_sha1_complete(sha, shasig); ssl_sha1_complete(sha, (char *)shasig);
ssl_sha1_info_delete(sha); ssl_sha1_info_delete(sha);
md5 = ssl_md5_info_create(); md5 = ssl_md5_info_create();
ssl_md5_clear(md5); ssl_md5_clear(md5);
ssl_md5_transform(md5, in, 48); ssl_md5_transform(md5, (char *)in, 48);
ssl_md5_transform(md5, shasig, 20); ssl_md5_transform(md5, (char *)shasig, 20);
ssl_md5_complete(md5, out + i * 16); ssl_md5_complete(md5, (char *)out + i * 16);
ssl_md5_info_delete(md5); ssl_md5_info_delete(md5);
} }
} }
@ -150,10 +150,10 @@ sec_hash_16(uint8 * out, uint8 * in, uint8 * salt1, uint8 * salt2)
md5 = ssl_md5_info_create(); md5 = ssl_md5_info_create();
ssl_md5_clear(md5); ssl_md5_clear(md5);
ssl_md5_transform(md5, in, 16); ssl_md5_transform(md5, (char *)in, 16);
ssl_md5_transform(md5, salt1, 32); ssl_md5_transform(md5, (char *)salt1, 32);
ssl_md5_transform(md5, salt2, 32); ssl_md5_transform(md5, (char *)salt2, 32);
ssl_md5_complete(md5, out); ssl_md5_complete(md5, (char *)out);
ssl_md5_info_delete(md5); ssl_md5_info_delete(md5);
} }
@ -211,11 +211,11 @@ sec_generate_keys(uint8 * client_random, uint8 * server_random, int rc4_key_size
ssl_rc4_info_delete(rc4_decrypt_key); ssl_rc4_info_delete(rc4_decrypt_key);
rc4_decrypt_key = ssl_rc4_info_create(); rc4_decrypt_key = ssl_rc4_info_create();
ssl_rc4_set_key(rc4_decrypt_key, sec_decrypt_key, rc4_key_len); ssl_rc4_set_key(rc4_decrypt_key, (char *)sec_decrypt_key, rc4_key_len);
ssl_rc4_info_delete(rc4_encrypt_key); ssl_rc4_info_delete(rc4_encrypt_key);
rc4_encrypt_key = ssl_rc4_info_create(); rc4_encrypt_key = ssl_rc4_info_create();
ssl_rc4_set_key(rc4_encrypt_key, sec_encrypt_key, rc4_key_len); ssl_rc4_set_key(rc4_encrypt_key, (char *)sec_encrypt_key, rc4_key_len);
} }
static uint8 pad_54[40] = { static uint8 pad_54[40] = {
@ -256,19 +256,19 @@ sec_sign(uint8 * signature, int siglen, uint8 * session_key, int keylen, uint8 *
sha = ssl_sha1_info_create(); sha = ssl_sha1_info_create();
ssl_sha1_clear(sha); ssl_sha1_clear(sha);
ssl_sha1_transform(sha, session_key, keylen); ssl_sha1_transform(sha, (char *)session_key, keylen);
ssl_sha1_transform(sha, pad_54, 40); ssl_sha1_transform(sha, (char *)pad_54, 40);
ssl_sha1_transform(sha, lenhdr, 4); ssl_sha1_transform(sha, (char *)lenhdr, 4);
ssl_sha1_transform(sha, data, datalen); ssl_sha1_transform(sha, (char *)data, datalen);
ssl_sha1_complete(sha, shasig); ssl_sha1_complete(sha, (char *)shasig);
ssl_sha1_info_delete(sha); ssl_sha1_info_delete(sha);
md5 = ssl_md5_info_create(); md5 = ssl_md5_info_create();
ssl_md5_clear(md5); ssl_md5_clear(md5);
ssl_md5_transform(md5, session_key, keylen); ssl_md5_transform(md5, (char *)session_key, keylen);
ssl_md5_transform(md5, pad_92, 48); ssl_md5_transform(md5, (char *)pad_92, 48);
ssl_md5_transform(md5, shasig, 20); ssl_md5_transform(md5, (char *)shasig, 20);
ssl_md5_complete(md5, md5sig); ssl_md5_complete(md5, (char *)md5sig);
ssl_md5_info_delete(md5); ssl_md5_info_delete(md5);
memcpy(signature, md5sig, siglen); memcpy(signature, md5sig, siglen);
@ -285,24 +285,24 @@ sec_update(uint8 * key, uint8 * update_key)
sha = ssl_sha1_info_create(); sha = ssl_sha1_info_create();
ssl_sha1_clear(sha); ssl_sha1_clear(sha);
ssl_sha1_transform(sha, update_key, rc4_key_len); ssl_sha1_transform(sha, (char *)update_key, rc4_key_len);
ssl_sha1_transform(sha, pad_54, 40); ssl_sha1_transform(sha, (char *)pad_54, 40);
ssl_sha1_transform(sha, key, rc4_key_len); ssl_sha1_transform(sha, (char *)key, rc4_key_len);
ssl_sha1_complete(sha, shasig); ssl_sha1_complete(sha, (char *)shasig);
ssl_sha1_info_delete(sha); ssl_sha1_info_delete(sha);
md5 = ssl_md5_info_create(); md5 = ssl_md5_info_create();
ssl_md5_clear(md5); ssl_md5_clear(md5);
ssl_md5_transform(md5, update_key, rc4_key_len); ssl_md5_transform(md5, (char *)update_key, rc4_key_len);
ssl_md5_transform(md5, pad_92, 48); ssl_md5_transform(md5, (char *)pad_92, 48);
ssl_md5_transform(md5, shasig, 20); ssl_md5_transform(md5, (char *)shasig, 20);
ssl_md5_complete(md5, key); ssl_md5_complete(md5, (char *)key);
ssl_md5_info_delete(md5); ssl_md5_info_delete(md5);
update = ssl_rc4_info_create(); update = ssl_rc4_info_create();
ssl_rc4_set_key(update, key, rc4_key_len); ssl_rc4_set_key(update, (char *)key, rc4_key_len);
ssl_rc4_crypt(update, key, key, rc4_key_len); ssl_rc4_crypt(update, (char *)key, (char *)key, rc4_key_len);
ssl_rc4_info_delete(update); ssl_rc4_info_delete(update);
if (rc4_key_len == 8) if (rc4_key_len == 8)
@ -316,10 +316,10 @@ sec_encrypt(uint8 * data, int length)
if (sec_encrypt_use_count == 4096) if (sec_encrypt_use_count == 4096)
{ {
sec_update(sec_encrypt_key, sec_encrypt_update_key); sec_update(sec_encrypt_key, sec_encrypt_update_key);
ssl_rc4_set_key(rc4_encrypt_key, sec_encrypt_key, rc4_key_len); ssl_rc4_set_key(rc4_encrypt_key, (char *)sec_encrypt_key, rc4_key_len);
sec_encrypt_use_count = 0; sec_encrypt_use_count = 0;
} }
ssl_rc4_crypt(rc4_encrypt_key, data, data, length); ssl_rc4_crypt(rc4_encrypt_key, (char *)data, (char *)data, length);
sec_encrypt_use_count++; sec_encrypt_use_count++;
} }
@ -330,10 +330,10 @@ sec_decrypt(uint8 * data, int length)
if (sec_decrypt_use_count == 4096) if (sec_decrypt_use_count == 4096)
{ {
sec_update(sec_decrypt_key, sec_decrypt_update_key); sec_update(sec_decrypt_key, sec_decrypt_update_key);
ssl_rc4_set_key(rc4_decrypt_key, sec_decrypt_key, rc4_key_len); ssl_rc4_set_key(rc4_decrypt_key, (char *)sec_decrypt_key, rc4_key_len);
sec_decrypt_use_count = 0; sec_decrypt_use_count = 0;
} }
ssl_rc4_crypt(rc4_decrypt_key, data, data, length); ssl_rc4_crypt(rc4_decrypt_key, (char *)data, (char *)data, length);
sec_decrypt_use_count++; sec_decrypt_use_count++;
} }
@ -355,7 +355,7 @@ reverse(uint8 * p, int len)
static void static void
sec_rsa_encrypt(uint8 * out, uint8 * in, int len, uint8 * modulus, uint8 * exponent) sec_rsa_encrypt(uint8 * out, uint8 * in, int len, uint8 * modulus, uint8 * exponent)
{ {
ssl_mod_exp(out, 64, in, 32, modulus, 64, exponent, 4); ssl_mod_exp((char *)out, 64, (char *)in, 32, (char *)modulus, 64, (char *)exponent, 4);
/* /*
BN_CTX *ctx; BN_CTX *ctx;
BIGNUM mod, exp, x, y; BIGNUM mod, exp, x, y;
@ -746,7 +746,7 @@ sec_parse_crypt_info(STREAM s, uint32 * rc4_key_size,
static void static void
sec_process_crypt_info(STREAM s) sec_process_crypt_info(STREAM s)
{ {
uint8 *server_random, *modulus, *exponent; uint8 *server_random, *modulus = NULL, *exponent = NULL;
uint8 client_random[SEC_RANDOM_SIZE]; uint8 client_random[SEC_RANDOM_SIZE];
uint32 rc4_key_size; uint32 rc4_key_size;
uint8 inr[SEC_MODULUS_SIZE]; uint8 inr[SEC_MODULUS_SIZE];

View file

@ -14,7 +14,6 @@ VOID
SaveAllSettings(PINFO pInfo) SaveAllSettings(PINFO pInfo)
{ {
INT ret; INT ret;
WCHAR szKey[MAXKEY];
WCHAR szValue[MAXVALUE]; WCHAR szValue[MAXVALUE];
/* server */ /* server */

View file

@ -435,7 +435,7 @@ ssl_sha1_complete(void* sha1_info, char* data)
PUT_UINT32(low, msglen, 4); PUT_UINT32(low, msglen, 4);
last = ctx->total[0] & 0x3F; last = ctx->total[0] & 0x3F;
padn = (last < 56) ? (56 - last) : (120 - last); padn = (last < 56) ? (56 - last) : (120 - last);
ssl_sha1_transform(ctx, sha1_padding, padn); ssl_sha1_transform(ctx, (char *)sha1_padding, padn);
ssl_sha1_transform(ctx, msglen, 8); ssl_sha1_transform(ctx, msglen, 8);
PUT_UINT32(ctx->state[0], data, 0); PUT_UINT32(ctx->state[0], data, 0);
PUT_UINT32(ctx->state[1], data, 4); PUT_UINT32(ctx->state[1], data, 4);
@ -705,7 +705,7 @@ ssl_md5_complete(void* md5_info, char* data)
PUT_UINT32(high, msglen, 4); PUT_UINT32(high, msglen, 4);
last = ctx->total[0] & 0x3F; last = ctx->total[0] & 0x3F;
padn = (last < 56) ? (56 - last) : (120 - last); padn = (last < 56) ? (56 - last) : (120 - last);
ssl_md5_transform(ctx, md5_padding, padn); ssl_md5_transform(ctx, (char *)md5_padding, padn);
ssl_md5_transform(ctx, msglen, 8); ssl_md5_transform(ctx, msglen, 8);
PUT_UINT32(ctx->state[0], data, 0); PUT_UINT32(ctx->state[0], data, 0);
PUT_UINT32(ctx->state[1], data, 4); PUT_UINT32(ctx->state[1], data, 4);

View file

@ -67,7 +67,7 @@ tcp_send(STREAM s)
while (total < length) while (total < length)
{ {
sent = send(sock, s->data + total, length - total, 0); sent = send(sock, (char *)s->data + total, length - total, 0);
if (sent <= 0) if (sent <= 0)
{ {
if (sent == -1 && TCP_BLOCKS) if (sent == -1 && TCP_BLOCKS)
@ -124,7 +124,7 @@ tcp_recv(STREAM s, uint32 length)
/* User quit */ /* User quit */
return NULL; return NULL;
rcvd = recv(sock, s->end, length, 0); rcvd = recv(sock, (char *)s->end, length, 0);
if (rcvd < 0) if (rcvd < 0)
{ {
if (rcvd == -1 && TCP_BLOCKS) if (rcvd == -1 && TCP_BLOCKS)

View file

@ -170,17 +170,17 @@ ui_create_cursor(uint32 x, uint32 y,
{ {
for (j = 0; j < 32; j++) for (j = 0; j < 32; j++)
{ {
if (bs_is_pixel_on(andmask, j, i, 32, 1)) if (bs_is_pixel_on((char *)andmask, j, i, 32, 1))
{ {
bs_set_pixel_on(am, j, 31 - i, 32, 1, 1); bs_set_pixel_on(am, j, 31 - i, 32, 1, 1);
} }
if (bs_is_pixel_on(xormask, j, i, 32, 24)) if (bs_is_pixel_on((char *)xormask, j, i, 32, 24))
{ {
bs_set_pixel_on(xm, j, 31 - i, 32, 1, 1); bs_set_pixel_on(xm, j, 31 - i, 32, 1, 1);
} }
} }
} }
return (void *) mi_create_cursor(x, y, width, height, am, xm); return (void *) mi_create_cursor(x, y, width, height, (unsigned char *)am, (unsigned char *)xm);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -219,12 +219,12 @@ ui_create_glyph(int width, int height, uint8 * data)
memset(the_glyph, 0, sizeof(struct bitmap)); memset(the_glyph, 0, sizeof(struct bitmap));
the_glyph->width = width; the_glyph->width = width;
the_glyph->height = height; the_glyph->height = height;
the_glyph->data = glyph_data; the_glyph->data = (uint8 *)glyph_data;
for (i = 0; i < height; i++) for (i = 0; i < height; i++)
{ {
for (j = 0; j < width; j++) for (j = 0; j < width; j++)
{ {
if (bs_is_pixel_on(data, j, i, width, 1)) if (bs_is_pixel_on((char *)data, j, i, width, 1))
{ {
bs_set_pixel_on(glyph_data, j, i, width, 8, 255); bs_set_pixel_on(glyph_data, j, i, width, 8, 255);
} }
@ -337,7 +337,7 @@ draw_glyph(int x, int y, void * glyph, int fgcolor)
struct bitmap * b; struct bitmap * b;
b = glyph; b = glyph;
bs_draw_glyph(x, y, b->data, b->width, b->height, fgcolor); bs_draw_glyph(x, y, (char *)b->data, b->width, b->height, fgcolor);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -572,7 +572,7 @@ void
ui_patblt(uint8 opcode, int x, int y, int cx, int cy, ui_patblt(uint8 opcode, int x, int y, int cx, int cy,
BRUSH * brush, int bgcolour, int fgcolour) BRUSH * brush, int bgcolour, int fgcolour)
{ {
bs_patblt(opcode, x, y, cx, cy, brush->style, brush->pattern, bs_patblt(opcode, x, y, cx, cy, brush->style, (char *)brush->pattern,
brush->xorigin, brush->yorigin, bgcolour, fgcolour); brush->xorigin, brush->yorigin, bgcolour, fgcolour);
ui_invalidate(x, y, cx, cy); ui_invalidate(x, y, cx, cy);
} }

View file

@ -58,7 +58,7 @@ static int g_fullscreen = 0;
static int g_workarea = 0; static int g_workarea = 0;
static int g_mousex = 0; /* in client coords */ static int g_mousex = 0; /* in client coords */
static int g_mousey = 0; static int g_mousey = 0;
static int g_width_height_set = 0; //static int g_width_height_set = 0;
static int g_clip_left = 0; static int g_clip_left = 0;
static int g_clip_top = 0; static int g_clip_top = 0;
@ -92,7 +92,7 @@ uni_to_str(char * sizex, TCHAR * size1)
len = _tcslen(size1); len = _tcslen(size1);
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
{ {
sizex[i] = size1[i]; sizex[i] = (char *)size1[i];
} }
sizex[len] = 0; sizex[len] = 0;
} }
@ -965,6 +965,7 @@ mi_paint_rect(char * data, int width, int height, int x, int y, int cx, int cy)
} }
#if 0
/*****************************************************************************/ /*****************************************************************************/
static int static int
mi_process_a_param(char * param1, int state) mi_process_a_param(char * param1, int state)
@ -1122,6 +1123,7 @@ mi_post_param(void)
return 1; return 1;
} }
/*****************************************************************************/ /*****************************************************************************/
static int static int
mi_check_config_file(void) mi_check_config_file(void)
@ -1208,6 +1210,7 @@ mi_check_config_file(void)
return rv; return rv;
} }
/*****************************************************************************/ /*****************************************************************************/
/* process the command line parameters */ /* process the command line parameters */
/* returns boolean, non zero is ok */ /* returns boolean, non zero is ok */
@ -1288,7 +1291,7 @@ mi_process_cl(LPTSTR lpCmdLine)
} }
return (state == 0); return (state == 0);
} }
#endif
/*****************************************************************************/ /*****************************************************************************/
int WINAPI int WINAPI