--- sourceforge.net/trunk/rdesktop/rdp.c 2001/09/14 13:51:38 30 +++ sourceforge.net/trunk/rdesktop/rdp.c 2002/09/15 12:46:41 161 @@ -60,7 +60,7 @@ /* Receive an RDP packet */ static STREAM -rdp_recv(uint8 *type) +rdp_recv(uint8 * type) { static STREAM rdp_s; uint16 length, pdu_type; @@ -155,8 +155,7 @@ int len_password = 2 * strlen(password); int len_program = 2 * strlen(program); int len_directory = 2 * strlen(directory); - uint32 sec_flags = encryption ? (SEC_LOGON_INFO | SEC_ENCRYPT) - : SEC_LOGON_INFO; + uint32 sec_flags = encryption ? (SEC_LOGON_INFO | SEC_ENCRYPT) : SEC_LOGON_INFO; STREAM s; s = sec_init(sec_flags, 18 + len_domain + len_user + len_password @@ -212,8 +211,7 @@ /* Send a single input event */ void -rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, - uint16 param1, uint16 param2) +rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2) { STREAM s; @@ -300,6 +298,7 @@ order_caps[0] = 1; /* dest blt */ order_caps[1] = 1; /* pat blt */ order_caps[2] = 1; /* screen blt */ + order_caps[3] = 1; /* required for memblt? */ order_caps[8] = 1; /* line */ order_caps[9] = 1; /* line */ order_caps[10] = 1; /* rect */ @@ -442,8 +441,7 @@ RDP_CAPLEN_GENERAL + RDP_CAPLEN_BITMAP + RDP_CAPLEN_ORDER + RDP_CAPLEN_BMPCACHE + RDP_CAPLEN_COLCACHE + RDP_CAPLEN_ACTIVATE + RDP_CAPLEN_CONTROL + - RDP_CAPLEN_POINTER + RDP_CAPLEN_SHARE + RDP_CAPLEN_UNKNOWN - + 4 /* w2k fix, why? */; + RDP_CAPLEN_POINTER + RDP_CAPLEN_SHARE + RDP_CAPLEN_UNKNOWN + 4 /* w2k fix, why? */ ; s = rdp_init(14 + caplen + sizeof(RDP_SOURCE)); @@ -526,8 +524,7 @@ in_uint16_le(s, datalen); in_uint8p(s, data, datalen); in_uint8p(s, mask, masklen); - cursor = ui_create_cursor(x, y, width, height, mask, - data); + cursor = ui_create_cursor(x, y, width, height, mask, data); ui_set_cursor(cursor); cache_put_cursor(cache_idx, cursor); break; @@ -578,12 +575,9 @@ bmpdata = xmalloc(width * height); for (y = 0; y < height; y++) { - in_uint8a(s, - &bmpdata[(height - y - 1) * width], - width); + in_uint8a(s, &bmpdata[(height - y - 1) * width], width); } - ui_paint_bitmap(left, top, cx, cy, width, height, - bmpdata); + ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); xfree(bmpdata); continue; } @@ -596,8 +590,7 @@ bmpdata = xmalloc(width * height); if (bitmap_decompress(bmpdata, width, height, data, size)) { - ui_paint_bitmap(left, top, cx, cy, width, height, - bmpdata); + ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); } xfree(bmpdata); @@ -616,7 +609,7 @@ in_uint16_le(s, map.ncolours); in_uint8s(s, 2); /* pad */ in_uint8p(s, colours, (map.ncolours * 3)); - map.colours = (COLOURENTRY *)colours; + map.colours = (COLOURENTRY *) colours; hmap = ui_create_colourmap(&map); ui_set_colourmap(hmap); @@ -722,8 +715,7 @@ if (!sec_connect(server)) return False; - rdp_send_logon_info(flags, domain, username, password, - command, directory); + rdp_send_logon_info(flags, domain, username, password, command, directory); return True; }