diff options
Diffstat (limited to 'src/fns.c')
| -rw-r--r-- | src/fns.c | 19 |
1 files changed, 9 insertions, 10 deletions
| @@ -908,7 +908,7 @@ string_to_multibyte (Lisp_Object string) | |||
| 908 | /* If all the chars are ASCII, they won't need any more bytes once | 908 | /* If all the chars are ASCII, they won't need any more bytes once |
| 909 | converted. */ | 909 | converted. */ |
| 910 | if (nbytes == SBYTES (string)) | 910 | if (nbytes == SBYTES (string)) |
| 911 | return make_multibyte_string (SDATA (string), nbytes, nbytes); | 911 | return make_multibyte_string (SSDATA (string), nbytes, nbytes); |
| 912 | 912 | ||
| 913 | SAFE_ALLOCA (buf, unsigned char *, nbytes); | 913 | SAFE_ALLOCA (buf, unsigned char *, nbytes); |
| 914 | memcpy (buf, SDATA (string), SBYTES (string)); | 914 | memcpy (buf, SDATA (string), SBYTES (string)); |
| @@ -1171,7 +1171,7 @@ value is a new vector that contains the elements between index FROM | |||
| 1171 | 1171 | ||
| 1172 | if (STRINGP (string)) | 1172 | if (STRINGP (string)) |
| 1173 | { | 1173 | { |
| 1174 | res = make_specified_string (SDATA (string) + from_byte, | 1174 | res = make_specified_string (SSDATA (string) + from_byte, |
| 1175 | to_char - from_char, to_byte - from_byte, | 1175 | to_char - from_char, to_byte - from_byte, |
| 1176 | STRING_MULTIBYTE (string)); | 1176 | STRING_MULTIBYTE (string)); |
| 1177 | copy_text_properties (make_number (from_char), make_number (to_char), | 1177 | copy_text_properties (make_number (from_char), make_number (to_char), |
| @@ -1235,7 +1235,7 @@ With one argument, just copy STRING without its properties. */) | |||
| 1235 | args_out_of_range_3 (string, make_number (from_char), | 1235 | args_out_of_range_3 (string, make_number (from_char), |
| 1236 | make_number (to_char)); | 1236 | make_number (to_char)); |
| 1237 | 1237 | ||
| 1238 | return make_specified_string (SDATA (string) + from_byte, | 1238 | return make_specified_string (SSDATA (string) + from_byte, |
| 1239 | to_char - from_char, to_byte - from_byte, | 1239 | to_char - from_char, to_byte - from_byte, |
| 1240 | STRING_MULTIBYTE (string)); | 1240 | STRING_MULTIBYTE (string)); |
| 1241 | } | 1241 | } |
| @@ -1266,7 +1266,7 @@ substring_both (Lisp_Object string, EMACS_INT from, EMACS_INT from_byte, | |||
| 1266 | 1266 | ||
| 1267 | if (STRINGP (string)) | 1267 | if (STRINGP (string)) |
| 1268 | { | 1268 | { |
| 1269 | res = make_specified_string (SDATA (string) + from_byte, | 1269 | res = make_specified_string (SSDATA (string) + from_byte, |
| 1270 | to - from, to_byte - from_byte, | 1270 | to - from, to_byte - from_byte, |
| 1271 | STRING_MULTIBYTE (string)); | 1271 | STRING_MULTIBYTE (string)); |
| 1272 | copy_text_properties (make_number (from), make_number (to), | 1272 | copy_text_properties (make_number (from), make_number (to), |
| @@ -2496,12 +2496,12 @@ is nil, and `use-dialog-box' is non-nil. */) | |||
| 2496 | ans = Fdowncase (Fread_from_minibuffer (prompt, Qnil, Qnil, Qnil, | 2496 | ans = Fdowncase (Fread_from_minibuffer (prompt, Qnil, Qnil, Qnil, |
| 2497 | Qyes_or_no_p_history, Qnil, | 2497 | Qyes_or_no_p_history, Qnil, |
| 2498 | Qnil)); | 2498 | Qnil)); |
| 2499 | if (SCHARS (ans) == 3 && !strcmp (SDATA (ans), "yes")) | 2499 | if (SCHARS (ans) == 3 && !strcmp (SSDATA (ans), "yes")) |
| 2500 | { | 2500 | { |
| 2501 | UNGCPRO; | 2501 | UNGCPRO; |
| 2502 | return Qt; | 2502 | return Qt; |
| 2503 | } | 2503 | } |
| 2504 | if (SCHARS (ans) == 2 && !strcmp (SDATA (ans), "no")) | 2504 | if (SCHARS (ans) == 2 && !strcmp (SSDATA (ans), "no")) |
| 2505 | { | 2505 | { |
| 2506 | UNGCPRO; | 2506 | UNGCPRO; |
| 2507 | return Qnil; | 2507 | return Qnil; |
| @@ -3038,7 +3038,7 @@ into shorter lines. */) | |||
| 3038 | /* We need to allocate enough room for decoding the text. */ | 3038 | /* We need to allocate enough room for decoding the text. */ |
| 3039 | SAFE_ALLOCA (encoded, char *, allength); | 3039 | SAFE_ALLOCA (encoded, char *, allength); |
| 3040 | 3040 | ||
| 3041 | encoded_length = base64_encode_1 (SDATA (string), | 3041 | encoded_length = base64_encode_1 (SSDATA (string), |
| 3042 | encoded, length, NILP (no_line_break), | 3042 | encoded, length, NILP (no_line_break), |
| 3043 | STRING_MULTIBYTE (string)); | 3043 | STRING_MULTIBYTE (string)); |
| 3044 | if (encoded_length > allength) | 3044 | if (encoded_length > allength) |
| @@ -3233,7 +3233,7 @@ DEFUN ("base64-decode-string", Fbase64_decode_string, Sbase64_decode_string, | |||
| 3233 | SAFE_ALLOCA (decoded, char *, length); | 3233 | SAFE_ALLOCA (decoded, char *, length); |
| 3234 | 3234 | ||
| 3235 | /* The decoded result should be unibyte. */ | 3235 | /* The decoded result should be unibyte. */ |
| 3236 | decoded_length = base64_decode_1 (SDATA (string), decoded, length, | 3236 | decoded_length = base64_decode_1 (SSDATA (string), decoded, length, |
| 3237 | 0, NULL); | 3237 | 0, NULL); |
| 3238 | if (decoded_length > length) | 3238 | if (decoded_length > length) |
| 3239 | abort (); | 3239 | abort (); |
| @@ -4745,7 +4745,7 @@ guesswork fails. Normally, an error is signaled in such case. */) | |||
| 4745 | object = code_convert_string (object, coding_system, Qnil, 1, 0, 0); | 4745 | object = code_convert_string (object, coding_system, Qnil, 1, 0, 0); |
| 4746 | } | 4746 | } |
| 4747 | 4747 | ||
| 4748 | md5_buffer (SDATA (object) + start_byte, | 4748 | md5_buffer (SSDATA (object) + start_byte, |
| 4749 | SBYTES (object) - (size_byte - end_byte), | 4749 | SBYTES (object) - (size_byte - end_byte), |
| 4750 | digest); | 4750 | digest); |
| 4751 | 4751 | ||
| @@ -4936,4 +4936,3 @@ void | |||
| 4936 | init_fns (void) | 4936 | init_fns (void) |
| 4937 | { | 4937 | { |
| 4938 | } | 4938 | } |
| 4939 | |||