/[rdesktop]/sourceforge.net/trunk/rdesktop/rdp.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/rdp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 309 by jsorg71, Tue Feb 4 05:32:13 2003 UTC revision 340 by forsberg, Thu Mar 6 14:11:17 2003 UTC
# Line 30  extern BOOL desktop_save; Line 30  extern BOOL desktop_save;
30  uint8 *next_packet;  uint8 *next_packet;
31  uint32 rdp_shareid;  uint32 rdp_shareid;
32    
33    #if WITH_DEBUG
34    static uint32 packetno;
35    #endif
36    
37  /* Initialise an RDP packet */  /* Initialise an RDP packet */
38  static STREAM  static STREAM
39  rdp_init(int maxlen)  rdp_init(int maxlen)
# Line 91  rdp_recv(uint8 * type) Line 95  rdp_recv(uint8 * type)
95          *type = pdu_type & 0xf;          *type = pdu_type & 0xf;
96    
97  #if WITH_DEBUG  #if WITH_DEBUG
98          DEBUG(("RDP packet (type %x):\n", *type));          DEBUG(("RDP packet #%d, (type %x):\n", ++packetno, *type));
99          hexdump(next_packet, length);          hexdump(next_packet, length);
100  #endif /*  */  #endif /*  */
101    
# Line 552  process_bitmap_updates(STREAM s) Line 556  process_bitmap_updates(STREAM s)
556  {  {
557          uint16 num_updates;          uint16 num_updates;
558          uint16 left, top, right, bottom, width, height;          uint16 left, top, right, bottom, width, height;
559          uint16 cx, cy, bpp, compress, bufsize, size;          uint16 cx, cy, bpp, Bpp, compress, bufsize, size;
560          uint8 *data, *bmpdata;          uint8 *data, *bmpdata;
561          int i;          int i;
562    
# Line 567  process_bitmap_updates(STREAM s) Line 571  process_bitmap_updates(STREAM s)
571                  in_uint16_le(s, width);                  in_uint16_le(s, width);
572                  in_uint16_le(s, height);                  in_uint16_le(s, height);
573                  in_uint16_le(s, bpp);                  in_uint16_le(s, bpp);
574                    Bpp = (bpp + 7) / 8;
575                  in_uint16_le(s, compress);                  in_uint16_le(s, compress);
576                  in_uint16_le(s, bufsize);                  in_uint16_le(s, bufsize);
577    
# Line 579  process_bitmap_updates(STREAM s) Line 584  process_bitmap_updates(STREAM s)
584                  if (!compress)                  if (!compress)
585                  {                  {
586                          int y;                          int y;
587                          bmpdata = xmalloc(width * height * (bpp / 8));                          bmpdata = xmalloc(width * height * Bpp);
588                          for (y = 0; y < height; y++)                          for (y = 0; y < height; y++)
589                          {                          {
590                                  in_uint8a(s, &bmpdata[(height - y - 1) * (width * (bpp / 8))], width * (bpp / 8));                                  in_uint8a(s, &bmpdata[(height - y - 1) * (width * Bpp)],
591                                              width * Bpp);
592                          }                          }
593                          ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata);                          ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata);
594                          xfree(bmpdata);                          xfree(bmpdata);
# Line 593  process_bitmap_updates(STREAM s) Line 599  process_bitmap_updates(STREAM s)
599                  in_uint16_le(s, size);                  in_uint16_le(s, size);
600                  in_uint8s(s, 4);        /* line_size, final_size */                  in_uint8s(s, 4);        /* line_size, final_size */
601                  in_uint8p(s, data, size);                  in_uint8p(s, data, size);
602                  bmpdata = xmalloc(width * height * (bpp / 8));                  bmpdata = xmalloc(width * height * Bpp);
603                  if (bitmap_decompress(bmpdata, width, height, data, size, bpp))                  if (bitmap_decompress(bmpdata, width, height, data, size, Bpp))
604                  {                  {
605                          ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata);                          ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata);
606                  }                  }

Legend:
Removed from v.309  
changed lines
  Added in v.340

  ViewVC Help
Powered by ViewVC 1.1.26