diff options
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 268 |
1 files changed, 136 insertions, 132 deletions
diff --git a/src/coding.c b/src/coding.c index 5fd59d394d9..704d26f3f9b 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -159,7 +159,7 @@ detect_coding_XXX (struct coding_system *coding, | |||
| 159 | const unsigned char *src = coding->source; | 159 | const unsigned char *src = coding->source; |
| 160 | const unsigned char *src_end = coding->source + coding->src_bytes; | 160 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 161 | int multibytep = coding->src_multibyte; | 161 | int multibytep = coding->src_multibyte; |
| 162 | EMACS_INT consumed_chars = 0; | 162 | ptrdiff_t consumed_chars = 0; |
| 163 | int found = 0; | 163 | int found = 0; |
| 164 | ...; | 164 | ...; |
| 165 | 165 | ||
| @@ -266,7 +266,7 @@ encode_coding_XXX (struct coding_system *coding) | |||
| 266 | unsigned char *dst = coding->destination + coding->produced; | 266 | unsigned char *dst = coding->destination + coding->produced; |
| 267 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 267 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 268 | unsigned char *adjusted_dst_end = dst_end - _MAX_BYTES_PRODUCED_IN_LOOP_; | 268 | unsigned char *adjusted_dst_end = dst_end - _MAX_BYTES_PRODUCED_IN_LOOP_; |
| 269 | EMACS_INT produced_chars = 0; | 269 | ptrdiff_t produced_chars = 0; |
| 270 | 270 | ||
| 271 | for (; charbuf < charbuf_end && dst < adjusted_dst_end; charbuf++) | 271 | for (; charbuf < charbuf_end && dst < adjusted_dst_end; charbuf++) |
| 272 | { | 272 | { |
| @@ -849,31 +849,31 @@ static int encode_coding_raw_text (struct coding_system *); | |||
| 849 | 849 | ||
| 850 | static void coding_set_source (struct coding_system *); | 850 | static void coding_set_source (struct coding_system *); |
| 851 | static void coding_set_destination (struct coding_system *); | 851 | static void coding_set_destination (struct coding_system *); |
| 852 | static void coding_alloc_by_realloc (struct coding_system *, EMACS_INT); | 852 | static void coding_alloc_by_realloc (struct coding_system *, ptrdiff_t); |
| 853 | static void coding_alloc_by_making_gap (struct coding_system *, | 853 | static void coding_alloc_by_making_gap (struct coding_system *, |
| 854 | EMACS_INT, EMACS_INT); | 854 | ptrdiff_t, ptrdiff_t); |
| 855 | static unsigned char *alloc_destination (struct coding_system *, | 855 | static unsigned char *alloc_destination (struct coding_system *, |
| 856 | EMACS_INT, unsigned char *); | 856 | ptrdiff_t, unsigned char *); |
| 857 | static void setup_iso_safe_charsets (Lisp_Object); | 857 | static void setup_iso_safe_charsets (Lisp_Object); |
| 858 | static unsigned char *encode_designation_at_bol (struct coding_system *, | 858 | static unsigned char *encode_designation_at_bol (struct coding_system *, |
| 859 | int *, unsigned char *); | 859 | int *, unsigned char *); |
| 860 | static int detect_eol (const unsigned char *, | 860 | static int detect_eol (const unsigned char *, |
| 861 | EMACS_INT, enum coding_category); | 861 | ptrdiff_t, enum coding_category); |
| 862 | static Lisp_Object adjust_coding_eol_type (struct coding_system *, int); | 862 | static Lisp_Object adjust_coding_eol_type (struct coding_system *, int); |
| 863 | static void decode_eol (struct coding_system *); | 863 | static void decode_eol (struct coding_system *); |
| 864 | static Lisp_Object get_translation_table (Lisp_Object, int, int *); | 864 | static Lisp_Object get_translation_table (Lisp_Object, int, int *); |
| 865 | static Lisp_Object get_translation (Lisp_Object, int *, int *); | 865 | static Lisp_Object get_translation (Lisp_Object, int *, int *); |
| 866 | static int produce_chars (struct coding_system *, Lisp_Object, int); | 866 | static int produce_chars (struct coding_system *, Lisp_Object, int); |
| 867 | static inline void produce_charset (struct coding_system *, int *, | 867 | static inline void produce_charset (struct coding_system *, int *, |
| 868 | EMACS_INT); | 868 | ptrdiff_t); |
| 869 | static void produce_annotation (struct coding_system *, EMACS_INT); | 869 | static void produce_annotation (struct coding_system *, ptrdiff_t); |
| 870 | static int decode_coding (struct coding_system *); | 870 | static int decode_coding (struct coding_system *); |
| 871 | static inline int *handle_composition_annotation (EMACS_INT, EMACS_INT, | 871 | static inline int *handle_composition_annotation (ptrdiff_t, ptrdiff_t, |
| 872 | struct coding_system *, | 872 | struct coding_system *, |
| 873 | int *, EMACS_INT *); | 873 | int *, ptrdiff_t *); |
| 874 | static inline int *handle_charset_annotation (EMACS_INT, EMACS_INT, | 874 | static inline int *handle_charset_annotation (ptrdiff_t, ptrdiff_t, |
| 875 | struct coding_system *, | 875 | struct coding_system *, |
| 876 | int *, EMACS_INT *); | 876 | int *, ptrdiff_t *); |
| 877 | static void consume_chars (struct coding_system *, Lisp_Object, int); | 877 | static void consume_chars (struct coding_system *, Lisp_Object, int); |
| 878 | static int encode_coding (struct coding_system *); | 878 | static int encode_coding (struct coding_system *); |
| 879 | static Lisp_Object make_conversion_work_buffer (int); | 879 | static Lisp_Object make_conversion_work_buffer (int); |
| @@ -926,7 +926,7 @@ record_conversion_result (struct coding_system *coding, | |||
| 926 | if (charset_map_loaded) \ | 926 | if (charset_map_loaded) \ |
| 927 | { \ | 927 | { \ |
| 928 | const unsigned char *orig = coding->source; \ | 928 | const unsigned char *orig = coding->source; \ |
| 929 | EMACS_INT offset; \ | 929 | ptrdiff_t offset; \ |
| 930 | \ | 930 | \ |
| 931 | coding_set_source (coding); \ | 931 | coding_set_source (coding); \ |
| 932 | offset = coding->source - orig; \ | 932 | offset = coding->source - orig; \ |
| @@ -946,7 +946,7 @@ record_conversion_result (struct coding_system *coding, | |||
| 946 | do { \ | 946 | do { \ |
| 947 | if (dst + (bytes) >= dst_end) \ | 947 | if (dst + (bytes) >= dst_end) \ |
| 948 | { \ | 948 | { \ |
| 949 | EMACS_INT more_bytes = charbuf_end - charbuf + (bytes); \ | 949 | ptrdiff_t more_bytes = charbuf_end - charbuf + (bytes); \ |
| 950 | \ | 950 | \ |
| 951 | dst = alloc_destination (coding, more_bytes, dst); \ | 951 | dst = alloc_destination (coding, more_bytes, dst); \ |
| 952 | dst_end = coding->destination + coding->dst_bytes; \ | 952 | dst_end = coding->destination + coding->dst_bytes; \ |
| @@ -1069,7 +1069,7 @@ coding_set_destination (struct coding_system *coding) | |||
| 1069 | 1069 | ||
| 1070 | 1070 | ||
| 1071 | static void | 1071 | static void |
| 1072 | coding_alloc_by_realloc (struct coding_system *coding, EMACS_INT bytes) | 1072 | coding_alloc_by_realloc (struct coding_system *coding, ptrdiff_t bytes) |
| 1073 | { | 1073 | { |
| 1074 | if (STRING_BYTES_BOUND - coding->dst_bytes < bytes) | 1074 | if (STRING_BYTES_BOUND - coding->dst_bytes < bytes) |
| 1075 | string_overflow (); | 1075 | string_overflow (); |
| @@ -1080,7 +1080,7 @@ coding_alloc_by_realloc (struct coding_system *coding, EMACS_INT bytes) | |||
| 1080 | 1080 | ||
| 1081 | static void | 1081 | static void |
| 1082 | coding_alloc_by_making_gap (struct coding_system *coding, | 1082 | coding_alloc_by_making_gap (struct coding_system *coding, |
| 1083 | EMACS_INT gap_head_used, EMACS_INT bytes) | 1083 | ptrdiff_t gap_head_used, ptrdiff_t bytes) |
| 1084 | { | 1084 | { |
| 1085 | if (EQ (coding->src_object, coding->dst_object)) | 1085 | if (EQ (coding->src_object, coding->dst_object)) |
| 1086 | { | 1086 | { |
| @@ -1088,7 +1088,7 @@ coding_alloc_by_making_gap (struct coding_system *coding, | |||
| 1088 | consumed data at the tail. To preserve those data, we at | 1088 | consumed data at the tail. To preserve those data, we at |
| 1089 | first make the gap size to zero, then increase the gap | 1089 | first make the gap size to zero, then increase the gap |
| 1090 | size. */ | 1090 | size. */ |
| 1091 | EMACS_INT add = GAP_SIZE; | 1091 | ptrdiff_t add = GAP_SIZE; |
| 1092 | 1092 | ||
| 1093 | GPT += gap_head_used, GPT_BYTE += gap_head_used; | 1093 | GPT += gap_head_used, GPT_BYTE += gap_head_used; |
| 1094 | GAP_SIZE = 0; ZV += add; Z += add; ZV_BYTE += add; Z_BYTE += add; | 1094 | GAP_SIZE = 0; ZV += add; Z += add; ZV_BYTE += add; Z_BYTE += add; |
| @@ -1109,10 +1109,10 @@ coding_alloc_by_making_gap (struct coding_system *coding, | |||
| 1109 | 1109 | ||
| 1110 | 1110 | ||
| 1111 | static unsigned char * | 1111 | static unsigned char * |
| 1112 | alloc_destination (struct coding_system *coding, EMACS_INT nbytes, | 1112 | alloc_destination (struct coding_system *coding, ptrdiff_t nbytes, |
| 1113 | unsigned char *dst) | 1113 | unsigned char *dst) |
| 1114 | { | 1114 | { |
| 1115 | EMACS_INT offset = dst - coding->destination; | 1115 | ptrdiff_t offset = dst - coding->destination; |
| 1116 | 1116 | ||
| 1117 | if (BUFFERP (coding->dst_object)) | 1117 | if (BUFFERP (coding->dst_object)) |
| 1118 | { | 1118 | { |
| @@ -1213,7 +1213,7 @@ detect_coding_utf_8 (struct coding_system *coding, | |||
| 1213 | const unsigned char *src = coding->source, *src_base; | 1213 | const unsigned char *src = coding->source, *src_base; |
| 1214 | const unsigned char *src_end = coding->source + coding->src_bytes; | 1214 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 1215 | int multibytep = coding->src_multibyte; | 1215 | int multibytep = coding->src_multibyte; |
| 1216 | EMACS_INT consumed_chars = 0; | 1216 | ptrdiff_t consumed_chars = 0; |
| 1217 | int bom_found = 0; | 1217 | int bom_found = 0; |
| 1218 | int found = 0; | 1218 | int found = 0; |
| 1219 | 1219 | ||
| @@ -1298,7 +1298,7 @@ decode_coding_utf_8 (struct coding_system *coding) | |||
| 1298 | const unsigned char *src_base; | 1298 | const unsigned char *src_base; |
| 1299 | int *charbuf = coding->charbuf + coding->charbuf_used; | 1299 | int *charbuf = coding->charbuf + coding->charbuf_used; |
| 1300 | int *charbuf_end = coding->charbuf + coding->charbuf_size; | 1300 | int *charbuf_end = coding->charbuf + coding->charbuf_size; |
| 1301 | EMACS_INT consumed_chars = 0, consumed_chars_base = 0; | 1301 | ptrdiff_t consumed_chars = 0, consumed_chars_base = 0; |
| 1302 | int multibytep = coding->src_multibyte; | 1302 | int multibytep = coding->src_multibyte; |
| 1303 | enum utf_bom_type bom = CODING_UTF_8_BOM (coding); | 1303 | enum utf_bom_type bom = CODING_UTF_8_BOM (coding); |
| 1304 | int eol_dos = | 1304 | int eol_dos = |
| @@ -1449,7 +1449,7 @@ encode_coding_utf_8 (struct coding_system *coding) | |||
| 1449 | int *charbuf_end = charbuf + coding->charbuf_used; | 1449 | int *charbuf_end = charbuf + coding->charbuf_used; |
| 1450 | unsigned char *dst = coding->destination + coding->produced; | 1450 | unsigned char *dst = coding->destination + coding->produced; |
| 1451 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 1451 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 1452 | EMACS_INT produced_chars = 0; | 1452 | ptrdiff_t produced_chars = 0; |
| 1453 | int c; | 1453 | int c; |
| 1454 | 1454 | ||
| 1455 | if (CODING_UTF_8_BOM (coding) == utf_with_bom) | 1455 | if (CODING_UTF_8_BOM (coding) == utf_with_bom) |
| @@ -1607,7 +1607,7 @@ decode_coding_utf_16 (struct coding_system *coding) | |||
| 1607 | int *charbuf = coding->charbuf + coding->charbuf_used; | 1607 | int *charbuf = coding->charbuf + coding->charbuf_used; |
| 1608 | /* We may produces at most 3 chars in one loop. */ | 1608 | /* We may produces at most 3 chars in one loop. */ |
| 1609 | int *charbuf_end = coding->charbuf + coding->charbuf_size - 2; | 1609 | int *charbuf_end = coding->charbuf + coding->charbuf_size - 2; |
| 1610 | EMACS_INT consumed_chars = 0, consumed_chars_base = 0; | 1610 | ptrdiff_t consumed_chars = 0, consumed_chars_base = 0; |
| 1611 | int multibytep = coding->src_multibyte; | 1611 | int multibytep = coding->src_multibyte; |
| 1612 | enum utf_bom_type bom = CODING_UTF_16_BOM (coding); | 1612 | enum utf_bom_type bom = CODING_UTF_16_BOM (coding); |
| 1613 | enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding); | 1613 | enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding); |
| @@ -1734,7 +1734,7 @@ encode_coding_utf_16 (struct coding_system *coding) | |||
| 1734 | int safe_room = 8; | 1734 | int safe_room = 8; |
| 1735 | enum utf_bom_type bom = CODING_UTF_16_BOM (coding); | 1735 | enum utf_bom_type bom = CODING_UTF_16_BOM (coding); |
| 1736 | int big_endian = CODING_UTF_16_ENDIAN (coding) == utf_16_big_endian; | 1736 | int big_endian = CODING_UTF_16_ENDIAN (coding) == utf_16_big_endian; |
| 1737 | EMACS_INT produced_chars = 0; | 1737 | ptrdiff_t produced_chars = 0; |
| 1738 | int c; | 1738 | int c; |
| 1739 | 1739 | ||
| 1740 | if (bom != utf_without_bom) | 1740 | if (bom != utf_without_bom) |
| @@ -1868,7 +1868,7 @@ detect_coding_emacs_mule (struct coding_system *coding, | |||
| 1868 | const unsigned char *src = coding->source, *src_base; | 1868 | const unsigned char *src = coding->source, *src_base; |
| 1869 | const unsigned char *src_end = coding->source + coding->src_bytes; | 1869 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 1870 | int multibytep = coding->src_multibyte; | 1870 | int multibytep = coding->src_multibyte; |
| 1871 | EMACS_INT consumed_chars = 0; | 1871 | ptrdiff_t consumed_chars = 0; |
| 1872 | int c; | 1872 | int c; |
| 1873 | int found = 0; | 1873 | int found = 0; |
| 1874 | 1874 | ||
| @@ -2338,10 +2338,10 @@ decode_coding_emacs_mule (struct coding_system *coding) | |||
| 2338 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3) | 2338 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3) |
| 2339 | /* We can produce up to 2 characters in a loop. */ | 2339 | /* We can produce up to 2 characters in a loop. */ |
| 2340 | - 1; | 2340 | - 1; |
| 2341 | EMACS_INT consumed_chars = 0, consumed_chars_base; | 2341 | ptrdiff_t consumed_chars = 0, consumed_chars_base; |
| 2342 | int multibytep = coding->src_multibyte; | 2342 | int multibytep = coding->src_multibyte; |
| 2343 | EMACS_INT char_offset = coding->produced_char; | 2343 | ptrdiff_t char_offset = coding->produced_char; |
| 2344 | EMACS_INT last_offset = char_offset; | 2344 | ptrdiff_t last_offset = char_offset; |
| 2345 | int last_id = charset_ascii; | 2345 | int last_id = charset_ascii; |
| 2346 | int eol_dos = | 2346 | int eol_dos = |
| 2347 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 2347 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| @@ -2413,7 +2413,7 @@ decode_coding_emacs_mule (struct coding_system *coding) | |||
| 2413 | original pointer to buffer text, and fix up all related | 2413 | original pointer to buffer text, and fix up all related |
| 2414 | pointers after the call. */ | 2414 | pointers after the call. */ |
| 2415 | const unsigned char *orig = coding->source; | 2415 | const unsigned char *orig = coding->source; |
| 2416 | EMACS_INT offset; | 2416 | ptrdiff_t offset; |
| 2417 | 2417 | ||
| 2418 | c = emacs_mule_char (coding, src_base, &nbytes, &nchars, &id, | 2418 | c = emacs_mule_char (coding, src_base, &nbytes, &nchars, &id, |
| 2419 | cmp_status); | 2419 | cmp_status); |
| @@ -2594,7 +2594,7 @@ encode_coding_emacs_mule (struct coding_system *coding) | |||
| 2594 | unsigned char *dst = coding->destination + coding->produced; | 2594 | unsigned char *dst = coding->destination + coding->produced; |
| 2595 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 2595 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 2596 | int safe_room = 8; | 2596 | int safe_room = 8; |
| 2597 | EMACS_INT produced_chars = 0; | 2597 | ptrdiff_t produced_chars = 0; |
| 2598 | Lisp_Object attrs, charset_list; | 2598 | Lisp_Object attrs, charset_list; |
| 2599 | int c; | 2599 | int c; |
| 2600 | int preferred_charset_id = -1; | 2600 | int preferred_charset_id = -1; |
| @@ -2881,7 +2881,7 @@ setup_iso_safe_charsets (Lisp_Object attrs) | |||
| 2881 | Lisp_Object request; | 2881 | Lisp_Object request; |
| 2882 | Lisp_Object reg_usage; | 2882 | Lisp_Object reg_usage; |
| 2883 | Lisp_Object tail; | 2883 | Lisp_Object tail; |
| 2884 | int reg94, reg96; | 2884 | EMACS_INT reg94, reg96; |
| 2885 | int flags = XINT (AREF (attrs, coding_attr_iso_flags)); | 2885 | int flags = XINT (AREF (attrs, coding_attr_iso_flags)); |
| 2886 | int max_charset_id; | 2886 | int max_charset_id; |
| 2887 | 2887 | ||
| @@ -2952,7 +2952,7 @@ detect_coding_iso_2022 (struct coding_system *coding, | |||
| 2952 | int single_shifting = 0; | 2952 | int single_shifting = 0; |
| 2953 | int id; | 2953 | int id; |
| 2954 | int c, c1; | 2954 | int c, c1; |
| 2955 | EMACS_INT consumed_chars = 0; | 2955 | ptrdiff_t consumed_chars = 0; |
| 2956 | int i; | 2956 | int i; |
| 2957 | int rejected = 0; | 2957 | int rejected = 0; |
| 2958 | int found = 0; | 2958 | int found = 0; |
| @@ -3462,7 +3462,7 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 3462 | loop and one more charset annotation at the end. */ | 3462 | loop and one more charset annotation at the end. */ |
| 3463 | int *charbuf_end | 3463 | int *charbuf_end |
| 3464 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); | 3464 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); |
| 3465 | EMACS_INT consumed_chars = 0, consumed_chars_base; | 3465 | ptrdiff_t consumed_chars = 0, consumed_chars_base; |
| 3466 | int multibytep = coding->src_multibyte; | 3466 | int multibytep = coding->src_multibyte; |
| 3467 | /* Charsets invoked to graphic plane 0 and 1 respectively. */ | 3467 | /* Charsets invoked to graphic plane 0 and 1 respectively. */ |
| 3468 | int charset_id_0 = CODING_ISO_INVOKED_CHARSET (coding, 0); | 3468 | int charset_id_0 = CODING_ISO_INVOKED_CHARSET (coding, 0); |
| @@ -3472,8 +3472,8 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 3472 | int c; | 3472 | int c; |
| 3473 | struct composition_status *cmp_status = CODING_ISO_CMP_STATUS (coding); | 3473 | struct composition_status *cmp_status = CODING_ISO_CMP_STATUS (coding); |
| 3474 | Lisp_Object attrs = CODING_ID_ATTRS (coding->id); | 3474 | Lisp_Object attrs = CODING_ID_ATTRS (coding->id); |
| 3475 | EMACS_INT char_offset = coding->produced_char; | 3475 | ptrdiff_t char_offset = coding->produced_char; |
| 3476 | EMACS_INT last_offset = char_offset; | 3476 | ptrdiff_t last_offset = char_offset; |
| 3477 | int last_id = charset_ascii; | 3477 | int last_id = charset_ascii; |
| 3478 | int eol_dos = | 3478 | int eol_dos = |
| 3479 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 3479 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| @@ -4201,10 +4201,10 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 4201 | static unsigned char * | 4201 | static unsigned char * |
| 4202 | encode_invocation_designation (struct charset *charset, | 4202 | encode_invocation_designation (struct charset *charset, |
| 4203 | struct coding_system *coding, | 4203 | struct coding_system *coding, |
| 4204 | unsigned char *dst, EMACS_INT *p_nchars) | 4204 | unsigned char *dst, ptrdiff_t *p_nchars) |
| 4205 | { | 4205 | { |
| 4206 | int multibytep = coding->dst_multibyte; | 4206 | int multibytep = coding->dst_multibyte; |
| 4207 | EMACS_INT produced_chars = *p_nchars; | 4207 | ptrdiff_t produced_chars = *p_nchars; |
| 4208 | int reg; /* graphic register number */ | 4208 | int reg; /* graphic register number */ |
| 4209 | int id = CHARSET_ID (charset); | 4209 | int id = CHARSET_ID (charset); |
| 4210 | 4210 | ||
| @@ -4296,7 +4296,7 @@ encode_designation_at_bol (struct coding_system *coding, int *charbuf, | |||
| 4296 | /* Table of charsets to be designated to each graphic register. */ | 4296 | /* Table of charsets to be designated to each graphic register. */ |
| 4297 | int r[4]; | 4297 | int r[4]; |
| 4298 | int c, found = 0, reg; | 4298 | int c, found = 0, reg; |
| 4299 | EMACS_INT produced_chars = 0; | 4299 | ptrdiff_t produced_chars = 0; |
| 4300 | int multibytep = coding->dst_multibyte; | 4300 | int multibytep = coding->dst_multibyte; |
| 4301 | Lisp_Object attrs; | 4301 | Lisp_Object attrs; |
| 4302 | Lisp_Object charset_list; | 4302 | Lisp_Object charset_list; |
| @@ -4351,7 +4351,7 @@ encode_coding_iso_2022 (struct coding_system *coding) | |||
| 4351 | int bol_designation | 4351 | int bol_designation |
| 4352 | = (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_DESIGNATE_AT_BOL | 4352 | = (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_DESIGNATE_AT_BOL |
| 4353 | && CODING_ISO_BOL (coding)); | 4353 | && CODING_ISO_BOL (coding)); |
| 4354 | EMACS_INT produced_chars = 0; | 4354 | ptrdiff_t produced_chars = 0; |
| 4355 | Lisp_Object attrs, eol_type, charset_list; | 4355 | Lisp_Object attrs, eol_type, charset_list; |
| 4356 | int ascii_compatible; | 4356 | int ascii_compatible; |
| 4357 | int c; | 4357 | int c; |
| @@ -4539,7 +4539,7 @@ detect_coding_sjis (struct coding_system *coding, | |||
| 4539 | const unsigned char *src = coding->source, *src_base; | 4539 | const unsigned char *src = coding->source, *src_base; |
| 4540 | const unsigned char *src_end = coding->source + coding->src_bytes; | 4540 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 4541 | int multibytep = coding->src_multibyte; | 4541 | int multibytep = coding->src_multibyte; |
| 4542 | EMACS_INT consumed_chars = 0; | 4542 | ptrdiff_t consumed_chars = 0; |
| 4543 | int found = 0; | 4543 | int found = 0; |
| 4544 | int c; | 4544 | int c; |
| 4545 | Lisp_Object attrs, charset_list; | 4545 | Lisp_Object attrs, charset_list; |
| @@ -4596,7 +4596,7 @@ detect_coding_big5 (struct coding_system *coding, | |||
| 4596 | const unsigned char *src = coding->source, *src_base; | 4596 | const unsigned char *src = coding->source, *src_base; |
| 4597 | const unsigned char *src_end = coding->source + coding->src_bytes; | 4597 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 4598 | int multibytep = coding->src_multibyte; | 4598 | int multibytep = coding->src_multibyte; |
| 4599 | EMACS_INT consumed_chars = 0; | 4599 | ptrdiff_t consumed_chars = 0; |
| 4600 | int found = 0; | 4600 | int found = 0; |
| 4601 | int c; | 4601 | int c; |
| 4602 | 4602 | ||
| @@ -4647,13 +4647,13 @@ decode_coding_sjis (struct coding_system *coding) | |||
| 4647 | the end. */ | 4647 | the end. */ |
| 4648 | int *charbuf_end | 4648 | int *charbuf_end |
| 4649 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); | 4649 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); |
| 4650 | EMACS_INT consumed_chars = 0, consumed_chars_base; | 4650 | ptrdiff_t consumed_chars = 0, consumed_chars_base; |
| 4651 | int multibytep = coding->src_multibyte; | 4651 | int multibytep = coding->src_multibyte; |
| 4652 | struct charset *charset_roman, *charset_kanji, *charset_kana; | 4652 | struct charset *charset_roman, *charset_kanji, *charset_kana; |
| 4653 | struct charset *charset_kanji2; | 4653 | struct charset *charset_kanji2; |
| 4654 | Lisp_Object attrs, charset_list, val; | 4654 | Lisp_Object attrs, charset_list, val; |
| 4655 | EMACS_INT char_offset = coding->produced_char; | 4655 | ptrdiff_t char_offset = coding->produced_char; |
| 4656 | EMACS_INT last_offset = char_offset; | 4656 | ptrdiff_t last_offset = char_offset; |
| 4657 | int last_id = charset_ascii; | 4657 | int last_id = charset_ascii; |
| 4658 | int eol_dos = | 4658 | int eol_dos = |
| 4659 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 4659 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| @@ -4765,12 +4765,12 @@ decode_coding_big5 (struct coding_system *coding) | |||
| 4765 | the end. */ | 4765 | the end. */ |
| 4766 | int *charbuf_end | 4766 | int *charbuf_end |
| 4767 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); | 4767 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); |
| 4768 | EMACS_INT consumed_chars = 0, consumed_chars_base; | 4768 | ptrdiff_t consumed_chars = 0, consumed_chars_base; |
| 4769 | int multibytep = coding->src_multibyte; | 4769 | int multibytep = coding->src_multibyte; |
| 4770 | struct charset *charset_roman, *charset_big5; | 4770 | struct charset *charset_roman, *charset_big5; |
| 4771 | Lisp_Object attrs, charset_list, val; | 4771 | Lisp_Object attrs, charset_list, val; |
| 4772 | EMACS_INT char_offset = coding->produced_char; | 4772 | ptrdiff_t char_offset = coding->produced_char; |
| 4773 | EMACS_INT last_offset = char_offset; | 4773 | ptrdiff_t last_offset = char_offset; |
| 4774 | int last_id = charset_ascii; | 4774 | int last_id = charset_ascii; |
| 4775 | int eol_dos = | 4775 | int eol_dos = |
| 4776 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 4776 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| @@ -4867,7 +4867,7 @@ encode_coding_sjis (struct coding_system *coding) | |||
| 4867 | unsigned char *dst = coding->destination + coding->produced; | 4867 | unsigned char *dst = coding->destination + coding->produced; |
| 4868 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 4868 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 4869 | int safe_room = 4; | 4869 | int safe_room = 4; |
| 4870 | EMACS_INT produced_chars = 0; | 4870 | ptrdiff_t produced_chars = 0; |
| 4871 | Lisp_Object attrs, charset_list, val; | 4871 | Lisp_Object attrs, charset_list, val; |
| 4872 | int ascii_compatible; | 4872 | int ascii_compatible; |
| 4873 | struct charset *charset_kanji, *charset_kana; | 4873 | struct charset *charset_kanji, *charset_kana; |
| @@ -4958,7 +4958,7 @@ encode_coding_big5 (struct coding_system *coding) | |||
| 4958 | unsigned char *dst = coding->destination + coding->produced; | 4958 | unsigned char *dst = coding->destination + coding->produced; |
| 4959 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 4959 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 4960 | int safe_room = 4; | 4960 | int safe_room = 4; |
| 4961 | EMACS_INT produced_chars = 0; | 4961 | ptrdiff_t produced_chars = 0; |
| 4962 | Lisp_Object attrs, charset_list, val; | 4962 | Lisp_Object attrs, charset_list, val; |
| 4963 | int ascii_compatible; | 4963 | int ascii_compatible; |
| 4964 | struct charset *charset_big5; | 4964 | struct charset *charset_big5; |
| @@ -5033,10 +5033,10 @@ detect_coding_ccl (struct coding_system *coding, | |||
| 5033 | const unsigned char *src = coding->source, *src_base; | 5033 | const unsigned char *src = coding->source, *src_base; |
| 5034 | const unsigned char *src_end = coding->source + coding->src_bytes; | 5034 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 5035 | int multibytep = coding->src_multibyte; | 5035 | int multibytep = coding->src_multibyte; |
| 5036 | EMACS_INT consumed_chars = 0; | 5036 | ptrdiff_t consumed_chars = 0; |
| 5037 | int found = 0; | 5037 | int found = 0; |
| 5038 | unsigned char *valids; | 5038 | unsigned char *valids; |
| 5039 | EMACS_INT head_ascii = coding->head_ascii; | 5039 | ptrdiff_t head_ascii = coding->head_ascii; |
| 5040 | Lisp_Object attrs; | 5040 | Lisp_Object attrs; |
| 5041 | 5041 | ||
| 5042 | detect_info->checked |= CATEGORY_MASK_CCL; | 5042 | detect_info->checked |= CATEGORY_MASK_CCL; |
| @@ -5073,7 +5073,7 @@ decode_coding_ccl (struct coding_system *coding) | |||
| 5073 | const unsigned char *src_end = coding->source + coding->src_bytes; | 5073 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 5074 | int *charbuf = coding->charbuf + coding->charbuf_used; | 5074 | int *charbuf = coding->charbuf + coding->charbuf_used; |
| 5075 | int *charbuf_end = coding->charbuf + coding->charbuf_size; | 5075 | int *charbuf_end = coding->charbuf + coding->charbuf_size; |
| 5076 | EMACS_INT consumed_chars = 0; | 5076 | ptrdiff_t consumed_chars = 0; |
| 5077 | int multibytep = coding->src_multibyte; | 5077 | int multibytep = coding->src_multibyte; |
| 5078 | struct ccl_program *ccl = &coding->spec.ccl->ccl; | 5078 | struct ccl_program *ccl = &coding->spec.ccl->ccl; |
| 5079 | int source_charbuf[1024]; | 5079 | int source_charbuf[1024]; |
| @@ -5145,7 +5145,7 @@ encode_coding_ccl (struct coding_system *coding) | |||
| 5145 | unsigned char *dst = coding->destination + coding->produced; | 5145 | unsigned char *dst = coding->destination + coding->produced; |
| 5146 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 5146 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 5147 | int destination_charbuf[1024]; | 5147 | int destination_charbuf[1024]; |
| 5148 | EMACS_INT produced_chars = 0; | 5148 | ptrdiff_t produced_chars = 0; |
| 5149 | int i; | 5149 | int i; |
| 5150 | Lisp_Object attrs, charset_list; | 5150 | Lisp_Object attrs, charset_list; |
| 5151 | 5151 | ||
| @@ -5232,7 +5232,7 @@ encode_coding_raw_text (struct coding_system *coding) | |||
| 5232 | int *charbuf_end = coding->charbuf + coding->charbuf_used; | 5232 | int *charbuf_end = coding->charbuf + coding->charbuf_used; |
| 5233 | unsigned char *dst = coding->destination + coding->produced; | 5233 | unsigned char *dst = coding->destination + coding->produced; |
| 5234 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 5234 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 5235 | EMACS_INT produced_chars = 0; | 5235 | ptrdiff_t produced_chars = 0; |
| 5236 | int c; | 5236 | int c; |
| 5237 | 5237 | ||
| 5238 | if (multibytep) | 5238 | if (multibytep) |
| @@ -5315,10 +5315,10 @@ detect_coding_charset (struct coding_system *coding, | |||
| 5315 | const unsigned char *src = coding->source, *src_base; | 5315 | const unsigned char *src = coding->source, *src_base; |
| 5316 | const unsigned char *src_end = coding->source + coding->src_bytes; | 5316 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 5317 | int multibytep = coding->src_multibyte; | 5317 | int multibytep = coding->src_multibyte; |
| 5318 | EMACS_INT consumed_chars = 0; | 5318 | ptrdiff_t consumed_chars = 0; |
| 5319 | Lisp_Object attrs, valids, name; | 5319 | Lisp_Object attrs, valids, name; |
| 5320 | int found = 0; | 5320 | int found = 0; |
| 5321 | EMACS_INT head_ascii = coding->head_ascii; | 5321 | ptrdiff_t head_ascii = coding->head_ascii; |
| 5322 | int check_latin_extra = 0; | 5322 | int check_latin_extra = 0; |
| 5323 | 5323 | ||
| 5324 | detect_info->checked |= CATEGORY_MASK_CHARSET; | 5324 | detect_info->checked |= CATEGORY_MASK_CHARSET; |
| @@ -5422,12 +5422,12 @@ decode_coding_charset (struct coding_system *coding) | |||
| 5422 | the end. */ | 5422 | the end. */ |
| 5423 | int *charbuf_end | 5423 | int *charbuf_end |
| 5424 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); | 5424 | = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); |
| 5425 | EMACS_INT consumed_chars = 0, consumed_chars_base; | 5425 | ptrdiff_t consumed_chars = 0, consumed_chars_base; |
| 5426 | int multibytep = coding->src_multibyte; | 5426 | int multibytep = coding->src_multibyte; |
| 5427 | Lisp_Object attrs = CODING_ID_ATTRS (coding->id); | 5427 | Lisp_Object attrs = CODING_ID_ATTRS (coding->id); |
| 5428 | Lisp_Object valids; | 5428 | Lisp_Object valids; |
| 5429 | EMACS_INT char_offset = coding->produced_char; | 5429 | ptrdiff_t char_offset = coding->produced_char; |
| 5430 | EMACS_INT last_offset = char_offset; | 5430 | ptrdiff_t last_offset = char_offset; |
| 5431 | int last_id = charset_ascii; | 5431 | int last_id = charset_ascii; |
| 5432 | int eol_dos = | 5432 | int eol_dos = |
| 5433 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); | 5433 | !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); |
| @@ -5548,7 +5548,7 @@ encode_coding_charset (struct coding_system *coding) | |||
| 5548 | unsigned char *dst = coding->destination + coding->produced; | 5548 | unsigned char *dst = coding->destination + coding->produced; |
| 5549 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 5549 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 5550 | int safe_room = MAX_MULTIBYTE_LENGTH; | 5550 | int safe_room = MAX_MULTIBYTE_LENGTH; |
| 5551 | EMACS_INT produced_chars = 0; | 5551 | ptrdiff_t produced_chars = 0; |
| 5552 | Lisp_Object attrs, charset_list; | 5552 | Lisp_Object attrs, charset_list; |
| 5553 | int ascii_compatible; | 5553 | int ascii_compatible; |
| 5554 | int c; | 5554 | int c; |
| @@ -6095,7 +6095,7 @@ complement_process_encoding_system (Lisp_Object coding_system) | |||
| 6095 | #define MAX_EOL_CHECK_COUNT 3 | 6095 | #define MAX_EOL_CHECK_COUNT 3 |
| 6096 | 6096 | ||
| 6097 | static int | 6097 | static int |
| 6098 | detect_eol (const unsigned char *source, EMACS_INT src_bytes, | 6098 | detect_eol (const unsigned char *source, ptrdiff_t src_bytes, |
| 6099 | enum coding_category category) | 6099 | enum coding_category category) |
| 6100 | { | 6100 | { |
| 6101 | const unsigned char *src = source, *src_end = src + src_bytes; | 6101 | const unsigned char *src = source, *src_end = src + src_bytes; |
| @@ -6456,7 +6456,7 @@ decode_eol (struct coding_system *coding) | |||
| 6456 | } | 6456 | } |
| 6457 | else if (EQ (eol_type, Qdos)) | 6457 | else if (EQ (eol_type, Qdos)) |
| 6458 | { | 6458 | { |
| 6459 | EMACS_INT n = 0; | 6459 | ptrdiff_t n = 0; |
| 6460 | 6460 | ||
| 6461 | if (NILP (coding->dst_object)) | 6461 | if (NILP (coding->dst_object)) |
| 6462 | { | 6462 | { |
| @@ -6471,9 +6471,9 @@ decode_eol (struct coding_system *coding) | |||
| 6471 | } | 6471 | } |
| 6472 | else | 6472 | else |
| 6473 | { | 6473 | { |
| 6474 | EMACS_INT pos_byte = coding->dst_pos_byte; | 6474 | ptrdiff_t pos_byte = coding->dst_pos_byte; |
| 6475 | EMACS_INT pos = coding->dst_pos; | 6475 | ptrdiff_t pos = coding->dst_pos; |
| 6476 | EMACS_INT pos_end = pos + coding->produced_char - 1; | 6476 | ptrdiff_t pos_end = pos + coding->produced_char - 1; |
| 6477 | 6477 | ||
| 6478 | while (pos < pos_end) | 6478 | while (pos < pos_end) |
| 6479 | { | 6479 | { |
| @@ -6636,8 +6636,8 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 6636 | { | 6636 | { |
| 6637 | unsigned char *dst = coding->destination + coding->produced; | 6637 | unsigned char *dst = coding->destination + coding->produced; |
| 6638 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 6638 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 6639 | EMACS_INT produced; | 6639 | ptrdiff_t produced; |
| 6640 | EMACS_INT produced_chars = 0; | 6640 | ptrdiff_t produced_chars = 0; |
| 6641 | int carryover = 0; | 6641 | int carryover = 0; |
| 6642 | 6642 | ||
| 6643 | if (! coding->chars_at_source) | 6643 | if (! coding->chars_at_source) |
| @@ -6658,7 +6658,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 6658 | 6658 | ||
| 6659 | if (c >= 0) | 6659 | if (c >= 0) |
| 6660 | { | 6660 | { |
| 6661 | EMACS_INT from_nchars = 1, to_nchars = 1; | 6661 | ptrdiff_t from_nchars = 1, to_nchars = 1; |
| 6662 | Lisp_Object trans = Qnil; | 6662 | Lisp_Object trans = Qnil; |
| 6663 | 6663 | ||
| 6664 | LOOKUP_TRANSLATION_TABLE (translation_table, c, trans); | 6664 | LOOKUP_TRANSLATION_TABLE (translation_table, c, trans); |
| @@ -6735,7 +6735,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 6735 | if (coding->src_multibyte) | 6735 | if (coding->src_multibyte) |
| 6736 | { | 6736 | { |
| 6737 | int multibytep = 1; | 6737 | int multibytep = 1; |
| 6738 | EMACS_INT consumed_chars = 0; | 6738 | ptrdiff_t consumed_chars = 0; |
| 6739 | 6739 | ||
| 6740 | while (1) | 6740 | while (1) |
| 6741 | { | 6741 | { |
| @@ -6749,7 +6749,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 6749 | dst_end = (unsigned char *) src; | 6749 | dst_end = (unsigned char *) src; |
| 6750 | if (dst == dst_end) | 6750 | if (dst == dst_end) |
| 6751 | { | 6751 | { |
| 6752 | EMACS_INT offset = src - coding->source; | 6752 | ptrdiff_t offset = src - coding->source; |
| 6753 | 6753 | ||
| 6754 | dst = alloc_destination (coding, src_end - src + 1, | 6754 | dst = alloc_destination (coding, src_end - src + 1, |
| 6755 | dst); | 6755 | dst); |
| @@ -6779,8 +6779,8 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 6779 | dst_end = (unsigned char *) src; | 6779 | dst_end = (unsigned char *) src; |
| 6780 | if (dst >= dst_end - 1) | 6780 | if (dst >= dst_end - 1) |
| 6781 | { | 6781 | { |
| 6782 | EMACS_INT offset = src - coding->source; | 6782 | ptrdiff_t offset = src - coding->source; |
| 6783 | EMACS_INT more_bytes; | 6783 | ptrdiff_t more_bytes; |
| 6784 | 6784 | ||
| 6785 | if (EQ (coding->src_object, coding->dst_object)) | 6785 | if (EQ (coding->src_object, coding->dst_object)) |
| 6786 | more_bytes = ((src_end - src) / 2) + 2; | 6786 | more_bytes = ((src_end - src) / 2) + 2; |
| @@ -6802,11 +6802,11 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 6802 | { | 6802 | { |
| 6803 | if (!EQ (coding->src_object, coding->dst_object)) | 6803 | if (!EQ (coding->src_object, coding->dst_object)) |
| 6804 | { | 6804 | { |
| 6805 | EMACS_INT require = coding->src_bytes - coding->dst_bytes; | 6805 | ptrdiff_t require = coding->src_bytes - coding->dst_bytes; |
| 6806 | 6806 | ||
| 6807 | if (require > 0) | 6807 | if (require > 0) |
| 6808 | { | 6808 | { |
| 6809 | EMACS_INT offset = src - coding->source; | 6809 | ptrdiff_t offset = src - coding->source; |
| 6810 | 6810 | ||
| 6811 | dst = alloc_destination (coding, require, dst); | 6811 | dst = alloc_destination (coding, require, dst); |
| 6812 | coding_set_source (coding); | 6812 | coding_set_source (coding); |
| @@ -6834,10 +6834,10 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 6834 | */ | 6834 | */ |
| 6835 | 6835 | ||
| 6836 | static inline void | 6836 | static inline void |
| 6837 | produce_composition (struct coding_system *coding, int *charbuf, EMACS_INT pos) | 6837 | produce_composition (struct coding_system *coding, int *charbuf, ptrdiff_t pos) |
| 6838 | { | 6838 | { |
| 6839 | int len; | 6839 | int len; |
| 6840 | EMACS_INT to; | 6840 | ptrdiff_t to; |
| 6841 | enum composition_method method; | 6841 | enum composition_method method; |
| 6842 | Lisp_Object components; | 6842 | Lisp_Object components; |
| 6843 | 6843 | ||
| @@ -6878,9 +6878,9 @@ produce_composition (struct coding_system *coding, int *charbuf, EMACS_INT pos) | |||
| 6878 | */ | 6878 | */ |
| 6879 | 6879 | ||
| 6880 | static inline void | 6880 | static inline void |
| 6881 | produce_charset (struct coding_system *coding, int *charbuf, EMACS_INT pos) | 6881 | produce_charset (struct coding_system *coding, int *charbuf, ptrdiff_t pos) |
| 6882 | { | 6882 | { |
| 6883 | EMACS_INT from = pos - charbuf[2]; | 6883 | ptrdiff_t from = pos - charbuf[2]; |
| 6884 | struct charset *charset = CHARSET_FROM_ID (charbuf[3]); | 6884 | struct charset *charset = CHARSET_FROM_ID (charbuf[3]); |
| 6885 | 6885 | ||
| 6886 | Fput_text_property (make_number (from), make_number (pos), | 6886 | Fput_text_property (make_number (from), make_number (pos), |
| @@ -6913,7 +6913,7 @@ produce_charset (struct coding_system *coding, int *charbuf, EMACS_INT pos) | |||
| 6913 | 6913 | ||
| 6914 | 6914 | ||
| 6915 | static void | 6915 | static void |
| 6916 | produce_annotation (struct coding_system *coding, EMACS_INT pos) | 6916 | produce_annotation (struct coding_system *coding, ptrdiff_t pos) |
| 6917 | { | 6917 | { |
| 6918 | int *charbuf = coding->charbuf; | 6918 | int *charbuf = coding->charbuf; |
| 6919 | int *charbuf_end = charbuf + coding->charbuf_used; | 6919 | int *charbuf_end = charbuf + coding->charbuf_used; |
| @@ -7013,7 +7013,7 @@ decode_coding (struct coding_system *coding) | |||
| 7013 | } | 7013 | } |
| 7014 | do | 7014 | do |
| 7015 | { | 7015 | { |
| 7016 | EMACS_INT pos = coding->dst_pos + coding->produced_char; | 7016 | ptrdiff_t pos = coding->dst_pos + coding->produced_char; |
| 7017 | 7017 | ||
| 7018 | coding_set_source (coding); | 7018 | coding_set_source (coding); |
| 7019 | coding->annotated = 0; | 7019 | coding->annotated = 0; |
| @@ -7106,11 +7106,11 @@ decode_coding (struct coding_system *coding) | |||
| 7106 | return BUF. */ | 7106 | return BUF. */ |
| 7107 | 7107 | ||
| 7108 | static inline int * | 7108 | static inline int * |
| 7109 | handle_composition_annotation (EMACS_INT pos, EMACS_INT limit, | 7109 | handle_composition_annotation (ptrdiff_t pos, ptrdiff_t limit, |
| 7110 | struct coding_system *coding, int *buf, | 7110 | struct coding_system *coding, int *buf, |
| 7111 | EMACS_INT *stop) | 7111 | ptrdiff_t *stop) |
| 7112 | { | 7112 | { |
| 7113 | EMACS_INT start, end; | 7113 | ptrdiff_t start, end; |
| 7114 | Lisp_Object prop; | 7114 | Lisp_Object prop; |
| 7115 | 7115 | ||
| 7116 | if (! find_composition (pos, limit, &start, &end, &prop, coding->src_object) | 7116 | if (! find_composition (pos, limit, &start, &end, &prop, coding->src_object) |
| @@ -7189,9 +7189,9 @@ handle_composition_annotation (EMACS_INT pos, EMACS_INT limit, | |||
| 7189 | property value is non-nil (limiting by LIMIT), and return BUF. */ | 7189 | property value is non-nil (limiting by LIMIT), and return BUF. */ |
| 7190 | 7190 | ||
| 7191 | static inline int * | 7191 | static inline int * |
| 7192 | handle_charset_annotation (EMACS_INT pos, EMACS_INT limit, | 7192 | handle_charset_annotation (ptrdiff_t pos, ptrdiff_t limit, |
| 7193 | struct coding_system *coding, int *buf, | 7193 | struct coding_system *coding, int *buf, |
| 7194 | EMACS_INT *stop) | 7194 | ptrdiff_t *stop) |
| 7195 | { | 7195 | { |
| 7196 | Lisp_Object val, next; | 7196 | Lisp_Object val, next; |
| 7197 | int id; | 7197 | int id; |
| @@ -7218,12 +7218,12 @@ consume_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 7218 | int *buf_end = coding->charbuf + coding->charbuf_size; | 7218 | int *buf_end = coding->charbuf + coding->charbuf_size; |
| 7219 | const unsigned char *src = coding->source + coding->consumed; | 7219 | const unsigned char *src = coding->source + coding->consumed; |
| 7220 | const unsigned char *src_end = coding->source + coding->src_bytes; | 7220 | const unsigned char *src_end = coding->source + coding->src_bytes; |
| 7221 | EMACS_INT pos = coding->src_pos + coding->consumed_char; | 7221 | ptrdiff_t pos = coding->src_pos + coding->consumed_char; |
| 7222 | EMACS_INT end_pos = coding->src_pos + coding->src_chars; | 7222 | ptrdiff_t end_pos = coding->src_pos + coding->src_chars; |
| 7223 | int multibytep = coding->src_multibyte; | 7223 | int multibytep = coding->src_multibyte; |
| 7224 | Lisp_Object eol_type; | 7224 | Lisp_Object eol_type; |
| 7225 | int c; | 7225 | int c; |
| 7226 | EMACS_INT stop, stop_composition, stop_charset; | 7226 | ptrdiff_t stop, stop_composition, stop_charset; |
| 7227 | int *lookup_buf = NULL; | 7227 | int *lookup_buf = NULL; |
| 7228 | 7228 | ||
| 7229 | if (! NILP (translation_table)) | 7229 | if (! NILP (translation_table)) |
| @@ -7272,7 +7272,7 @@ consume_chars (struct coding_system *coding, Lisp_Object translation_table, | |||
| 7272 | 7272 | ||
| 7273 | if (! multibytep) | 7273 | if (! multibytep) |
| 7274 | { | 7274 | { |
| 7275 | EMACS_INT bytes; | 7275 | int bytes; |
| 7276 | 7276 | ||
| 7277 | if (coding->encoder == encode_coding_raw_text | 7277 | if (coding->encoder == encode_coding_raw_text |
| 7278 | || coding->encoder == encode_coding_ccl) | 7278 | || coding->encoder == encode_coding_ccl) |
| @@ -7498,9 +7498,9 @@ code_conversion_save (int with_work_buf, int multibyte) | |||
| 7498 | 7498 | ||
| 7499 | int | 7499 | int |
| 7500 | decode_coding_gap (struct coding_system *coding, | 7500 | decode_coding_gap (struct coding_system *coding, |
| 7501 | EMACS_INT chars, EMACS_INT bytes) | 7501 | ptrdiff_t chars, ptrdiff_t bytes) |
| 7502 | { | 7502 | { |
| 7503 | int count = SPECPDL_INDEX (); | 7503 | ptrdiff_t count = SPECPDL_INDEX (); |
| 7504 | Lisp_Object attrs; | 7504 | Lisp_Object attrs; |
| 7505 | 7505 | ||
| 7506 | code_conversion_save (0, 0); | 7506 | code_conversion_save (0, 0); |
| @@ -7527,7 +7527,7 @@ decode_coding_gap (struct coding_system *coding, | |||
| 7527 | attrs = CODING_ID_ATTRS (coding->id); | 7527 | attrs = CODING_ID_ATTRS (coding->id); |
| 7528 | if (! NILP (CODING_ATTR_POST_READ (attrs))) | 7528 | if (! NILP (CODING_ATTR_POST_READ (attrs))) |
| 7529 | { | 7529 | { |
| 7530 | EMACS_INT prev_Z = Z, prev_Z_BYTE = Z_BYTE; | 7530 | ptrdiff_t prev_Z = Z, prev_Z_BYTE = Z_BYTE; |
| 7531 | Lisp_Object val; | 7531 | Lisp_Object val; |
| 7532 | 7532 | ||
| 7533 | TEMP_SET_PT_BOTH (coding->dst_pos, coding->dst_pos_byte); | 7533 | TEMP_SET_PT_BOTH (coding->dst_pos, coding->dst_pos_byte); |
| @@ -7575,15 +7575,15 @@ decode_coding_gap (struct coding_system *coding, | |||
| 7575 | void | 7575 | void |
| 7576 | decode_coding_object (struct coding_system *coding, | 7576 | decode_coding_object (struct coding_system *coding, |
| 7577 | Lisp_Object src_object, | 7577 | Lisp_Object src_object, |
| 7578 | EMACS_INT from, EMACS_INT from_byte, | 7578 | ptrdiff_t from, ptrdiff_t from_byte, |
| 7579 | EMACS_INT to, EMACS_INT to_byte, | 7579 | ptrdiff_t to, ptrdiff_t to_byte, |
| 7580 | Lisp_Object dst_object) | 7580 | Lisp_Object dst_object) |
| 7581 | { | 7581 | { |
| 7582 | int count = SPECPDL_INDEX (); | 7582 | ptrdiff_t count = SPECPDL_INDEX (); |
| 7583 | unsigned char *destination IF_LINT (= NULL); | 7583 | unsigned char *destination IF_LINT (= NULL); |
| 7584 | EMACS_INT dst_bytes IF_LINT (= 0); | 7584 | ptrdiff_t dst_bytes IF_LINT (= 0); |
| 7585 | EMACS_INT chars = to - from; | 7585 | ptrdiff_t chars = to - from; |
| 7586 | EMACS_INT bytes = to_byte - from_byte; | 7586 | ptrdiff_t bytes = to_byte - from_byte; |
| 7587 | Lisp_Object attrs; | 7587 | Lisp_Object attrs; |
| 7588 | int saved_pt = -1, saved_pt_byte IF_LINT (= 0); | 7588 | int saved_pt = -1, saved_pt_byte IF_LINT (= 0); |
| 7589 | int need_marker_adjustment = 0; | 7589 | int need_marker_adjustment = 0; |
| @@ -7676,7 +7676,7 @@ decode_coding_object (struct coding_system *coding, | |||
| 7676 | if (! NILP (CODING_ATTR_POST_READ (attrs))) | 7676 | if (! NILP (CODING_ATTR_POST_READ (attrs))) |
| 7677 | { | 7677 | { |
| 7678 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; | 7678 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
| 7679 | EMACS_INT prev_Z = Z, prev_Z_BYTE = Z_BYTE; | 7679 | ptrdiff_t prev_Z = Z, prev_Z_BYTE = Z_BYTE; |
| 7680 | Lisp_Object val; | 7680 | Lisp_Object val; |
| 7681 | 7681 | ||
| 7682 | TEMP_SET_PT_BOTH (coding->dst_pos, coding->dst_pos_byte); | 7682 | TEMP_SET_PT_BOTH (coding->dst_pos, coding->dst_pos_byte); |
| @@ -7765,13 +7765,13 @@ decode_coding_object (struct coding_system *coding, | |||
| 7765 | void | 7765 | void |
| 7766 | encode_coding_object (struct coding_system *coding, | 7766 | encode_coding_object (struct coding_system *coding, |
| 7767 | Lisp_Object src_object, | 7767 | Lisp_Object src_object, |
| 7768 | EMACS_INT from, EMACS_INT from_byte, | 7768 | ptrdiff_t from, ptrdiff_t from_byte, |
| 7769 | EMACS_INT to, EMACS_INT to_byte, | 7769 | ptrdiff_t to, ptrdiff_t to_byte, |
| 7770 | Lisp_Object dst_object) | 7770 | Lisp_Object dst_object) |
| 7771 | { | 7771 | { |
| 7772 | int count = SPECPDL_INDEX (); | 7772 | ptrdiff_t count = SPECPDL_INDEX (); |
| 7773 | EMACS_INT chars = to - from; | 7773 | ptrdiff_t chars = to - from; |
| 7774 | EMACS_INT bytes = to_byte - from_byte; | 7774 | ptrdiff_t bytes = to_byte - from_byte; |
| 7775 | Lisp_Object attrs; | 7775 | Lisp_Object attrs; |
| 7776 | int saved_pt = -1, saved_pt_byte IF_LINT (= 0); | 7776 | int saved_pt = -1, saved_pt_byte IF_LINT (= 0); |
| 7777 | int need_marker_adjustment = 0; | 7777 | int need_marker_adjustment = 0; |
| @@ -8019,7 +8019,7 @@ are lower-case). */) | |||
| 8019 | (Lisp_Object prompt, Lisp_Object default_coding_system) | 8019 | (Lisp_Object prompt, Lisp_Object default_coding_system) |
| 8020 | { | 8020 | { |
| 8021 | Lisp_Object val; | 8021 | Lisp_Object val; |
| 8022 | int count = SPECPDL_INDEX (); | 8022 | ptrdiff_t count = SPECPDL_INDEX (); |
| 8023 | 8023 | ||
| 8024 | if (SYMBOLP (default_coding_system)) | 8024 | if (SYMBOLP (default_coding_system)) |
| 8025 | default_coding_system = SYMBOL_NAME (default_coding_system); | 8025 | default_coding_system = SYMBOL_NAME (default_coding_system); |
| @@ -8071,7 +8071,7 @@ function `define-coding-system'. */) | |||
| 8071 | 8071 | ||
| 8072 | Lisp_Object | 8072 | Lisp_Object |
| 8073 | detect_coding_system (const unsigned char *src, | 8073 | detect_coding_system (const unsigned char *src, |
| 8074 | EMACS_INT src_chars, EMACS_INT src_bytes, | 8074 | ptrdiff_t src_chars, ptrdiff_t src_bytes, |
| 8075 | int highest, int multibytep, | 8075 | int highest, int multibytep, |
| 8076 | Lisp_Object coding_system) | 8076 | Lisp_Object coding_system) |
| 8077 | { | 8077 | { |
| @@ -8391,8 +8391,8 @@ If optional argument HIGHEST is non-nil, return the coding system of | |||
| 8391 | highest priority. */) | 8391 | highest priority. */) |
| 8392 | (Lisp_Object start, Lisp_Object end, Lisp_Object highest) | 8392 | (Lisp_Object start, Lisp_Object end, Lisp_Object highest) |
| 8393 | { | 8393 | { |
| 8394 | int from, to; | 8394 | ptrdiff_t from, to; |
| 8395 | int from_byte, to_byte; | 8395 | ptrdiff_t from_byte, to_byte; |
| 8396 | 8396 | ||
| 8397 | CHECK_NUMBER_COERCE_MARKER (start); | 8397 | CHECK_NUMBER_COERCE_MARKER (start); |
| 8398 | CHECK_NUMBER_COERCE_MARKER (end); | 8398 | CHECK_NUMBER_COERCE_MARKER (end); |
| @@ -8472,7 +8472,7 @@ DEFUN ("find-coding-systems-region-internal", | |||
| 8472 | (Lisp_Object start, Lisp_Object end, Lisp_Object exclude) | 8472 | (Lisp_Object start, Lisp_Object end, Lisp_Object exclude) |
| 8473 | { | 8473 | { |
| 8474 | Lisp_Object coding_attrs_list, safe_codings; | 8474 | Lisp_Object coding_attrs_list, safe_codings; |
| 8475 | EMACS_INT start_byte, end_byte; | 8475 | ptrdiff_t start_byte, end_byte; |
| 8476 | const unsigned char *p, *pbeg, *pend; | 8476 | const unsigned char *p, *pbeg, *pend; |
| 8477 | int c; | 8477 | int c; |
| 8478 | Lisp_Object tail, elt, work_table; | 8478 | Lisp_Object tail, elt, work_table; |
| @@ -8566,7 +8566,7 @@ DEFUN ("find-coding-systems-region-internal", | |||
| 8566 | } | 8566 | } |
| 8567 | if (charset_map_loaded) | 8567 | if (charset_map_loaded) |
| 8568 | { | 8568 | { |
| 8569 | EMACS_INT p_offset = p - pbeg, pend_offset = pend - pbeg; | 8569 | ptrdiff_t p_offset = p - pbeg, pend_offset = pend - pbeg; |
| 8570 | 8570 | ||
| 8571 | if (STRINGP (start)) | 8571 | if (STRINGP (start)) |
| 8572 | pbeg = SDATA (start); | 8572 | pbeg = SDATA (start); |
| @@ -8604,11 +8604,11 @@ for un-encodable characters. In that case, START and END are indexes | |||
| 8604 | to the string. */) | 8604 | to the string. */) |
| 8605 | (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object count, Lisp_Object string) | 8605 | (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object count, Lisp_Object string) |
| 8606 | { | 8606 | { |
| 8607 | int n; | 8607 | EMACS_INT n; |
| 8608 | struct coding_system coding; | 8608 | struct coding_system coding; |
| 8609 | Lisp_Object attrs, charset_list, translation_table; | 8609 | Lisp_Object attrs, charset_list, translation_table; |
| 8610 | Lisp_Object positions; | 8610 | Lisp_Object positions; |
| 8611 | int from, to; | 8611 | ptrdiff_t from, to; |
| 8612 | const unsigned char *p, *stop, *pend; | 8612 | const unsigned char *p, *stop, *pend; |
| 8613 | int ascii_compatible; | 8613 | int ascii_compatible; |
| 8614 | 8614 | ||
| @@ -8641,11 +8641,10 @@ to the string. */) | |||
| 8641 | CHECK_STRING (string); | 8641 | CHECK_STRING (string); |
| 8642 | CHECK_NATNUM (start); | 8642 | CHECK_NATNUM (start); |
| 8643 | CHECK_NATNUM (end); | 8643 | CHECK_NATNUM (end); |
| 8644 | if (! (XINT (start) <= XINT (end) && XINT (end) <= SCHARS (string))) | ||
| 8645 | args_out_of_range_3 (string, start, end); | ||
| 8644 | from = XINT (start); | 8646 | from = XINT (start); |
| 8645 | to = XINT (end); | 8647 | to = XINT (end); |
| 8646 | if (from > to | ||
| 8647 | || to > SCHARS (string)) | ||
| 8648 | args_out_of_range_3 (string, start, end); | ||
| 8649 | if (! STRING_MULTIBYTE (string)) | 8648 | if (! STRING_MULTIBYTE (string)) |
| 8650 | return Qnil; | 8649 | return Qnil; |
| 8651 | p = SDATA (string) + string_char_to_byte (string, from); | 8650 | p = SDATA (string) + string_char_to_byte (string, from); |
| @@ -8720,8 +8719,8 @@ is nil. */) | |||
| 8720 | (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system_list) | 8719 | (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system_list) |
| 8721 | { | 8720 | { |
| 8722 | Lisp_Object list; | 8721 | Lisp_Object list; |
| 8723 | EMACS_INT start_byte, end_byte; | 8722 | ptrdiff_t start_byte, end_byte; |
| 8724 | int pos; | 8723 | ptrdiff_t pos; |
| 8725 | const unsigned char *p, *pbeg, *pend; | 8724 | const unsigned char *p, *pbeg, *pend; |
| 8726 | int c; | 8725 | int c; |
| 8727 | Lisp_Object tail, elt, attrs; | 8726 | Lisp_Object tail, elt, attrs; |
| @@ -8794,7 +8793,7 @@ is nil. */) | |||
| 8794 | } | 8793 | } |
| 8795 | if (charset_map_loaded) | 8794 | if (charset_map_loaded) |
| 8796 | { | 8795 | { |
| 8797 | EMACS_INT p_offset = p - pbeg, pend_offset = pend - pbeg; | 8796 | ptrdiff_t p_offset = p - pbeg, pend_offset = pend - pbeg; |
| 8798 | 8797 | ||
| 8799 | if (STRINGP (start)) | 8798 | if (STRINGP (start)) |
| 8800 | pbeg = SDATA (start); | 8799 | pbeg = SDATA (start); |
| @@ -8827,7 +8826,7 @@ code_convert_region (Lisp_Object start, Lisp_Object end, | |||
| 8827 | int encodep, int norecord) | 8826 | int encodep, int norecord) |
| 8828 | { | 8827 | { |
| 8829 | struct coding_system coding; | 8828 | struct coding_system coding; |
| 8830 | EMACS_INT from, from_byte, to, to_byte; | 8829 | ptrdiff_t from, from_byte, to, to_byte; |
| 8831 | Lisp_Object src_object; | 8830 | Lisp_Object src_object; |
| 8832 | 8831 | ||
| 8833 | CHECK_NUMBER_COERCE_MARKER (start); | 8832 | CHECK_NUMBER_COERCE_MARKER (start); |
| @@ -8915,7 +8914,7 @@ code_convert_string (Lisp_Object string, Lisp_Object coding_system, | |||
| 8915 | Lisp_Object dst_object, int encodep, int nocopy, int norecord) | 8914 | Lisp_Object dst_object, int encodep, int nocopy, int norecord) |
| 8916 | { | 8915 | { |
| 8917 | struct coding_system coding; | 8916 | struct coding_system coding; |
| 8918 | EMACS_INT chars, bytes; | 8917 | ptrdiff_t chars, bytes; |
| 8919 | 8918 | ||
| 8920 | CHECK_STRING (string); | 8919 | CHECK_STRING (string); |
| 8921 | if (NILP (coding_system)) | 8920 | if (NILP (coding_system)) |
| @@ -9290,7 +9289,7 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) | |||
| 9290 | error ("Too few arguments"); | 9289 | error ("Too few arguments"); |
| 9291 | operation = args[0]; | 9290 | operation = args[0]; |
| 9292 | if (!SYMBOLP (operation) | 9291 | if (!SYMBOLP (operation) |
| 9293 | || !NATNUMP (target_idx = Fget (operation, Qtarget_idx))) | 9292 | || (target_idx = Fget (operation, Qtarget_idx), !NATNUMP (target_idx))) |
| 9294 | error ("Invalid first argument"); | 9293 | error ("Invalid first argument"); |
| 9295 | if (nargs < 1 + XFASTINT (target_idx)) | 9294 | if (nargs < 1 + XFASTINT (target_idx)) |
| 9296 | error ("Too few arguments for operation `%s'", | 9295 | error ("Too few arguments for operation `%s'", |
| @@ -9511,8 +9510,12 @@ usage: (define-coding-system-internal ...) */) | |||
| 9511 | charset_list = Vemacs_mule_charset_list; | 9510 | charset_list = Vemacs_mule_charset_list; |
| 9512 | } | 9511 | } |
| 9513 | for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) | 9512 | for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) |
| 9514 | if (max_charset_id < XFASTINT (XCAR (tail))) | 9513 | { |
| 9515 | max_charset_id = XFASTINT (XCAR (tail)); | 9514 | if (! RANGED_INTEGERP (0, XCAR (tail), INT_MAX - 1)) |
| 9515 | error ("Invalid charset-list"); | ||
| 9516 | if (max_charset_id < XFASTINT (XCAR (tail))) | ||
| 9517 | max_charset_id = XFASTINT (XCAR (tail)); | ||
| 9518 | } | ||
| 9516 | } | 9519 | } |
| 9517 | else | 9520 | else |
| 9518 | { | 9521 | { |
| @@ -9672,23 +9675,23 @@ usage: (define-coding-system-internal ...) */) | |||
| 9672 | val = Fcar (tail); | 9675 | val = Fcar (tail); |
| 9673 | if (INTEGERP (val)) | 9676 | if (INTEGERP (val)) |
| 9674 | { | 9677 | { |
| 9675 | from = to = XINT (val); | 9678 | if (! (0 <= XINT (val) && XINT (val) <= 255)) |
| 9676 | if (from < 0 || from > 255) | ||
| 9677 | args_out_of_range_3 (val, make_number (0), make_number (255)); | 9679 | args_out_of_range_3 (val, make_number (0), make_number (255)); |
| 9680 | from = to = XINT (val); | ||
| 9678 | } | 9681 | } |
| 9679 | else | 9682 | else |
| 9680 | { | 9683 | { |
| 9681 | CHECK_CONS (val); | 9684 | CHECK_CONS (val); |
| 9682 | CHECK_NATNUM_CAR (val); | 9685 | CHECK_NATNUM_CAR (val); |
| 9683 | CHECK_NATNUM_CDR (val); | 9686 | CHECK_NUMBER_CDR (val); |
| 9684 | from = XINT (XCAR (val)); | 9687 | if (XINT (XCAR (val)) > 255) |
| 9685 | if (from > 255) | ||
| 9686 | args_out_of_range_3 (XCAR (val), | 9688 | args_out_of_range_3 (XCAR (val), |
| 9687 | make_number (0), make_number (255)); | 9689 | make_number (0), make_number (255)); |
| 9688 | to = XINT (XCDR (val)); | 9690 | from = XINT (XCAR (val)); |
| 9689 | if (to < from || to > 255) | 9691 | if (! (from <= XINT (XCDR (val)) && XINT (XCDR (val)) <= 255)) |
| 9690 | args_out_of_range_3 (XCDR (val), | 9692 | args_out_of_range_3 (XCDR (val), |
| 9691 | XCAR (val), make_number (255)); | 9693 | XCAR (val), make_number (255)); |
| 9694 | to = XINT (XCDR (val)); | ||
| 9692 | } | 9695 | } |
| 9693 | for (i = from; i <= to; i++) | 9696 | for (i = from; i <= to; i++) |
| 9694 | SSET (valids, i, 1); | 9697 | SSET (valids, i, 1); |
| @@ -9783,9 +9786,10 @@ usage: (define-coding-system-internal ...) */) | |||
| 9783 | 9786 | ||
| 9784 | flags = args[coding_arg_iso2022_flags]; | 9787 | flags = args[coding_arg_iso2022_flags]; |
| 9785 | CHECK_NATNUM (flags); | 9788 | CHECK_NATNUM (flags); |
| 9786 | i = XINT (flags); | 9789 | i = XINT (flags) & INT_MAX; |
| 9787 | if (EQ (args[coding_arg_charset_list], Qiso_2022)) | 9790 | if (EQ (args[coding_arg_charset_list], Qiso_2022)) |
| 9788 | flags = make_number (i | CODING_ISO_FLAG_FULL_SUPPORT); | 9791 | i |= CODING_ISO_FLAG_FULL_SUPPORT; |
| 9792 | flags = make_number (i); | ||
| 9789 | 9793 | ||
| 9790 | ASET (attrs, coding_attr_iso_initial, initial); | 9794 | ASET (attrs, coding_attr_iso_initial, initial); |
| 9791 | ASET (attrs, coding_attr_iso_usage, reg_usage); | 9795 | ASET (attrs, coding_attr_iso_usage, reg_usage); |