/[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 865 by stargo, Tue Mar 15 11:25:50 2005 UTC revision 866 by stargo, Sat Mar 19 15:30:14 2005 UTC
# Line 161  rdp_out_unistr(STREAM s, char *string, i Line 161  rdp_out_unistr(STREAM s, char *string, i
161  #ifdef HAVE_ICONV  #ifdef HAVE_ICONV
162          size_t ibl = strlen(string), obl = len + 2;          size_t ibl = strlen(string), obl = len + 2;
163          static iconv_t iconv_h = (iconv_t) - 1;          static iconv_t iconv_h = (iconv_t) - 1;
164          char *pin = string, *pout = s->p;          char *pin = string, *pout = (char *)s->p;
165    
166          memset(pout, 0, len + 4);          memset(pout, 0, len + 4);
167    
# Line 176  rdp_out_unistr(STREAM s, char *string, i Line 176  rdp_out_unistr(STREAM s, char *string, i
176                                          g_codepage, WINDOWS_CODEPAGE, (int) iconv_h);                                          g_codepage, WINDOWS_CODEPAGE, (int) iconv_h);
177    
178                                  g_iconv_works = False;                                  g_iconv_works = False;
179                                  return (rdp_out_unistr(s, string, len));                                  rdp_out_unistr(s, string, len);
180                                    return;
181                          }                          }
182                          if (iconv(iconv_h, (ICONV_CONST char **) &pin, &i, &pout, &o) ==                          if (iconv(iconv_h, (ICONV_CONST char **) &pin, &i, &pout, &o) ==
183                              (size_t) - 1)                              (size_t) - 1)
# Line 186  rdp_out_unistr(STREAM s, char *string, i Line 187  rdp_out_unistr(STREAM s, char *string, i
187                                  warning("rdp_out_unistr: iconv(1) fail, errno %d\n", errno);                                  warning("rdp_out_unistr: iconv(1) fail, errno %d\n", errno);
188    
189                                  g_iconv_works = False;                                  g_iconv_works = False;
190                                  return (rdp_out_unistr(s, string, len));                                  rdp_out_unistr(s, string, len);
191                                    return;
192                          }                          }
193                          pin = string;                          pin = string;
194                          pout = (char *) s->p;                          pout = (char *) s->p;
# Line 199  rdp_out_unistr(STREAM s, char *string, i Line 201  rdp_out_unistr(STREAM s, char *string, i
201                          warning("rdp_out_unistr: iconv(2) fail, errno %d\n", errno);                          warning("rdp_out_unistr: iconv(2) fail, errno %d\n", errno);
202    
203                          g_iconv_works = False;                          g_iconv_works = False;
204                          return (rdp_out_unistr(s, string, len));                          rdp_out_unistr(s, string, len);
205                            return;
206                  }                  }
207    
208                  s->p += len + 2;                  s->p += len + 2;
# Line 231  rdp_in_unistr(STREAM s, char *string, in Line 234  rdp_in_unistr(STREAM s, char *string, in
234  {  {
235  #ifdef HAVE_ICONV  #ifdef HAVE_ICONV
236          size_t ibl = uni_len, obl = uni_len;          size_t ibl = uni_len, obl = uni_len;
237          char *pin = s->p, *pout = string;          char *pin = (char *)s->p, *pout = string;
238          static iconv_t iconv_h = (iconv_t) - 1;          static iconv_t iconv_h = (iconv_t) - 1;
239    
240          if (g_iconv_works)          if (g_iconv_works)

Legend:
Removed from v.865  
changed lines
  Added in v.866

  ViewVC Help
Powered by ViewVC 1.1.26