diff options
| author | Eli Zaretskii | 2019-06-08 11:14:31 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-06-08 11:14:31 +0300 |
| commit | 1cc90d21d6e1aa21ab99d163796b41920b413ac7 (patch) | |
| tree | 21cdaa9bd77ab857b45c6a8c8bb149a64edaa3b0 /doc | |
| parent | 468e7fb5d44af1cf7b2e16de398cf9dd73e6dc93 (diff) | |
| download | emacs-1cc90d21d6e1aa21ab99d163796b41920b413ac7.tar.gz emacs-1cc90d21d6e1aa21ab99d163796b41920b413ac7.zip | |
Minor fixes for the last commits
* src/fns.c (Fbase64url_encode_region)
(Fbase64url_encode_string, Fbase64_decode_region)
(Fbase64_decode_string): Fix doc strings.
(base64_decode_1): Minor stylistic code changes.
* doc/lispref/text.texi (Base 64): Fix typos and improve
wording of the last committed text.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/text.texi | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 3e0cf4c06f6..55f52698498 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -4541,7 +4541,7 @@ Internet informational document describing a standard. RFCs are | |||
| 4541 | usually written by technical experts acting on their own initiative, | 4541 | usually written by technical experts acting on their own initiative, |
| 4542 | and are traditionally written in a pragmatic, experience-driven | 4542 | and are traditionally written in a pragmatic, experience-driven |
| 4543 | manner. | 4543 | manner. |
| 4544 | }2045 and also in RFC4648. This section describes the functions for | 4544 | }2045 and also in RFC 4648. This section describes the functions for |
| 4545 | converting to and from this code. | 4545 | converting to and from this code. |
| 4546 | 4546 | ||
| 4547 | @deffn Command base64-encode-region beg end &optional no-line-break | 4547 | @deffn Command base64-encode-region beg end &optional no-line-break |
| @@ -4559,19 +4559,13 @@ the output is just one long line. | |||
| 4559 | @end deffn | 4559 | @end deffn |
| 4560 | 4560 | ||
| 4561 | @deffn Command base64url-encode-region beg end &optional no-pad | 4561 | @deffn Command base64url-encode-region beg end &optional no-pad |
| 4562 | This function converts the region from @var{beg} to @var{end} into base | 4562 | This function is like @code{base64-encode-region}, but it implements |
| 4563 | 64 code. It returns the length of the encoded text. An error is | 4563 | the URL variant if base 64 encoding, per RFC 4648, and it doesn't |
| 4564 | signaled if a character in the region is multibyte, i.e., in a | 4564 | inserts newline characters into the encoded text, so the output is |
| 4565 | multibyte buffer the region must contain only characters from the | 4565 | just one long line. |
| 4566 | charsets @code{ascii}, @code{eight-bit-control} and | ||
| 4567 | @code{eight-bit-graphic}. | ||
| 4568 | |||
| 4569 | Contrary to the function @code{base64-encode-region}, this function | ||
| 4570 | doesnt inserts newline characters into the encoded text, so the output | ||
| 4571 | is just one long line. | ||
| 4572 | 4566 | ||
| 4573 | If the optional argument @var{no-pad} is non-@code{nil} then padding | 4567 | If the optional argument @var{no-pad} is non-@code{nil} then this |
| 4574 | (@code{=}) isn't generated. | 4568 | function doesn't generate the padding (@code{=}). |
| 4575 | @end deffn | 4569 | @end deffn |
| 4576 | 4570 | ||
| 4577 | @defun base64-encode-string string &optional no-line-break | 4571 | @defun base64-encode-string string &optional no-line-break |
| @@ -4587,17 +4581,12 @@ the result string is just one long line. | |||
| 4587 | @end defun | 4581 | @end defun |
| 4588 | 4582 | ||
| 4589 | @defun base64url-encode-string string &optional no-pad | 4583 | @defun base64url-encode-string string &optional no-pad |
| 4590 | This function converts the string @var{string} into base 64 url code | 4584 | Like @code{base64-encode-string}, but generates the URL variant of |
| 4591 | (see RFC4648). It returns a string containing the encoded text. As | 4585 | base 64, and doesn't insert newline characters into the encoded text, |
| 4592 | for @code{base64url-encode-region}, an error is signaled if a | 4586 | so the result is just one long line. |
| 4593 | character in the string is multibyte. | ||
| 4594 | 4587 | ||
| 4595 | Contrary to @code{base64-encode-string}, this function doesnt inserts | 4588 | If the optional argument @var{no-pad} is non-@code{nil} then this |
| 4596 | newline characters into the encoded text, so the result string is just | 4589 | function doesn't generate the padding. |
| 4597 | one long line. | ||
| 4598 | |||
| 4599 | If the optional argument @var{no-pad} is non-@code{nil} then padding | ||
| 4600 | (@code{=}) isn't generated. | ||
| 4601 | @end defun | 4590 | @end defun |
| 4602 | 4591 | ||
| 4603 | @deffn Command base64-decode-region beg end &optional base64url | 4592 | @deffn Command base64-decode-region beg end &optional base64url |
| @@ -4607,8 +4596,8 @@ the decoded text. | |||
| 4607 | 4596 | ||
| 4608 | The decoding functions ignore newline characters in the encoded text. | 4597 | The decoding functions ignore newline characters in the encoded text. |
| 4609 | 4598 | ||
| 4610 | If optional argument @var{base64url} is is non-@code{nil} then padding | 4599 | If optional argument @var{base64url} is is non-@code{nil}, then padding |
| 4611 | become optionnal and url variant is used (see RFC4648). | 4600 | is optional, and the URL variant of base 64 encoding is used. |
| 4612 | @end deffn | 4601 | @end deffn |
| 4613 | 4602 | ||
| 4614 | @defun base64-decode-string string &optional base64url | 4603 | @defun base64-decode-string string &optional base64url |
| @@ -4618,8 +4607,9 @@ decoded text. | |||
| 4618 | 4607 | ||
| 4619 | The decoding functions ignore newline characters in the encoded text. | 4608 | The decoding functions ignore newline characters in the encoded text. |
| 4620 | 4609 | ||
| 4621 | If optional argument @var{base64url} is is non-@code{nil} then padding | 4610 | |
| 4622 | become optionnal and url variant is used (see RFC4648). | 4611 | If optional argument @var{base64url} is is non-@code{nil}, then padding |
| 4612 | is optional, and the URL variant of base 64 encoding is used. | ||
| 4623 | @end defun | 4613 | @end defun |
| 4624 | 4614 | ||
| 4625 | @node Checksum/Hash | 4615 | @node Checksum/Hash |