1012 |
0, 1); |
0, 1); |
1013 |
|
|
1014 |
ret = make_multibyte_string (buf, SCHARS (string), nbytes); |
ret = make_multibyte_string (buf, SCHARS (string), nbytes); |
1015 |
SAFE_FREE (nbytes); |
SAFE_FREE (); |
1016 |
|
|
1017 |
return ret; |
return ret; |
1018 |
} |
} |
1046 |
str_to_multibyte (buf, nbytes, SBYTES (string)); |
str_to_multibyte (buf, nbytes, SBYTES (string)); |
1047 |
|
|
1048 |
ret = make_multibyte_string (buf, SCHARS (string), nbytes); |
ret = make_multibyte_string (buf, SCHARS (string), nbytes); |
1049 |
SAFE_FREE (nbytes); |
SAFE_FREE (); |
1050 |
|
|
1051 |
return ret; |
return ret; |
1052 |
} |
} |
1073 |
1, 0); |
1, 0); |
1074 |
|
|
1075 |
ret = make_unibyte_string (buf, nchars); |
ret = make_unibyte_string (buf, nchars); |
1076 |
SAFE_FREE (nchars); |
SAFE_FREE (); |
1077 |
|
|
1078 |
return ret; |
return ret; |
1079 |
} |
} |
3030 |
args[i] = separator; |
args[i] = separator; |
3031 |
|
|
3032 |
ret = Fconcat (nargs, args); |
ret = Fconcat (nargs, args); |
3033 |
SAFE_FREE_LISP (nargs); |
SAFE_FREE (); |
3034 |
|
|
3035 |
return ret; |
return ret; |
3036 |
} |
} |
3056 |
mapcar1 (leni, args, function, sequence); |
mapcar1 (leni, args, function, sequence); |
3057 |
|
|
3058 |
ret = Flist (leni, args); |
ret = Flist (leni, args); |
3059 |
SAFE_FREE_LISP (leni); |
SAFE_FREE (); |
3060 |
|
|
3061 |
return ret; |
return ret; |
3062 |
} |
} |
3763 |
if (encoded_length < 0) |
if (encoded_length < 0) |
3764 |
{ |
{ |
3765 |
/* The encoding wasn't possible. */ |
/* The encoding wasn't possible. */ |
3766 |
SAFE_FREE (allength); |
SAFE_FREE (); |
3767 |
error ("Multibyte character in data for base64 encoding"); |
error ("Multibyte character in data for base64 encoding"); |
3768 |
} |
} |
3769 |
|
|
3771 |
and delete the old. (Insert first in order to preserve markers.) */ |
and delete the old. (Insert first in order to preserve markers.) */ |
3772 |
SET_PT_BOTH (XFASTINT (beg), ibeg); |
SET_PT_BOTH (XFASTINT (beg), ibeg); |
3773 |
insert (encoded, encoded_length); |
insert (encoded, encoded_length); |
3774 |
SAFE_FREE (allength); |
SAFE_FREE (); |
3775 |
del_range_byte (ibeg + encoded_length, iend + encoded_length, 1); |
del_range_byte (ibeg + encoded_length, iend + encoded_length, 1); |
3776 |
|
|
3777 |
/* If point was outside of the region, restore it exactly; else just |
/* If point was outside of the region, restore it exactly; else just |
3820 |
if (encoded_length < 0) |
if (encoded_length < 0) |
3821 |
{ |
{ |
3822 |
/* The encoding wasn't possible. */ |
/* The encoding wasn't possible. */ |
3823 |
SAFE_FREE (allength); |
SAFE_FREE (); |
3824 |
error ("Multibyte character in data for base64 encoding"); |
error ("Multibyte character in data for base64 encoding"); |
3825 |
} |
} |
3826 |
|
|
3827 |
encoded_string = make_unibyte_string (encoded, encoded_length); |
encoded_string = make_unibyte_string (encoded, encoded_length); |
3828 |
SAFE_FREE (allength); |
SAFE_FREE (); |
3829 |
|
|
3830 |
return encoded_string; |
return encoded_string; |
3831 |
} |
} |
3962 |
if (decoded_length < 0) |
if (decoded_length < 0) |
3963 |
{ |
{ |
3964 |
/* The decoding wasn't possible. */ |
/* The decoding wasn't possible. */ |
3965 |
SAFE_FREE (allength); |
SAFE_FREE (); |
3966 |
error ("Invalid base64 data"); |
error ("Invalid base64 data"); |
3967 |
} |
} |
3968 |
|
|
3970 |
and delete the old. (Insert first in order to preserve markers.) */ |
and delete the old. (Insert first in order to preserve markers.) */ |
3971 |
TEMP_SET_PT_BOTH (XFASTINT (beg), ibeg); |
TEMP_SET_PT_BOTH (XFASTINT (beg), ibeg); |
3972 |
insert_1_both (decoded, inserted_chars, decoded_length, 0, 1, 0); |
insert_1_both (decoded, inserted_chars, decoded_length, 0, 1, 0); |
3973 |
SAFE_FREE (allength); |
SAFE_FREE (); |
3974 |
|
|
3975 |
/* Delete the original text. */ |
/* Delete the original text. */ |
3976 |
del_range_both (PT, PT_BYTE, XFASTINT (end) + inserted_chars, |
del_range_both (PT, PT_BYTE, XFASTINT (end) + inserted_chars, |
4014 |
else |
else |
4015 |
decoded_string = Qnil; |
decoded_string = Qnil; |
4016 |
|
|
4017 |
SAFE_FREE (length); |
SAFE_FREE (); |
4018 |
if (!STRINGP (decoded_string)) |
if (!STRINGP (decoded_string)) |
4019 |
error ("Invalid base64 data"); |
error ("Invalid base64 data"); |
4020 |
|
|