/[rdesktop]/sourceforge.net/trunk/rdesktop/xclip.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/xclip.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 913 by astrand, Mon Jun 27 12:18:48 2005 UTC revision 941 by astrand, Tue Aug 2 09:19:24 2005 UTC
# Line 191  xclip_handle_SelectionNotify(XSelectionE Line 191  xclip_handle_SelectionNotify(XSelectionE
191                          translated_data = lf2crlf(data, &length);                          translated_data = lf2crlf(data, &length);
192    
193                          g_clip_buffer = (uint8 *) xmalloc(length);                          g_clip_buffer = (uint8 *) xmalloc(length);
194                          strncpy(g_clip_buffer, translated_data, length);                          strncpy((char *) g_clip_buffer, (char *) translated_data, length);
195                          xfree(translated_data);                          xfree(translated_data);
196                          g_clip_buflen = length;                          g_clip_buflen = length;
197    
# Line 321  xclip_handle_PropertyNotify(XPropertyEve Line 321  xclip_handle_PropertyNotify(XPropertyEve
321                  {                  {
322                          uint8 *translated_data;                          uint8 *translated_data;
323                          uint32 length = nitems;                          uint32 length = nitems;
324                            uint8 *tmp;
325    
326                          DEBUG_CLIPBOARD(("Translating linebreaks before sending data\n"));                          DEBUG_CLIPBOARD(("Translating linebreaks before sending data\n"));
327                          translated_data = lf2crlf(data, &length);                          translated_data = lf2crlf(data, &length);
328    
329                          uint8 *tmp = xmalloc(length + g_clip_buflen);                          tmp = xmalloc(length + g_clip_buflen);
330                          strncpy(tmp, g_clip_buffer, g_clip_buflen);                          strncpy((char *) tmp, (char *) g_clip_buffer, g_clip_buflen);
331                          xfree(g_clip_buffer);                          xfree(g_clip_buffer);
332    
333                          strncpy(tmp + g_clip_buflen, translated_data, length);                          strncpy((char *) (tmp + g_clip_buflen), (char *) translated_data, length);
334                          xfree(translated_data);                          xfree(translated_data);
335    
336                          g_clip_buffer = tmp;                          g_clip_buffer = tmp;

Legend:
Removed from v.913  
changed lines
  Added in v.941

  ViewVC Help
Powered by ViewVC 1.1.26