aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii1998-07-13 14:29:35 +0000
committerEli Zaretskii1998-07-13 14:29:35 +0000
commit538d05bb65154e139152fab2c260de219a6d4fe4 (patch)
treed6f7f58c748d04a122d3f52b93d73e2e5944f32b /src
parentb3a0387c097887208de85ec20a84a84fa47f15bd (diff)
downloademacs-538d05bb65154e139152fab2c260de219a6d4fe4.tar.gz
emacs-538d05bb65154e139152fab2c260de219a6d4fe4.zip
(set_clipboard_data, get_clipboard_data, Fw16_set_clipboard_data,
Fw16_get_clipboard_data, Fx_selection_exists_p): Use CF_OEMTEXT instead of CF_TEXT.
Diffstat (limited to 'src')
-rw-r--r--src/w16select.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/w16select.c b/src/w16select.c
index 769835e1562..6c771909558 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -234,11 +234,11 @@ set_clipboard_data (Format, Data, Size, Raw)
234 unsigned long xbuf_addr, buf_offset; 234 unsigned long xbuf_addr, buf_offset;
235 unsigned char *dp = Data, *dstart = dp; 235 unsigned char *dp = Data, *dstart = dp;
236 236
237 if (Format != CF_TEXT) 237 if (Format != CF_OEMTEXT)
238 return 0; 238 return 0;
239 239
240 /* need to know final size after '\r' chars are inserted (the 240 /* need to know final size after '\r' chars are inserted (the
241 standard CF_TEXT clipboard format uses CRLF line endings, 241 standard CF_OEMTEXT clipboard format uses CRLF line endings,
242 while Emacs uses just LF internally). */ 242 while Emacs uses just LF internally). */
243 truelen = Size; 243 truelen = Size;
244 244
@@ -327,7 +327,7 @@ get_clipboard_data (Format, Data, Size, Raw)
327 unsigned long xbuf_addr; 327 unsigned long xbuf_addr;
328 unsigned char *dp = Data; 328 unsigned char *dp = Data;
329 329
330 if (Format != CF_TEXT) 330 if (Format != CF_OEMTEXT)
331 return 0; 331 return 0;
332 332
333 if (Size == 0) 333 if (Size == 0)
@@ -476,7 +476,7 @@ DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_dat
476 goto error; 476 goto error;
477 477
478 ok = empty_clipboard () 478 ok = empty_clipboard ()
479 && (ok1 = set_clipboard_data (CF_TEXT, src, nbytes, no_crlf_conversion)); 479 && (ok1 = set_clipboard_data (CF_OEMTEXT, src, nbytes, no_crlf_conversion));
480 480
481 if (!no_crlf_conversion) 481 if (!no_crlf_conversion)
482 Vlast_coding_system_used = Qraw_text; 482 Vlast_coding_system_used = Qraw_text;
@@ -532,14 +532,14 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat
532 if (!open_clipboard ()) 532 if (!open_clipboard ())
533 goto unblock; 533 goto unblock;
534 534
535 if ((data_size = get_clipboard_data_size (CF_TEXT)) == 0 || 535 if ((data_size = get_clipboard_data_size (CF_OEMTEXT)) == 0 ||
536 (htext = (unsigned char *)xmalloc (data_size)) == 0) 536 (htext = (unsigned char *)xmalloc (data_size)) == 0)
537 goto closeclip; 537 goto closeclip;
538 538
539 /* need to know final size after '\r' chars are removed because 539 /* need to know final size after '\r' chars are removed because
540 we can't change the string size manually, and doing an extra 540 we can't change the string size manually, and doing an extra
541 copy is silly */ 541 copy is silly */
542 if ((truelen = get_clipboard_data (CF_TEXT, htext, data_size, 0)) == 0) 542 if ((truelen = get_clipboard_data (CF_OEMTEXT, htext, data_size, 0)) == 0)
543 goto closeclip; 543 goto closeclip;
544 544
545 /* Do we need to decode it? */ 545 /* Do we need to decode it? */
@@ -567,7 +567,7 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat
567 setup_coding_system 567 setup_coding_system
568 (Fcheck_coding_system (Vclipboard_coding_system), &coding); 568 (Fcheck_coding_system (Vclipboard_coding_system), &coding);
569 coding.mode |= CODING_MODE_LAST_BLOCK; 569 coding.mode |= CODING_MODE_LAST_BLOCK;
570 truelen = get_clipboard_data (CF_TEXT, htext, data_size, 1); 570 truelen = get_clipboard_data (CF_OEMTEXT, htext, data_size, 1);
571 bufsize = decoding_buffer_size (&coding, truelen); 571 bufsize = decoding_buffer_size (&coding, truelen);
572 buf = (unsigned char *) xmalloc (bufsize); 572 buf = (unsigned char *) xmalloc (bufsize);
573 decode_coding (&coding, htext, buf, truelen, bufsize); 573 decode_coding (&coding, htext, buf, truelen, bufsize);
@@ -633,7 +633,7 @@ and t is the same as `SECONDARY'.")
633 633
634 if (open_clipboard ()) 634 if (open_clipboard ())
635 { 635 {
636 if (get_clipboard_data_size (CF_TEXT)) 636 if (get_clipboard_data_size (CF_OEMTEXT))
637 val = Qt; 637 val = Qt;
638 close_clipboard (); 638 close_clipboard ();
639 } 639 }