CVS: rdesktop cache.c,1.16,1.17 orders.c,1.38,1.39 orders.h,1.9,1.10 proto.h,1.66,1.67 pstcache.c,1.1,1.2 rdesktop.c,1.109,1.110 rdp.c,1.67,1.68

Peter Åstrand <[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-serv17329

Modified Files:
	cache.c orders.c orders.h proto.h pstcache.c rdesktop.c rdp.c 
Log Message:
Indent fixes

Index: cache.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/cache.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** cache.c	29 Jun 2004 16:22:41 -0000	1.16
--- cache.c	12 Jul 2004 21:07:30 -0000	1.17
***************
*** 41,45 ****
  	int i;
  	uint16 cache_idx = 0;
! 	uint32 m = (uint32)-1;
  	BMPCACHEENTRY *pbce;
  
--- 41,45 ----
  	int i;
  	uint16 cache_idx = 0;
! 	uint32 m = (uint32) - 1;
  	BMPCACHEENTRY *pbce;
  

Index: orders.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/orders.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** orders.c	30 Jun 2004 17:59:40 -0000	1.38
--- orders.c	12 Jul 2004 21:07:39 -0000	1.39
***************
*** 773,777 ****
  
  	DEBUG(("BMPCACHE2(compr=%d,flags=%x,cx=%d,cy=%d,id=%d,idx=%d,Bpp=%d,bs=%d)\n",
! 			compressed, flags, width, height, cache_id, cache_idx, Bpp, bufsize));
  
  	bmpdata = (uint8 *) xmalloc(width * height * Bpp);
--- 773,777 ----
  
  	DEBUG(("BMPCACHE2(compr=%d,flags=%x,cx=%d,cy=%d,id=%d,idx=%d,Bpp=%d,bs=%d)\n",
! 	       compressed, flags, width, height, cache_id, cache_idx, Bpp, bufsize));
  
  	bmpdata = (uint8 *) xmalloc(width * height * Bpp);
***************
*** 790,794 ****
  		for (y = 0; y < height; y++)
  			memcpy(&bmpdata[(height - y - 1) * (width * Bpp)],
! 					&data[y * (width * Bpp)], width * Bpp);
  	}
  
--- 790,794 ----
  		for (y = 0; y < height; y++)
  			memcpy(&bmpdata[(height - y - 1) * (width * Bpp)],
! 			       &data[y * (width * Bpp)], width * Bpp);
  	}
  
***************
*** 800,804 ****
  		if (flags & PERSIST)
  			pstcache_put_bitmap(cache_id, cache_idx, bitmap_id, width, height,
! 					width * height * Bpp, bmpdata);
  	}
  	else
--- 800,804 ----
  		if (flags & PERSIST)
  			pstcache_put_bitmap(cache_id, cache_idx, bitmap_id, width, height,
! 					    width * height * Bpp, bmpdata);
  	}
  	else
***************
*** 886,893 ****
  
  	in_uint16_le(s, length);
! 	in_uint16_le(s, flags);		/* used by bmpcache2 */
  	in_uint8(s, type);
  
! 	next_order = s->p + (sint16)length + 7;
  
  	switch (type)
--- 886,893 ----
  
  	in_uint16_le(s, length);
! 	in_uint16_le(s, flags);	/* used by bmpcache2 */
  	in_uint8(s, type);
  
! 	next_order = s->p + (sint16) length + 7;
  
  	switch (type)

Index: orders.h
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/orders.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** orders.h	27 Jun 2004 17:51:54 -0000	1.9
--- orders.h	12 Jul 2004 21:07:39 -0000	1.10
***************
*** 265,269 ****
  
  #define LONG_FORMAT		0x80
! #define BUFSIZE_MASK		0x3FFF  /* or 0x1FFF? */
  
  #define MAX_GLYPH 32
--- 265,269 ----
  
  #define LONG_FORMAT		0x80
! #define BUFSIZE_MASK		0x3FFF	/* or 0x1FFF? */
  
  #define MAX_GLYPH 32

Index: proto.h
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/proto.h,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** proto.h	5 Jul 2004 19:09:07 -0000	1.66
--- proto.h	12 Jul 2004 21:07:39 -0000	1.67
***************
*** 65,71 ****
  void pstcache_touch_bitmap(uint8 id, uint16 idx, uint32 stamp);
  BOOL pstcache_load_bitmap(uint8 id, uint16 idx);
! BOOL pstcache_put_bitmap(uint8 id, uint16 idx, uint8 *bmp_id, uint16 wd,
! 		uint16 ht, uint16 len, uint8 *data);
! int pstcache_enumerate(uint8 id, uint8 *list);
  BOOL pstcache_init(uint8 id);
  /* rdesktop.c */
--- 65,71 ----
  void pstcache_touch_bitmap(uint8 id, uint16 idx, uint32 stamp);
  BOOL pstcache_load_bitmap(uint8 id, uint16 idx);
