mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
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.
This commit is contained in:
parent
aa49aa8840
commit
b62eac0f87
9 changed files with 23 additions and 38 deletions
12
src/coding.c
12
src/coding.c
|
|
@ -9516,6 +9516,10 @@ code_convert_string_norecord (Lisp_Object string, Lisp_Object coding_system,
|
|||
}
|
||||
|
||||
|
||||
/* #define ENABLE_UTF_8_CONVERTER_TEST */
|
||||
|
||||
#ifdef ENABLE_UTF_8_CONVERTER_TEST
|
||||
|
||||
/* Return the gap address of BUFFER. If the gap size is less than
|
||||
NBYTES, enlarge the gap in advance. */
|
||||
|
||||
|
|
@ -9618,7 +9622,7 @@ get_char_bytes (int c, int *len)
|
|||
If the two arguments are Qnil, return Qnil if STRING has a
|
||||
non-Unicode character. */
|
||||
|
||||
Lisp_Object
|
||||
static Lisp_Object
|
||||
encode_string_utf_8 (Lisp_Object string, Lisp_Object buffer,
|
||||
bool nocopy, Lisp_Object handle_8_bit,
|
||||
Lisp_Object handle_over_uni)
|
||||
|
|
@ -9873,7 +9877,7 @@ encode_string_utf_8 (Lisp_Object string, Lisp_Object buffer,
|
|||
If the two arguments are Qnil, return Qnil if STRING has an invalid
|
||||
sequence. */
|
||||
|
||||
Lisp_Object
|
||||
static Lisp_Object
|
||||
decode_string_utf_8 (Lisp_Object string, Lisp_Object buffer,
|
||||
bool nocopy, Lisp_Object handle_8_bit,
|
||||
Lisp_Object handle_over_uni)
|
||||
|
|
@ -10111,10 +10115,6 @@ decode_string_utf_8 (Lisp_Object string, Lisp_Object buffer,
|
|||
return val;
|
||||
}
|
||||
|
||||
/* #define ENABLE_UTF_8_CONVERTER_TEST */
|
||||
|
||||
#ifdef ENABLE_UTF_8_CONVERTER_TEST
|
||||
|
||||
/* These functions are useful for testing and benchmarking
|
||||
encode_string_utf_8 and decode_string_utf_8. */
|
||||
|
||||
|
|
|
|||
|
|
@ -689,10 +689,6 @@ extern Lisp_Object code_convert_string (Lisp_Object, Lisp_Object,
|
|||
Lisp_Object, bool, bool, bool);
|
||||
extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object,
|
||||
bool);
|
||||
extern Lisp_Object encode_string_utf_8 (Lisp_Object, Lisp_Object, bool,
|
||||
Lisp_Object, Lisp_Object);
|
||||
extern Lisp_Object decode_string_utf_8 (Lisp_Object, Lisp_Object, bool,
|
||||
Lisp_Object, Lisp_Object);
|
||||
extern Lisp_Object encode_file_name (Lisp_Object);
|
||||
extern Lisp_Object decode_file_name (Lisp_Object);
|
||||
extern Lisp_Object raw_text_coding_system (Lisp_Object);
|
||||
|
|
|
|||
|
|
@ -3079,7 +3079,7 @@ Both must be integers or markers. */)
|
|||
}
|
||||
|
||||
/* Return X mod Y. Both must be integers and Y must be nonzero. */
|
||||
Lisp_Object
|
||||
static Lisp_Object
|
||||
integer_mod (Lisp_Object x, Lisp_Object y)
|
||||
{
|
||||
if (FIXNUMP (x) && FIXNUMP (y))
|
||||
|
|
|
|||
32
src/fns.c
32
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for)
|
|||
return cache;
|
||||
}
|
||||
|
||||
FcCharSet *
|
||||
static FcCharSet *
|
||||
ftfont_get_fc_charset (Lisp_Object entity)
|
||||
{
|
||||
Lisp_Object val, cache;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
|
|||
#endif /* HAVE_M17N_FLT */
|
||||
#endif /* HAVE_LIBOTF */
|
||||
|
||||
extern FcCharSet *ftfont_get_fc_charset (Lisp_Object);
|
||||
extern void ftfont_fix_match (FcPattern *, FcPattern *);
|
||||
extern void ftfont_add_rendering_parameters (FcPattern *, Lisp_Object);
|
||||
extern FcPattern *ftfont_entity_pattern (Lisp_Object, int);
|
||||
|
|
|
|||
|
|
@ -3615,7 +3615,6 @@ extern void set_default_internal (Lisp_Object, Lisp_Object,
|
|||
extern Lisp_Object expt_integer (Lisp_Object, Lisp_Object);
|
||||
extern void syms_of_data (void);
|
||||
extern void swap_in_global_binding (struct Lisp_Symbol *);
|
||||
extern Lisp_Object integer_mod (Lisp_Object, Lisp_Object);
|
||||
|
||||
/* Defined in cmds.c */
|
||||
extern void syms_of_cmds (void);
|
||||
|
|
|
|||
|
|
@ -2809,12 +2809,6 @@ errputc (int c)
|
|||
fputc_unlocked (c, errstream ());
|
||||
}
|
||||
|
||||
void
|
||||
verrprintf (char const *fmt, va_list ap)
|
||||
{
|
||||
vfprintf (errstream (), fmt, ap);
|
||||
}
|
||||
|
||||
void
|
||||
errwrite (void const *buf, ptrdiff_t nbuf)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
|
|||
|
||||
extern FILE *emacs_fopen (char const *, char const *);
|
||||
extern void errputc (int);
|
||||
extern void verrprintf (char const *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0);
|
||||
extern void errwrite (void const *, ptrdiff_t);
|
||||
extern void close_output_streams (void);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue