diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-08-24 11:42:28 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-08-24 15:55:08 -0700 |
commit | b62eac0f870754bc75b1162246f9901a04910044 (patch) | |
tree | 4b392cfe5a8c36c6a735fd25228d3622ccbd17b5 /src/fns.c | |
parent | aa49aa884053d0e8b33efe265f2aade19d1f3f3d (diff) | |
download | emacs-b62eac0f870754bc75b1162246f9901a04910044.tar.gz |
extern function cleanup
Most of these functions can be static. A few are unused.
* src/coding.c (encode_string_utf_8, decode_string_utf_8):
Define only if ENABLE_UTF_8_CONVERTER_TEST, as they're
not needed otherwise.
* src/coding.c (encode_string_utf_8, decode_string_utf_8):
* src/data.c (integer_mod):
* src/fns.c (base64_encode_region_1, base64_encode_string_1):
* src/ftfont.c (ftfont_get_fc_charset):
Now static.
* src/sysdep.c (verrprintf): Remove; unused.
Diffstat (limited to 'src/fns.c')
-rw-r--r-- | src/fns.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/src/fns.c b/src/fns.c index 4fb33500bf5..df921e28f3b 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3280,11 +3280,11 @@ static ptrdiff_t base64_encode_1 (const char *, char *, ptrdiff_t, bool, bool, static ptrdiff_t base64_decode_1 (const char *, char *, ptrdiff_t, bool, bool, ptrdiff_t *); -Lisp_Object base64_encode_region_1 (Lisp_Object, Lisp_Object, bool, - bool, bool); +static Lisp_Object base64_encode_region_1 (Lisp_Object, Lisp_Object, bool, + bool, bool); -Lisp_Object base64_encode_string_1(Lisp_Object, bool, - bool, bool); +static Lisp_Object base64_encode_string_1 (Lisp_Object, bool, + bool, bool); DEFUN ("base64-encode-region", Fbase64_encode_region, Sbase64_encode_region, @@ -3295,7 +3295,7 @@ Optional third argument NO-LINE-BREAK means do not break long lines into shorter lines. */) (Lisp_Object beg, Lisp_Object end, Lisp_Object no_line_break) { - return base64_encode_region_1(beg, end, NILP (no_line_break), true, false); + return base64_encode_region_1 (beg, end, NILP (no_line_break), true, false); } @@ -3308,10 +3308,10 @@ Optional second argument NO-PAD means do not add padding char =. This produces the URL variant of base 64 encoding defined in RFC 4648. */) (Lisp_Object beg, Lisp_Object end, Lisp_Object no_pad) { - return base64_encode_region_1(beg, end, false, NILP(no_pad), true); + return base64_encode_region_1 (beg, end, false, NILP(no_pad), true); } -Lisp_Object +static Lisp_Object base64_encode_region_1 (Lisp_Object beg, Lisp_Object end, bool line_break, bool pad, bool base64url) { @@ -3376,11 +3376,11 @@ into shorter lines. */) (Lisp_Object string, Lisp_Object no_line_break) { - return base64_encode_string_1(string, NILP (no_line_break), true, false); + return base64_encode_string_1 (string, NILP (no_line_break), true, false); } -DEFUN ("base64url-encode-string", Fbase64url_encode_string, Sbase64url_encode_string, - 1, 2, 0, +DEFUN ("base64url-encode-string", Fbase64url_encode_string, + Sbase64url_encode_string, 1, 2, 0, doc: /* Base64url-encode STRING and return the result. Optional second argument NO-PAD means do not add padding char =. @@ -3388,12 +3388,12 @@ This produces the URL variant of base 64 encoding defined in RFC 4648. */) (Lisp_Object string, Lisp_Object no_pad) { - return base64_encode_string_1(string, false, NILP(no_pad), true); + return base64_encode_string_1 (string, false, NILP(no_pad), true); } -Lisp_Object -base64_encode_string_1(Lisp_Object string, bool line_break, - bool pad, bool base64url) +static Lisp_Object +base64_encode_string_1 (Lisp_Object string, bool line_break, + bool pad, bool base64url) { ptrdiff_t allength, length, encoded_length; char *encoded; @@ -3510,9 +3510,7 @@ base64_encode_1 (const char *from, char *to, ptrdiff_t length, { *e++ = b64_value_to_char[value]; if (pad) - { - *e++ = '='; - } + *e++ = '='; break; } |