indent fixes

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@860 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Michael Gernoth 2005-03-13 17:40:51 +00:00
parent 8dd83ad4c4
commit 99e123f63a
2 changed files with 23 additions and 23 deletions

42
rdp.c
View File

@ -156,10 +156,10 @@ rdp_out_unistr(STREAM s, char *string, int len)
{
#ifdef HAVE_ICONV
size_t ibl = strlen(string), obl = len + 2;
static iconv_t iconv_h = (iconv_t)-1;
char *pin = string, *pout;
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
char ss[4096]; // FIXME: global MAX_BUF_SIZE macro need
pout = ss;
#else
@ -168,41 +168,41 @@ rdp_out_unistr(STREAM s, char *string, int len)
memset(pout, 0, len + 4);
if (iconv_h == (iconv_t)-1)
if (iconv_h == (iconv_t) - 1)
{
size_t i = 1, o = 4;
if ((iconv_h = iconv_open(WINDOWS_CODEPAGE, g_codepage)) == (iconv_t)-1)
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);
g_codepage, WINDOWS_CODEPAGE, (int) iconv_h);
return;
}
if (iconv(iconv_h, (ICONV_CONST char**)&pin, &i, &pout, &o) == (size_t)-1)
if (iconv(iconv_h, (ICONV_CONST char **) &pin, &i, &pout, &o) == (size_t) - 1)
{
iconv_close(iconv_h);
iconv_h = (iconv_t)-1;
iconv_h = (iconv_t) - 1;
printf("rdp_out_unistr: iconv(1) fail, errno %d\n", errno);
return;
}
pin = string;
pout = (char*)s->p;
pout = (char *) s->p;
}
if (iconv(iconv_h, (ICONV_CONST char**)&pin, &ibl, &pout, &obl) == (size_t)-1)
if (iconv(iconv_h, (ICONV_CONST char **) &pin, &ibl, &pout, &obl) == (size_t) - 1)
{
iconv_close(iconv_h);
iconv_h = (iconv_t)-1;
iconv_h = (iconv_t) - 1;
printf("rdp_out_unistr: iconv(2) fail, errno %d\n", errno);
return;
}
#ifdef B_ENDIAN
swab(ss, (char*)s->p, len + 4);
swab(ss, (char *) s->p, len + 4);
#endif
s->p += len + 2;
#else /*HAVE_ICONV undef*/
#else /*HAVE_ICONV undef */
int i = 0, j = 0;
len += 2;
@ -227,30 +227,30 @@ rdp_in_unistr(STREAM s, char *string, int uni_len)
#ifdef HAVE_ICONV
size_t ibl = uni_len, obl = uni_len;
char *pin, *pout = string;
static iconv_t iconv_h = (iconv_t)-1;
static iconv_t iconv_h = (iconv_t) - 1;
#ifdef B_ENDIAN
char ss[4096]; // FIXME: global MAX_BUF_SIZE macro need
char ss[4096]; // FIXME: global MAX_BUF_SIZE macro need
swab((char*)s->p, ss, uni_len);
swab((char *) s->p, ss, uni_len);
pin = ss;
#else
pin = s->p;
#endif
if (iconv_h == (iconv_t)-1)
if (iconv_h == (iconv_t) - 1)
{
if ((iconv_h = iconv_open(g_codepage, WINDOWS_CODEPAGE)) == (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);
WINDOWS_CODEPAGE, g_codepage, (int) iconv_h);
return 0;
}
}
if (iconv(iconv_h, (ICONV_CONST char**)&pin, &ibl, &pout, &obl) == (size_t)-1)
if (iconv(iconv_h, (ICONV_CONST char **) &pin, &ibl, &pout, &obl) == (size_t) - 1)
{
iconv_close(iconv_h);
iconv_h = (iconv_t)-1;
iconv_h = (iconv_t) - 1;
printf("rdp_in_unistr: iconv fail, errno %d\n", errno);
return 0;
}