/[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 855 by stargo, Sun Mar 13 13:18:48 2005 UTC revision 857 by stargo, Sun Mar 13 13:36:04 2005 UTC
# Line 23  Line 23 
23  #include <unistd.h>  #include <unistd.h>
24  #include "rdesktop.h"  #include "rdesktop.h"
25    
26    #ifdef HAVE_ICONV
27  #ifdef HAVE_ICONV_H  #ifdef HAVE_ICONV_H
28  #include <iconv.h>  #include <iconv.h>
29  #endif  #endif
30    #endif
31    
32  extern uint16 g_mcs_userid;  extern uint16 g_mcs_userid;
33  extern char g_username[64];  extern char g_username[64];
# Line 148  rdp_send_data(STREAM s, uint8 data_pdu_t Line 150  rdp_send_data(STREAM s, uint8 data_pdu_t
150  void  void
151  rdp_out_unistr(STREAM s, char *string, int len)  rdp_out_unistr(STREAM s, char *string, int len)
152  {  {
153  #ifdef  HAVE_ICONV  #ifdef HAVE_ICONV
154          size_t ibl = strlen(string), obl = len + 2;          size_t ibl = strlen(string), obl = len + 2;
155          static iconv_t iconv_h = (iconv_t)-1;          static iconv_t iconv_h = (iconv_t)-1;
156          char   *pin = string, *pout;          char   *pin = string, *pout;
157  #ifdef  B_ENDIAN  #ifdef B_ENDIAN
158          char ss[4096];  // FIXME: global MAX_BUF_SIZE macro need          char ss[4096];  // FIXME: global MAX_BUF_SIZE macro need
159    
160          pout = ss;          pout = ss;
# Line 189  rdp_out_unistr(STREAM s, char *string, i Line 191  rdp_out_unistr(STREAM s, char *string, i
191                  return;                  return;
192          }          }
193    
194  #ifdef  B_ENDIAN  #ifdef B_ENDIAN
195          swab(ss, s->p, len + 4);          swab(ss, s->p, len + 4);
196  #endif  #endif
197    
# Line 217  rdp_out_unistr(STREAM s, char *string, i Line 219  rdp_out_unistr(STREAM s, char *string, i
219  int  int
220  rdp_in_unistr(STREAM s, char *string, int uni_len)  rdp_in_unistr(STREAM s, char *string, int uni_len)
221  {  {
222  #ifdef  HAVE_ICONV  #ifdef HAVE_ICONV
223          size_t ibl = uni_len, obl = uni_len;          size_t ibl = uni_len, obl = uni_len;
224          char *pin, *pout = string;          char *pin, *pout = string;
225          static iconv_t iconv_h = (iconv_t)-1;          static iconv_t iconv_h = (iconv_t)-1;
226  #ifdef  B_ENDIAN  #ifdef B_ENDIAN
227          char ss[4096];  // FIXME: global MAX_BUF_SIZE macro need          char ss[4096];  // FIXME: global MAX_BUF_SIZE macro need
228    
229          swab(s->p, ss, uni_len);          swab(s->p, ss, uni_len);

Legend:
Removed from v.855  
changed lines
  Added in v.857

  ViewVC Help
Powered by ViewVC 1.1.26