diff options
| author | Eli Zaretskii | 1998-08-04 10:38:22 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 1998-08-04 10:38:22 +0000 |
| commit | 199c7c44b90fa2390afe6c207098580d846dd5f8 (patch) | |
| tree | 6e7d4514660119b523fd3d6f18ac4b1b744b124f /src | |
| parent | be02cd54b3109b000f2dfaf828a538bbdd11b3f7 (diff) | |
| download | emacs-199c7c44b90fa2390afe6c207098580d846dd5f8.tar.gz emacs-199c7c44b90fa2390afe6c207098580d846dd5f8.zip | |
(Fw16_set_clipboard_data, Fw16_get_clipboard_data, syms_of_win16select):
Rename Vclipboard_coding_system to Vselection_coding_system.
(Fw16_set_clipboard_data): Don't count trailing zero in the string
for the purposes of conversion.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w16select.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/w16select.c b/src/w16select.c index 6c771909558..e43aa1b5fb4 100644 --- a/src/w16select.c +++ b/src/w16select.c | |||
| @@ -70,7 +70,7 @@ Lisp_Object QCLIPBOARD, QPRIMARY; | |||
| 70 | 70 | ||
| 71 | /* Coding system for communicating with other Windows programs via the | 71 | /* Coding system for communicating with other Windows programs via the |
| 72 | clipboard. */ | 72 | clipboard. */ |
| 73 | static Lisp_Object Vclipboard_coding_system; | 73 | static Lisp_Object Vselection_coding_system; |
| 74 | 74 | ||
| 75 | /* The segment address and the size of the buffer in low | 75 | /* The segment address and the size of the buffer in low |
| 76 | memory used to move data between us and WinOldAp module. */ | 76 | memory used to move data between us and WinOldAp module. */ |
| @@ -436,14 +436,14 @@ DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_dat | |||
| 436 | 436 | ||
| 437 | BLOCK_INPUT; | 437 | BLOCK_INPUT; |
| 438 | 438 | ||
| 439 | nbytes = STRING_BYTES (XSTRING (string)) + 1; | 439 | nbytes = STRING_BYTES (XSTRING (string)); |
| 440 | src = XSTRING (string)->data; | 440 | src = XSTRING (string)->data; |
| 441 | 441 | ||
| 442 | /* Since we are now handling multilingual text, we must consider | 442 | /* Since we are now handling multilingual text, we must consider |
| 443 | encoding text for the clipboard. */ | 443 | encoding text for the clipboard. */ |
| 444 | 444 | ||
| 445 | bzero (charsets, (MAX_CHARSET + 1) * sizeof (int)); | 445 | bzero (charsets, (MAX_CHARSET + 1) * sizeof (int)); |
| 446 | num = ((nbytes <= 2 /* Check the possibility of short cut. */ | 446 | num = ((nbytes <= 1 /* Check the possibility of short cut. */ |
| 447 | || NILP (buffer_defaults.enable_multibyte_characters)) | 447 | || NILP (buffer_defaults.enable_multibyte_characters)) |
| 448 | ? 0 | 448 | ? 0 |
| 449 | : find_charset_in_str (src, nbytes, charsets, Qnil, 1)); | 449 | : find_charset_in_str (src, nbytes, charsets, Qnil, 1)); |
| @@ -463,7 +463,7 @@ DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_dat | |||
| 463 | unsigned char *htext2; | 463 | unsigned char *htext2; |
| 464 | 464 | ||
| 465 | setup_coding_system | 465 | setup_coding_system |
| 466 | (Fcheck_coding_system (Vclipboard_coding_system), &coding); | 466 | (Fcheck_coding_system (Vselection_coding_system), &coding); |
| 467 | coding.mode |= CODING_MODE_LAST_BLOCK; | 467 | coding.mode |= CODING_MODE_LAST_BLOCK; |
| 468 | Vlast_coding_system_used = coding.symbol; | 468 | Vlast_coding_system_used = coding.symbol; |
| 469 | bufsize = encoding_buffer_size (&coding, nbytes); | 469 | bufsize = encoding_buffer_size (&coding, nbytes); |
| @@ -565,7 +565,7 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat | |||
| 565 | struct coding_system coding; | 565 | struct coding_system coding; |
| 566 | 566 | ||
| 567 | setup_coding_system | 567 | setup_coding_system |
| 568 | (Fcheck_coding_system (Vclipboard_coding_system), &coding); | 568 | (Fcheck_coding_system (Vselection_coding_system), &coding); |
| 569 | coding.mode |= CODING_MODE_LAST_BLOCK; | 569 | coding.mode |= CODING_MODE_LAST_BLOCK; |
| 570 | truelen = get_clipboard_data (CF_OEMTEXT, 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); |
| @@ -649,13 +649,13 @@ syms_of_win16select () | |||
| 649 | defsubr (&Sw16_get_clipboard_data); | 649 | defsubr (&Sw16_get_clipboard_data); |
| 650 | defsubr (&Sx_selection_exists_p); | 650 | defsubr (&Sx_selection_exists_p); |
| 651 | 651 | ||
| 652 | DEFVAR_LISP ("clipboard-coding-system", &Vclipboard_coding_system, | 652 | DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, |
| 653 | "Coding system for communicating with other X clients.\n\ | 653 | "Coding system for communicating with other X clients.\n\ |
| 654 | When sending or receiving text via cut_buffer, selection, and clipboard,\n\ | 654 | When sending or receiving text via cut_buffer, selection, and clipboard,\n\ |
| 655 | the text is encoded or decoded by this coding system.\n\ | 655 | the text is encoded or decoded by this coding system.\n\ |
| 656 | A default value is `iso-latin-1-dos'"); | 656 | A default value is `iso-latin-1-dos'"); |
| 657 | Vclipboard_coding_system=intern ("iso-latin-1-dos"); | 657 | Vselection_coding_system=intern ("iso-latin-1-dos"); |
| 658 | staticpro(&Vclipboard_coding_system); | 658 | staticpro(&Vselection_coding_system); |
| 659 | 659 | ||
| 660 | QPRIMARY = intern ("PRIMARY"); staticpro (&QPRIMARY); | 660 | QPRIMARY = intern ("PRIMARY"); staticpro (&QPRIMARY); |
| 661 | QCLIPBOARD = intern ("CLIPBOARD"); staticpro (&QCLIPBOARD); | 661 | QCLIPBOARD = intern ("CLIPBOARD"); staticpro (&QCLIPBOARD); |