diff options
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 34 |
1 files changed, 5 insertions, 29 deletions
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; | |||
| 358 | static Lisp_Object Qtranslation_table_for_encode; | 358 | static Lisp_Object Qtranslation_table_for_encode; |
| 359 | 359 | ||
| 360 | /* Two special coding systems. */ | 360 | /* Two special coding systems. */ |
| 361 | Lisp_Object Vsjis_coding_system; | 361 | static Lisp_Object Vsjis_coding_system; |
| 362 | Lisp_Object Vbig5_coding_system; | 362 | static Lisp_Object Vbig5_coding_system; |
| 363 | 363 | ||
| 364 | /* ISO2022 section */ | 364 | /* ISO2022 section */ |
| 365 | 365 | ||
| @@ -2862,7 +2862,7 @@ encode_coding_emacs_mule (struct coding_system *coding) | |||
| 2862 | COMPOSITION_WITH_RULE_ALTCHARS: | 2862 | COMPOSITION_WITH_RULE_ALTCHARS: |
| 2863 | ESC 4 ALTCHAR [ RULE ALTCHAR ] ESC 0 CHAR [ CHAR ] ESC 1 */ | 2863 | ESC 4 ALTCHAR [ RULE ALTCHAR ] ESC 0 CHAR [ CHAR ] ESC 1 */ |
| 2864 | 2864 | ||
| 2865 | enum iso_code_class_type iso_code_class[256]; | 2865 | static enum iso_code_class_type iso_code_class[256]; |
| 2866 | 2866 | ||
| 2867 | #define SAFE_CHARSET_P(coding, id) \ | 2867 | #define SAFE_CHARSET_P(coding, id) \ |
| 2868 | ((id) <= (coding)->max_charset_id \ | 2868 | ((id) <= (coding)->max_charset_id \ |
| @@ -6212,7 +6212,7 @@ adjust_coding_eol_type (struct coding_system *coding, int eol_seen) | |||
| 6212 | system is detected, update fields of CODING by the detected coding | 6212 | system is detected, update fields of CODING by the detected coding |
| 6213 | system. */ | 6213 | system. */ |
| 6214 | 6214 | ||
| 6215 | void | 6215 | static void |
| 6216 | detect_coding (struct coding_system *coding) | 6216 | detect_coding (struct coding_system *coding) |
| 6217 | { | 6217 | { |
| 6218 | const unsigned char *src, *src_end; | 6218 | const unsigned char *src, *src_end; |
| @@ -7530,30 +7530,6 @@ decode_coding_gap (struct coding_system *coding, | |||
| 7530 | return coding->result; | 7530 | return coding->result; |
| 7531 | } | 7531 | } |
| 7532 | 7532 | ||
| 7533 | int | ||
| 7534 | encode_coding_gap (struct coding_system *coding, | ||
| 7535 | EMACS_INT chars, EMACS_INT bytes) | ||
| 7536 | { | ||
| 7537 | int count = SPECPDL_INDEX (); | ||
| 7538 | |||
| 7539 | code_conversion_save (0, 0); | ||
| 7540 | |||
| 7541 | coding->src_object = Fcurrent_buffer (); | ||
| 7542 | coding->src_chars = chars; | ||
| 7543 | coding->src_bytes = bytes; | ||
| 7544 | coding->src_pos = -chars; | ||
| 7545 | coding->src_pos_byte = -bytes; | ||
| 7546 | coding->src_multibyte = chars < bytes; | ||
| 7547 | coding->dst_object = coding->src_object; | ||
| 7548 | coding->dst_pos = PT; | ||
| 7549 | coding->dst_pos_byte = PT_BYTE; | ||
| 7550 | |||
| 7551 | encode_coding (coding); | ||
| 7552 | |||
| 7553 | unbind_to (count, Qnil); | ||
| 7554 | return coding->result; | ||
| 7555 | } | ||
| 7556 | |||
| 7557 | 7533 | ||
| 7558 | /* Decode the text in the range FROM/FROM_BYTE and TO/TO_BYTE in | 7534 | /* Decode the text in the range FROM/FROM_BYTE and TO/TO_BYTE in |
| 7559 | SRC_OBJECT into DST_OBJECT by coding context CODING. | 7535 | SRC_OBJECT into DST_OBJECT by coding context CODING. |
| @@ -8834,7 +8810,7 @@ is nil. */) | |||
| 8834 | } | 8810 | } |
| 8835 | 8811 | ||
| 8836 | 8812 | ||
| 8837 | Lisp_Object | 8813 | static Lisp_Object |
| 8838 | code_convert_region (Lisp_Object start, Lisp_Object end, | 8814 | code_convert_region (Lisp_Object start, Lisp_Object end, |
| 8839 | Lisp_Object coding_system, Lisp_Object dst_object, | 8815 | Lisp_Object coding_system, Lisp_Object dst_object, |
| 8840 | int encodep, int norecord) | 8816 | int encodep, int norecord) |