changes to compile with g++

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@710 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Jay Sorg 2004-06-15 22:45:12 +00:00
parent a9cad0b9cf
commit 772bdd5628
4 changed files with 6 additions and 6 deletions

View File

@ -161,7 +161,7 @@ channel_process(STREAM s, uint16 mcs_channel)
{
if (length > in->size)
{
in->data = xrealloc(in->data, length);
in->data = (uint8*)xrealloc(in->data, length);
in->size = length;
}
in->p = in->data;

6
mppc.c
View File

@ -64,7 +64,7 @@ mppc_expand(uint8 * data, uint32 clen, uint8 ctype, uint32 * roff, uint32 * rlen
int match_len;
int old_offset, match_bits;
signed char *dict = &(g_mppc_dict.hist);
uint8 *dict = g_mppc_dict.hist;
if ((ctype & RDP_MPPC_COMPRESSED) == 0)
{
@ -279,7 +279,7 @@ mppc_expand(uint8 * data, uint32 clen, uint8 ctype, uint32 * roff, uint32 * rlen
match_bits = match_len;
match_len =
walker >> 32 - match_bits & ~(-1 << match_bits) | 1 << match_bits;
((walker >> (32 - match_bits)) & (~(-1 << match_bits))) | (1 << match_bits);
walker <<= match_bits;
walker_len -= match_bits;
}
@ -288,7 +288,7 @@ mppc_expand(uint8 * data, uint32 clen, uint8 ctype, uint32 * roff, uint32 * rlen
return -1;
}
/* memory areas can overlap - meaning we can't use memXXX functions */
k = next_offset - match_off & (RDP_MPPC_DICT_SIZE - 1);
k = (next_offset - match_off) & (RDP_MPPC_DICT_SIZE - 1);
do
{
dict[next_offset++] = dict[k++];

2
rdp.c
View File

@ -988,7 +988,7 @@ process_data_pdu(STREAM s, uint32 * ext_disc_reason)
//len -= 18;
/* allocate memory and copy the uncompressed data into the temporary stream */
ns->data = xrealloc(ns->data, rlen);
ns->data = (uint8 *) xrealloc(ns->data, rlen);
memcpy((ns->data), (unsigned char *) (g_mppc_dict.hist + roff), rlen);

2
rdp5.c
View File

@ -70,7 +70,7 @@ rdp5_process(STREAM s, BOOL encryption)
error("error while decompressing packet\n");
/* allocate memory and copy the uncompressed data into the temporary stream */
ns->data = xrealloc(ns->data, rlen);
ns->data = (uint8 *) xrealloc(ns->data, rlen);
memcpy((ns->data), (unsigned char *) (g_mppc_dict.hist + roff), rlen);