CVS: rdesktop rdesktop.c,1.122,1.123 rdp.c,1.80,1.81

Michael Gernoth <[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-serv30268

Modified Files:
	rdesktop.c rdp.c 
Log Message:
indent fixes


Index: rdesktop.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdesktop.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -C2 -d -r1.122 -r1.123
*** rdesktop.c	13 Mar 2005 13:36:03 -0000	1.122
--- rdesktop.c	13 Mar 2005 17:40:51 -0000	1.123
***************
*** 714,718 ****
  	}
  #endif
!  
  	if (g_hostname[0] == 0)
  	{
--- 714,718 ----
  	}
  #endif
! 
  	if (g_hostname[0] == 0)
  	{

Index: rdp.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdp.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -C2 -d -r1.80 -r1.81
*** rdp.c	13 Mar 2005 17:36:15 -0000	1.80
--- rdp.c	13 Mar 2005 17:40:51 -0000	1.81
***************
*** 157,164 ****
  #ifdef HAVE_ICONV
  	size_t ibl = strlen(string), obl = len + 2;
! 	static iconv_t iconv_h = (iconv_t)-1;
! 	char   *pin = string, *pout;
  #ifdef B_ENDIAN
! 	char ss[4096];	// FIXME: global MAX_BUF_SIZE macro need
  
  	pout = ss;
--- 157,164 ----
  #ifdef HAVE_ICONV
  	size_t ibl = strlen(string), obl = len + 2;
! 	static iconv_t iconv_h = (iconv_t) - 1;
! 	char *pin = string, *pout;
  #ifdef B_ENDIAN
! 	char ss[4096];		// FIXME: global MAX_BUF_SIZE macro need
  
  	pout = ss;
***************
*** 169,196 ****
  	memset(pout, 0, len + 4);
  
! 	if (iconv_h == (iconv_t)-1)
  	{
  		size_t i = 1, o = 4;
! 		if ((iconv_h = iconv_open(WINDOWS_CODEPAGE, g_codepage)) == (iconv_t)-1)
  		{
  			printf("rdp_out_unistr: iconv_open[%s -> %s] fail %d\n",
! 				g_codepage, WINDOWS_CODEPAGE, (int)iconv_h);
  			return;
  		}
! 		if (iconv(iconv_h, (ICONV_CONST char**)&pin, &i, &pout, &o) == (size_t)-1)
  		{
  			iconv_close(iconv_h);
! 			iconv_h = (iconv_t)-1;
  			printf("rdp_out_unistr: iconv(1) fail, errno %d\n", errno);
  			return;
  		}
  		pin = string;
! 		pout = (char*)s->p;
  	}
  
! 	if (iconv(iconv_h, (ICONV_CONST char**)&pin, &ibl, &pout, &obl) == (size_t)-1)
  	{
  		iconv_close(iconv_h);
! 		iconv_h = (iconv_t)-1;
  		printf("rdp_out_unistr: iconv(2) fail, errno %d\n", errno);
  		return;
--- 169,196 ----
  	memset(pout, 0, len + 4);
  
! 	if (iconv_h == (iconv_t) - 1)
  	{
  		size_t i = 1, o = 4;
! 		if ((iconv_h = iconv_open(WINDOWS_CODEPAGE, g_codepage)) == (iconv_t) - 1)
  		{
  			printf("rdp_out_unistr: iconv_open[%s -> %s] fail %d\n",
! 			       g_codepage, WINDOWS_CODEPAGE, (int) iconv_h);
  			return;
  		}
! 		if (iconv(iconv_h, (ICONV_CONST char **) &pin, &i, &pout, &o) == (size_t) - 1)
  		{
  			iconv_close(iconv_h);
! 			iconv_h = (iconv_t) - 1;
  			printf("rdp_out_unistr: iconv(1) fail, errno %d\n", errno);
  			return;
  		}
  		pin = string;
! 		pout = (char *) s->p;
  	}
  
! 	if (iconv(iconv_h, (ICONV_CONST char **) &pin, &ibl, &pout, &obl) == (size_t) - 1)
  	{
  		iconv_close(iconv_h);
! 		iconv_h = (iconv_t) - 1;
  		printf("rdp_out_unistr: iconv(2) fail, errno %d\n", errno);
  		return;
***************
*** 198,207 ****
  
  #ifdef B_ENDIAN
! 	swab(ss, (char*)s->p, len + 4);
  #endif
  
  	s->p += len + 2;
  
! #else /*HAVE_ICONV undef*/
  	int i = 0, j = 0;
  
--- 198,207 ----
  
  #ifdef B_ENDIAN
! 	swab(ss, (char *) s->p, len + 4);
  #endif
  
  	s->p += len + 2;
  
! #else /*HAVE_ICONV undef */
  	int i = 0, j = 0;
  
***************
*** 213,217 ****
  		s->p[i++] = 0;
  	}
! 	
  	s->p += len;
  #endif
--- 213,217 ----
  		s->p[i++] = 0;
  	}
! 
  	s->p += len;
  #endif
***************
*** 228,236 ****
  	size_t ibl = uni_len, obl = uni_len;
  	char *pin, *pout = string;
! 	static iconv_t iconv_h = (iconv_t)-1;
  #ifdef B_ENDIAN
! 	char ss[4096];	// FIXME: global MAX_BUF_SIZE macro need
  
! 	swab((char*)s->p, ss, uni_len);
  	pin = ss;
  #else
--- 228,236 ----
  	size_t ibl = uni_len, obl = uni_len;
  	char *pin, *pout = string;
! 	static iconv_t iconv_h = (iconv_t) - 1;
  #ifdef B_ENDIAN
! 	char ss[4096];		// FIXME: global MAX_BUF_SIZE macro need
  
! 	swab((char *) s->p, ss, uni_len);
  	pin = ss;
  #else
***************
*** 238,255 ****
  #endif
  
! 	if (iconv_h == (iconv_t)-1)
  	{
! 		if ((iconv_h = iconv_open(g_codepage, WINDOWS_CODEPAGE)) == (iconv_t)-1)
  		{
  			printf("rdp_in_unistr: iconv_open[%s -> %s] fail %d\n",
! 				WINDOWS_CODEPAGE, g_codepage, (int)iconv_h);
  			return 0;
  		}
  	}
  
! 	if (iconv(iconv_h, (ICONV_CONST char**)&pin, &ibl, &pout, &obl) == (size_t)-1)
  	{
  		iconv_close(iconv_h);
! 		iconv_h = (iconv_t)-1;
  		printf("rdp_in_unistr: iconv fail, errno %d\n", errno);
  		return 0;
--- 238,255 ----
  #endif
  
! 	if (iconv_h == (iconv_t) - 1)
  	{
! 		if ((iconv_h = iconv_open(g_codepage, WINDOWS_CODEPAGE)) == (iconv_t) - 1)
  		{
  			printf("rdp_in_unistr: iconv_open[%s -> %s] fail %d\n",
! 			       WINDOWS_CODEPAGE, g_codepage, (int) iconv_h);
  			return 0;
  		}
  	}
  
! 	if (iconv(iconv_h, (ICONV_CONST char **) &pin, &ibl, &pout, &obl) == (size_t) - 1)
  	{
  		iconv_close(iconv_h);
! 		iconv_h = (iconv_t) - 1;
  		printf("rdp_in_unistr: iconv fail, errno %d\n", errno);
  		return 0;



-------------------------------------------------------
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.