CVS: rdesktop orders.c,1.43,1.44 orders.h,1.12,1.13 proto.h,1.71,1.72 xwin.c,1.186,1.187

Jeroen Meijer <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27774

Modified Files:
	orders.c orders.h proto.h xwin.c 
Log Message:
Fix text2 order parsing. The brush is parsed but not yet used.

Index: orders.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/orders.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** orders.c	8 Mar 2005 00:43:10 -0000	1.43
--- orders.c	10 Mar 2005 22:40:07 -0000	1.44
***************
*** 806,810 ****
  
  	if (present & 0x000004)
! 		in_uint8(s, os->unknown);
  
  	if (present & 0x000008)
--- 806,810 ----
  
  	if (present & 0x000004)
! 		in_uint8(s, os->opcode);
  
  	if (present & 0x000008)
***************
*** 841,865 ****
  		in_uint16_le(s, os->boxbottom);
  
! 	/*
! 	 * Unknown members, seen when connecting to a session that was disconnected with
! 	 * mstsc and with wintach's spreadsheet test.
! 	 */
! 	if (present & 0x004000)
! 		in_uint8s(s, 1);
! 
! 	if (present & 0x008000)
! 		in_uint8s(s, 1);
! 
! 	if (present & 0x010000)
! 	{
! 		in_uint8s(s, 1);	/* guessing the length here */
! 		warning("Unknown order state member (0x010000) in text2 order.\n");
! 	}
! 
! 	if (present & 0x020000)
! 		in_uint8s(s, 4);
! 
! 	if (present & 0x040000)
! 		in_uint8s(s, 4);
  
  	if (present & 0x080000)
--- 841,845 ----
  		in_uint16_le(s, os->boxbottom);
  
! 	rdp_parse_brush(s, &os->brush, present >> 14);
  
  	if (present & 0x080000)
***************
*** 875,879 ****
  	}
  
! 	DEBUG(("TEXT2(x=%d,y=%d,cl=%d,ct=%d,cr=%d,cb=%d,bl=%d,bt=%d,bb=%d,br=%d,fg=0x%x,bg=0x%x,font=%d,fl=0x%x,mix=%d,unk=0x%x,n=%d)\n", os->x, os->y, os->clipleft, os->cliptop, os->clipright, os->clipbottom, os->boxleft, os->boxtop, os->boxright, os->boxbottom, os->fgcolour, os->bgcolour, os->font, os->flags, os->mixmode, os->unknown, os->length));
  
  	DEBUG(("Text: "));
--- 855,859 ----
  	}
  
! 	DEBUG(("TEXT2(x=%d,y=%d,cl=%d,ct=%d,cr=%d,cb=%d,bl=%d,bt=%d,br=%d,bb=%d,bs=%d,bg=0x%x,fg=0x%x,font=%d,fl=0x%x,op=0x%x,mix=%d,n=%d)\n", os->x, os->y, os->clipleft, os->cliptop, os->clipright, os->clipbottom, os->boxleft, os->boxtop, os->boxright, os->boxbottom, os->brush.style, os->bgcolour, os->fgcolour, os->font, os->flags, os->opcode, os->mixmode, os->length));
  
  	DEBUG(("Text: "));
***************
*** 884,894 ****
  	DEBUG(("\n"));
  
! 	ui_draw_text(os->font, os->flags, os->mixmode, os->x, os->y,
! 		     os->clipleft, os->cliptop,
! 		     os->clipright - os->clipleft,
! 		     os->clipbottom - os->cliptop,
! 		     os->boxleft, os->boxtop,
! 		     os->boxright - os->boxleft,
! 		     os->boxbottom - os->boxtop, os->bgcolour, os->fgcolour, os->text, os->length);
  }
  
--- 864,872 ----
  	DEBUG(("\n"));
  