! BOOL pstcache_put_bitmap(uint8 id, uint16 idx, uint8 * bmp_id, uint16 wd,
! 			 uint16 ht, uint16 len, uint8 * data);
! int pstcache_enumerate(uint8 id, uint8 * list);
  BOOL pstcache_init(uint8 id);
  /* rdesktop.c */
***************
*** 88,92 ****
  void rd_close_file(int fd);
  int rd_read_file(int fd, void *ptr, int len);
! int rd_write_file(int fd, void* ptr, int len);
  int rd_lseek_file(int fd, int offset);
  BOOL rd_lock_file(int fd, int start, int len);
--- 88,92 ----
  void rd_close_file(int fd);
  int rd_read_file(int fd, void *ptr, int len);
! int rd_write_file(int fd, void *ptr, int len);
  int rd_lseek_file(int fd, int offset);
  BOOL rd_lock_file(int fd, int start, int len);

Index: pstcache.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/pstcache.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pstcache.c	27 Jun 2004 17:51:54 -0000	1.1
--- pstcache.c	12 Jul 2004 21:07:39 -0000	1.2
***************
*** 21,25 ****
  #include "rdesktop.h"
  
! #define MAX_CELL_SIZE		0x1000			/* pixels */
  
  #define IS_PERSISTENT(id) (g_pstcache_fd[id] > 0)
--- 21,25 ----
  #include "rdesktop.h"
  
! #define MAX_CELL_SIZE		0x1000	/* pixels */
  
  #define IS_PERSISTENT(id) (g_pstcache_fd[id] > 0)
***************
*** 34,38 ****
  int g_pstcache_Bpp;
  BOOL g_pstcache_enumerated = False;
! uint8 zero_id[] = {0, 0, 0, 0, 0, 0, 0, 0};
  
  
--- 34,38 ----
  int g_pstcache_Bpp;
  BOOL g_pstcache_enumerated = False;
