From 74ab6df507f0f4707a8bd25924fbdba9d1610f4f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 23:58:57 -0700 Subject: [PATCH] * coding.h (coding, code_convert_region, encode_coding_gap): Remove decls. * coding.c (Vsjis_coding_system, Vbig5_coding_system): (iso_code_class, detect_coding, code_convert_region): Now static. (encode_coding_gap): Remove; unused. --- src/ChangeLog | 6 ++++++ src/coding.c | 34 +++++----------------------------- src/coding.h | 6 ------ 3 files changed, 11 insertions(+), 35 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 03f4fcee063..35acd030955 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2011-04-11 Paul Eggert + * coding.h (coding, code_convert_region, encode_coding_gap): Remove + decls. + * coding.c (Vsjis_coding_system, Vbig5_coding_system): + (iso_code_class, detect_coding, code_convert_region): Now static. + (encode_coding_gap): Remove; unused. + * chartab.c (chartab_chars, chartab_bits): Now static. * charset.h (charset_iso_8859_1): Remove decl. diff --git a/src/coding.c b/src/coding.c index d2124db73f2..c29713a5c0c 100644 --- a/src/coding.c +++ b/src/coding.c @@ -358,8 +358,8 @@ static Lisp_Object Qtranslation_table_for_decode; static Lisp_Object Qtranslation_table_for_encode; /* Two special coding systems. */ -Lisp_Object Vsjis_coding_system; -Lisp_Object Vbig5_coding_system; +static Lisp_Object Vsjis_coding_system; +static Lisp_Object Vbig5_coding_system; /* ISO2022 section */ @@ -2862,7 +2862,7 @@ encode_coding_emacs_mule (struct coding_system *coding) COMPOSITION_WITH_RULE_ALTCHARS: ESC 4 ALTCHAR [ RULE ALTCHAR ] ESC 0 CHAR [ CHAR ] ESC 1 */ -enum iso_code_class_type iso_code_class[256]; +static enum iso_code_class_type iso_code_class[256]; #define SAFE_CHARSET_P(coding, id) \ ((id) <= (coding)->max_charset_id \ @@ -6212,7 +6212,7 @@ adjust_coding_eol_type (struct coding_system *coding, int eol_seen) system is detected, update fields of CODING by the detected coding system. */ -void +static void detect_coding (struct coding_system *coding) { const unsigned char *src, *src_end; @@ -7530,30 +7530,6 @@ decode_coding_gap (struct coding_system *coding, return coding->result; } -int -encode_coding_gap (struct coding_system *coding, - EMACS_INT chars, EMACS_INT bytes) -{ - int count = SPECPDL_INDEX (); - - code_conversion_save (0, 0); - - coding->src_object = Fcurrent_buffer (); - coding->src_chars = chars; - coding->src_bytes = bytes; - coding->src_pos = -chars; - coding->src_pos_byte = -bytes; - coding->src_multibyte = chars < bytes; - coding->dst_object = coding->src_object; - coding->dst_pos = PT; - coding->dst_pos_byte = PT_BYTE; - - encode_coding (coding); - - unbind_to (count, Qnil); - return coding->result; -} - /* Decode the text in the range FROM/FROM_BYTE and TO/TO_BYTE in SRC_OBJECT into DST_OBJECT by coding context CODING. @@ -8834,7 +8810,7 @@ is nil. */) } -Lisp_Object +static Lisp_Object code_convert_region (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object dst_object, int encodep, int norecord) diff --git a/src/coding.h b/src/coding.h index ff7fcc7c3ac..85e153dcc3a 100644 --- a/src/coding.h +++ b/src/coding.h @@ -695,10 +695,6 @@ extern int encoding_buffer_size (struct coding_system *, int); extern void setup_coding_system (Lisp_Object, struct coding_system *); extern Lisp_Object coding_charset_list (struct coding_system *); extern Lisp_Object coding_system_charset_list (Lisp_Object); -extern void detect_coding (struct coding_system *); -extern Lisp_Object code_convert_region (Lisp_Object, Lisp_Object, - Lisp_Object, Lisp_Object, - int, int); extern Lisp_Object code_convert_string (Lisp_Object, Lisp_Object, Lisp_Object, int, int, int); extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object, @@ -709,8 +705,6 @@ extern Lisp_Object complement_process_encoding_system (Lisp_Object); extern int decode_coding_gap (struct coding_system *, EMACS_INT, EMACS_INT); -extern int encode_coding_gap (struct coding_system *, - EMACS_INT, EMACS_INT); extern void decode_coding_object (struct coding_system *, Lisp_Object, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, Lisp_Object); -- 2.39.2