! 	ui_draw_text(os->font, os->flags, os->opcode - 1, os->mixmode, os->x, os->y,
! 		     os->clipleft, os->cliptop, os->clipright - os->clipleft,
! 		     os->clipbottom - os->cliptop, os->boxleft, os->boxtop,
! 		     os->boxright - os->boxleft, os->boxbottom - os->boxtop,
! 		     &os->brush, os->bgcolour, os->fgcolour, os->text, os->length);
  }
  

Index: orders.h
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/orders.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** orders.h	8 Mar 2005 00:43:10 -0000	1.12
--- orders.h	10 Mar 2005 22:40:20 -0000	1.13
***************
*** 247,254 ****
  	uint8 font;
  	uint8 flags;
  	uint8 mixmode;
- 	uint8 unknown;
- 	uint32 fgcolour;
  	uint32 bgcolour;
  	sint16 clipleft;
  	sint16 cliptop;
--- 247,254 ----
  	uint8 font;
  	uint8 flags;
+ 	uint8 opcode;
  	uint8 mixmode;
  	uint32 bgcolour;
+ 	uint32 fgcolour;
  	sint16 clipleft;
  	sint16 cliptop;
***************
*** 259,262 ****
--- 259,263 ----
  	sint16 boxright;
  	sint16 boxbottom;
+ 	BRUSH brush;
  	sint16 x;
  	sint16 y;

Index: proto.h
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/proto.h,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** proto.h	8 Mar 2005 00:43:10 -0000	1.71
--- proto.h	10 Mar 2005 22:40:20 -0000	1.72
***************
*** 218,224 ****
  void ui_draw_glyph(int mixmode, int x, int y, int cx, int cy, HGLYPH glyph, int srcx, int srcy,
  		   int bgcolour, int fgcolour);
! void ui_draw_text(uint8 font, uint8 flags, int mixmode, int x, int y, int clipx, int clipy,
! 		  int clipcx, int clipcy, int boxx, int boxy, int boxcx, int boxcy, int bgcolour,
! 		  int fgcolour, uint8 * text, uint8 length);
  void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy);
  void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy);
--- 218,225 ----
  void ui_draw_glyph(int mixmode, int x, int y, int cx, int cy, HGLYPH glyph, int srcx, int srcy,
  		   int bgcolour, int fgcolour);
! void ui_draw_text(uint8 font, uint8 flags, uint8 opcode, int mixmode, int x, int y,
! 		  int clipx, int clipy, int clipcx, int clipcy, int boxx, int boxy,
! 		  int boxcx, int boxcy, BRUSH * brush, int bgcolour, int fgcolour,
! 		  uint8 * text, uint8 length);
  void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy);
  void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy);

Index: xwin.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/xwin.c,v
retrieving revision 1.186
retrieving revision 1.187
diff -C2 -d -r1.186 -r1.187
*** xwin.c	8 Mar 2005 00:43:10 -0000	1.186
--- xwin.c	10 Mar 2005 22:40:20 -0000	1.187
***************
*** 2377,2385 ****
  
  void
! ui_draw_text(uint8 font, uint8 flags, int mixmode, int x, int y,
  	     int clipx, int clipy, int clipcx, int clipcy,
! 	     int boxx, int boxy, int boxcx, int boxcy, int bgcolour,
! 	     int fgcolour, uint8 * text, uint8 length)
  {
  	FONTGLYPH *glyph;
  	int i, j, xyoffset, x1, y1;
--- 2377,2387 ----
  
  void
! ui_draw_text(uint8 font, uint8 flags, uint8 opcode, int mixmode, int x, int y,
  	     int clipx, int clipy, int clipcx, int clipcy,
! 	     int boxx, int boxy, int boxcx, int boxcy, BRUSH * brush,
! 	     int bgcolour, int fgcolour, uint8 * text, uint8 length)
  {
+ 	/* TODO: use brush appropriately */
+ 
  	FONTGLYPH *glyph;
  	int i, j, xyoffset, x1, y1;



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.