! uint8 zero_id[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
  
  
***************
*** 66,70 ****
  	rd_lseek_file(fd, cache_idx * (g_pstcache_Bpp * MAX_CELL_SIZE + sizeof(CELLHEADER)));
  	rd_read_file(fd, &cellhdr, sizeof(CELLHEADER));
! 	celldata = (uint8 *)xmalloc(cellhdr.length);
  	rd_read_file(fd, celldata, cellhdr.length);
  
--- 66,70 ----
  	rd_lseek_file(fd, cache_idx * (g_pstcache_Bpp * MAX_CELL_SIZE + sizeof(CELLHEADER)));
  	rd_read_file(fd, &cellhdr, sizeof(CELLHEADER));
! 	celldata = (uint8 *) xmalloc(cellhdr.length);
  	rd_read_file(fd, celldata, cellhdr.length);
  
***************
*** 80,85 ****
  /* Store a bitmap in the persistent cache */
  BOOL
! pstcache_put_bitmap(uint8 cache_id, uint16 cache_idx, uint8 *bitmap_id,
! 		uint16 width, uint16 height, uint16 length, uint8 *data)
  {
  	int fd;
--- 80,85 ----
  /* Store a bitmap in the persistent cache */
  BOOL
! pstcache_put_bitmap(uint8 cache_id, uint16 cache_idx, uint8 * bitmap_id,
! 		    uint16 width, uint16 height, uint16 length, uint8 * data)
  {
  	int fd;
***************
*** 105,109 ****
  /* list the bitmaps from the persistent cache file */
  int
! pstcache_enumerate(uint8 cache_id, uint8 *idlist)
  {
  	int fd, n, c = 0;
--- 105,109 ----
  /* list the bitmaps from the persistent cache file */
  int
! pstcache_enumerate(uint8 cache_id, uint8 * idlist)
  {
  	int fd, n, c = 0;
***************
*** 128,132 ****
  		{
  			memcpy(idlist + n * sizeof(BITMAP_ID), cellhdr.bitmap_id,
! 					sizeof(BITMAP_ID));
  
  			if (cellhdr.stamp)
--- 128,132 ----
  		{
  			memcpy(idlist + n * sizeof(BITMAP_ID), cellhdr.bitmap_id,
! 			       sizeof(BITMAP_ID));
  
  			if (cellhdr.stamp)

Index: rdesktop.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdesktop.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -C2 -d -r1.109 -r1.110
*** rdesktop.c	29 Jun 2004 16:22:41 -0000	1.109
--- rdesktop.c	12 Jul 2004 21:07:39 -0000	1.110
***************
*** 368,372 ****
  
  	while ((c = getopt(argc, argv,
! 			VNCOPT "u:d:s:c:p:n:k:g:fbBeEmCDKS:T:NX:a:x:Pr:045h?")) != -1)
  	{
  		switch (c)
--- 368,372 ----
  
  	while ((c = getopt(argc, argv,
! 			   VNCOPT "u:d:s:c:p:n:k:g:fbBeEmCDKS:T:NX:a:x:Pr:045h?")) != -1)
  	{
  		switch (c)
***************
*** 1168,1172 ****
  	char *home;
  	char fn[256];
!    int fd;
  
  	home = getenv("HOME");
--- 1168,1172 ----
  	char *home;
  	char fn[256];
! 	int fd;
  
  	home = getenv("HOME");
***************
*** 1184,1188 ****
  rd_close_file(int fd)
  {
!   close(fd);
  }
  
--- 1184,1188 ----
  rd_close_file(int fd)
  {
! 	close(fd);
  }
  
***************
*** 1191,1202 ****
  rd_read_file(int fd, void *ptr, int len)
  {
!   return read(fd, ptr, len);
  }
  
  /* write to file */
  int
! rd_write_file(int fd, void* ptr, int len)
  {
!   return write(fd, ptr, len);
  }
  
--- 1191,1202 ----
  rd_read_file(int fd, void *ptr, int len)
  {
! 	return read(fd, ptr, len);
  }
  
  /* write to file */
  int
! rd_write_file(int fd, void *ptr, int len)
  {
! 	return write(fd, ptr, len);
  }
  
***************
*** 1205,1209 ****
  rd_lseek_file(int fd, int offset)
  {
!   return lseek(fd, offset, SEEK_SET);
  }
  
--- 1205,1209 ----
  rd_lseek_file(int fd, int offset)
  {
! 	return lseek(fd, offset, SEEK_SET);
  }
  

Index: rdp.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdp.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** rdp.c	5 Jul 2004 19:09:07 -0000	1.67
--- rdp.c	12 Jul 2004 21:07:39 -0000	1.68
***************
*** 411,416 ****
  
  		/* list */
! 		out_uint8a(s, idlist + offset * sizeof(BITMAP_ID),
! 				count * sizeof(BITMAP_ID));
  
  		s_mark_end(s);
--- 411,415 ----
  
  		/* list */
! 		out_uint8a(s, idlist + offset * sizeof(BITMAP_ID), count * sizeof(BITMAP_ID));
  
  		s_mark_end(s);
***************
*** 562,566 ****
  		out_uint32_le(s, BMPCACHE2_C2_CELLS);
  	}
! 	out_uint8s(s, 20);		/* other bitmap caches not used */
  }
  
--- 561,565 ----
  		out_uint32_le(s, BMPCACHE2_C2_CELLS);
  	}
! 	out_uint8s(s, 20);	/* other bitmap caches not used */
  }
  
***************
*** 653,657 ****
  /* Output unknown capability sets */
  static void
! rdp_out_unknown_caps(STREAM s, uint16 id, uint16 length, uint8 *caps)
  {
  	out_uint16_le(s, id);
--- 652,656 ----
  /* Output unknown capability sets */
  static void
! rdp_out_unknown_caps(STREAM s, uint16 id, uint16 length, uint8 * caps)
  {
  	out_uint16_le(s, id);
***************
*** 673,677 ****
  		RDP_CAPLEN_ACTIVATE + RDP_CAPLEN_CONTROL +
  		RDP_CAPLEN_POINTER + RDP_CAPLEN_SHARE +
! 		0x58 + 0x08 + 0x08 + 0x34 /* unknown caps */ +
  		4 /* w2k fix, why? */ ;
  
--- 672,676 ----
  		RDP_CAPLEN_ACTIVATE + RDP_CAPLEN_CONTROL +
  		RDP_CAPLEN_POINTER + RDP_CAPLEN_SHARE +
! 		0x58 + 0x08 + 0x08 + 0x34 /* unknown caps */  +
  		4 /* w2k fix, why? */ ;
  
***************
*** 701,709 ****
  	rdp_out_share_caps(s);
  
! 	rdp_out_unknown_caps(s, 0x0d, 0x58, caps_0x0d); /* international? */
  	rdp_out_unknown_caps(s, 0x0c, 0x08, caps_0x0c);
  	rdp_out_unknown_caps(s, 0x0e, 0x08, caps_0x0e);
! 	rdp_out_unknown_caps(s, 0x10, 0x34, caps_0x10); /* glyph cache? */
! 				
  	s_mark_end(s);
  	sec_send(s, sec_flags);
--- 700,708 ----
  	rdp_out_share_caps(s);
  
! 	rdp_out_unknown_caps(s, 0x0d, 0x58, caps_0x0d);	/* international? */
  	rdp_out_unknown_caps(s, 0x0c, 0x08, caps_0x0c);
  	rdp_out_unknown_caps(s, 0x0e, 0x08, caps_0x0e);
! 	rdp_out_unknown_caps(s, 0x10, 0x34, caps_0x10);	/* glyph cache? */
! 
  	s_mark_end(s);
  	sec_send(s, sec_flags);
***************
*** 749,753 ****
  	{
  		warning("screen size changed from %dx%d to %dx%d\n", g_width, g_height,
! 				width, height);
  		g_width = width;
  		g_height = height;
--- 748,752 ----
  	{
  		warning("screen size changed from %dx%d to %dx%d\n", g_width, g_height,
! 			width, height);
  		g_width = width;
  		g_height = height;



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
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.