125 |
|
|
126 |
BLOCK_INPUT; |
BLOCK_INPUT; |
127 |
|
|
128 |
nbytes = STRING_BYTES (XSTRING (string)) + 1; |
nbytes = SBYTES (string) + 1; |
129 |
src = XSTRING (string)->data; |
src = SDATA (string); |
130 |
dst = src; |
dst = src; |
131 |
|
|
132 |
/* We need to know how many lines there are, since we need CRLF line |
/* We need to know how many lines there are, since we need CRLF line |
141 |
{ |
{ |
142 |
/* Since we are now handling multilingual text, we must consider |
/* Since we are now handling multilingual text, we must consider |
143 |
encoding text for the clipboard. */ |
encoding text for the clipboard. */ |
144 |
int charset_info = find_charset_in_text (src, XSTRING (string)->size, |
int charset_info = find_charset_in_text (src, SCHARS (string), |
145 |
nbytes, NULL, Qnil); |
nbytes, NULL, Qnil); |
146 |
|
|
147 |
if (charset_info == 0) |
if (charset_info == 0) |
202 |
&& !NILP (Ffboundp (coding.pre_write_conversion))) |
&& !NILP (Ffboundp (coding.pre_write_conversion))) |
203 |
{ |
{ |
204 |
string = run_pre_post_conversion_on_str (string, &coding, 1); |
string = run_pre_post_conversion_on_str (string, &coding, 1); |
205 |
src = XSTRING (string)->data; |
src = SDATA (string); |
206 |
nbytes = STRING_BYTES (XSTRING (string)); |
nbytes = SBYTES (string); |
207 |
} |
} |
208 |
coding.src_multibyte = 1; |
coding.src_multibyte = 1; |
209 |
coding.dst_multibyte = 0; |
coding.dst_multibyte = 0; |
368 |
/* Convert CRLF line endings (the standard CF_TEXT clipboard |
/* Convert CRLF line endings (the standard CF_TEXT clipboard |
369 |
format) to LF endings as used internally by Emacs. */ |
format) to LF endings as used internally by Emacs. */ |
370 |
|
|
371 |
dst = XSTRING (ret)->data; |
dst = SDATA (ret); |
372 |
while (1) |
while (1) |
373 |
{ |
{ |
374 |
unsigned char *next; |
unsigned char *next; |