mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-05 11:45:45 +00:00
(Fbase64_encode_string): New optional argument `NO_LINE_BREAK'.
This commit is contained in:
parent
02882bbce6
commit
c22554ac39
10
src/fns.c
10
src/fns.c
@ -2897,9 +2897,11 @@ into shorter lines.")
|
||||
}
|
||||
|
||||
DEFUN ("base64-encode-string", Fbase64_encode_string, Sbase64_encode_string,
|
||||
1, 1, 0,
|
||||
"Base64-encode STRING and return the result.")
|
||||
(string)
|
||||
1, 2, 0,
|
||||
"Base64-encode STRING and return the result.\n\
|
||||
Optional second argument NO-LINE-BREAK means do not break long lines\n\
|
||||
into shorter lines.")
|
||||
(string, no_line_break)
|
||||
Lisp_Object string;
|
||||
{
|
||||
int allength, length, encoded_length;
|
||||
@ -2918,7 +2920,7 @@ DEFUN ("base64-encode-string", Fbase64_encode_string, Sbase64_encode_string,
|
||||
encoded = (char *) xmalloc (allength);
|
||||
|
||||
encoded_length = base64_encode_1 (XSTRING (string)->data,
|
||||
encoded, length, 0);
|
||||
encoded, length, NILP (no_line_break));
|
||||
if (encoded_length > allength)
|
||||
abort ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user