aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c95
1 files changed, 48 insertions, 47 deletions
diff --git a/src/coding.c b/src/coding.c
index 555c29cbdf3..a2e90e631d1 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 int consumed_chars = 0; 162 EMACS_INT 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 int produced_chars = 0; 269 EMACS_INT 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 {
@@ -943,7 +943,7 @@ record_conversion_result (struct coding_system *coding,
943 do { \ 943 do { \
944 if (dst + (bytes) >= dst_end) \ 944 if (dst + (bytes) >= dst_end) \
945 { \ 945 { \
946 int more_bytes = charbuf_end - charbuf + (bytes); \ 946 EMACS_INT more_bytes = charbuf_end - charbuf + (bytes); \
947 \ 947 \
948 dst = alloc_destination (coding, more_bytes, dst); \ 948 dst = alloc_destination (coding, more_bytes, dst); \
949 dst_end = coding->destination + coding->dst_bytes; \ 949 dst_end = coding->destination + coding->dst_bytes; \
@@ -1208,7 +1208,7 @@ detect_coding_utf_8 (struct coding_system *coding,
1208 const unsigned char *src = coding->source, *src_base; 1208 const unsigned char *src = coding->source, *src_base;
1209 const unsigned char *src_end = coding->source + coding->src_bytes; 1209 const unsigned char *src_end = coding->source + coding->src_bytes;
1210 int multibytep = coding->src_multibyte; 1210 int multibytep = coding->src_multibyte;
1211 int consumed_chars = 0; 1211 EMACS_INT consumed_chars = 0;
1212 int bom_found = 0; 1212 int bom_found = 0;
1213 int found = 0; 1213 int found = 0;
1214 1214
@@ -1293,7 +1293,7 @@ decode_coding_utf_8 (struct coding_system *coding)
1293 const unsigned char *src_base; 1293 const unsigned char *src_base;
1294 int *charbuf = coding->charbuf + coding->charbuf_used; 1294 int *charbuf = coding->charbuf + coding->charbuf_used;
1295 int *charbuf_end = coding->charbuf + coding->charbuf_size; 1295 int *charbuf_end = coding->charbuf + coding->charbuf_size;
1296 int consumed_chars = 0, consumed_chars_base = 0; 1296 EMACS_INT consumed_chars = 0, consumed_chars_base = 0;
1297 int multibytep = coding->src_multibyte; 1297 int multibytep = coding->src_multibyte;
1298 enum utf_bom_type bom = CODING_UTF_8_BOM (coding); 1298 enum utf_bom_type bom = CODING_UTF_8_BOM (coding);
1299 int eol_dos = 1299 int eol_dos =
@@ -1444,7 +1444,7 @@ encode_coding_utf_8 (struct coding_system *coding)
1444 int *charbuf_end = charbuf + coding->charbuf_used; 1444 int *charbuf_end = charbuf + coding->charbuf_used;
1445 unsigned char *dst = coding->destination + coding->produced; 1445 unsigned char *dst = coding->destination + coding->produced;
1446 unsigned char *dst_end = coding->destination + coding->dst_bytes; 1446 unsigned char *dst_end = coding->destination + coding->dst_bytes;
1447 int produced_chars = 0; 1447 EMACS_INT produced_chars = 0;
1448 int c; 1448 int c;
1449 1449
1450 if (CODING_UTF_8_BOM (coding) == utf_with_bom) 1450 if (CODING_UTF_8_BOM (coding) == utf_with_bom)
@@ -1602,7 +1602,7 @@ decode_coding_utf_16 (struct coding_system *coding)
1602 int *charbuf = coding->charbuf + coding->charbuf_used; 1602 int *charbuf = coding->charbuf + coding->charbuf_used;
1603 /* We may produces at most 3 chars in one loop. */ 1603 /* We may produces at most 3 chars in one loop. */
1604 int *charbuf_end = coding->charbuf + coding->charbuf_size - 2; 1604 int *charbuf_end = coding->charbuf + coding->charbuf_size - 2;
1605 int consumed_chars = 0, consumed_chars_base = 0; 1605 EMACS_INT consumed_chars = 0, consumed_chars_base = 0;
1606 int multibytep = coding->src_multibyte; 1606 int multibytep = coding->src_multibyte;
1607 enum utf_bom_type bom = CODING_UTF_16_BOM (coding); 1607 enum utf_bom_type bom = CODING_UTF_16_BOM (coding);
1608 enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding); 1608 enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding);
@@ -1729,7 +1729,7 @@ encode_coding_utf_16 (struct coding_system *coding)
1729 int safe_room = 8; 1729 int safe_room = 8;
1730 enum utf_bom_type bom = CODING_UTF_16_BOM (coding); 1730 enum utf_bom_type bom = CODING_UTF_16_BOM (coding);
1731 int big_endian = CODING_UTF_16_ENDIAN (coding) == utf_16_big_endian; 1731 int big_endian = CODING_UTF_16_ENDIAN (coding) == utf_16_big_endian;
1732 int produced_chars = 0; 1732 EMACS_INT produced_chars = 0;
1733 int c; 1733 int c;
1734 1734
1735 if (bom != utf_without_bom) 1735 if (bom != utf_without_bom)
@@ -1863,7 +1863,7 @@ detect_coding_emacs_mule (struct coding_system *coding,
1863 const unsigned char *src = coding->source, *src_base; 1863 const unsigned char *src = coding->source, *src_base;
1864 const unsigned char *src_end = coding->source + coding->src_bytes; 1864 const unsigned char *src_end = coding->source + coding->src_bytes;
1865 int multibytep = coding->src_multibyte; 1865 int multibytep = coding->src_multibyte;
1866 int consumed_chars = 0; 1866 EMACS_INT consumed_chars = 0;
1867 int c; 1867 int c;
1868 int found = 0; 1868 int found = 0;
1869 1869
@@ -2331,10 +2331,10 @@ decode_coding_emacs_mule (struct coding_system *coding)
2331 loop and one more charset annotation at the end. */ 2331 loop and one more charset annotation at the end. */
2332 int *charbuf_end 2332 int *charbuf_end
2333 = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); 2333 = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3);
2334 int consumed_chars = 0, consumed_chars_base; 2334 EMACS_INT consumed_chars = 0, consumed_chars_base;
2335 int multibytep = coding->src_multibyte; 2335 int multibytep = coding->src_multibyte;
2336 int char_offset = coding->produced_char; 2336 EMACS_INT char_offset = coding->produced_char;
2337 int last_offset = char_offset; 2337 EMACS_INT last_offset = char_offset;
2338 int last_id = charset_ascii; 2338 int last_id = charset_ascii;
2339 int eol_dos = 2339 int eol_dos =
2340 !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); 2340 !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -2585,7 +2585,7 @@ encode_coding_emacs_mule (struct coding_system *coding)
2585 unsigned char *dst = coding->destination + coding->produced; 2585 unsigned char *dst = coding->destination + coding->produced;
2586 unsigned char *dst_end = coding->destination + coding->dst_bytes; 2586 unsigned char *dst_end = coding->destination + coding->dst_bytes;
2587 int safe_room = 8; 2587 int safe_room = 8;
2588 int produced_chars = 0; 2588 EMACS_INT produced_chars = 0;
2589 Lisp_Object attrs, charset_list; 2589 Lisp_Object attrs, charset_list;
2590 int c; 2590 int c;
2591 int preferred_charset_id = -1; 2591 int preferred_charset_id = -1;
@@ -2943,7 +2943,7 @@ detect_coding_iso_2022 (struct coding_system *coding,
2943 int single_shifting = 0; 2943 int single_shifting = 0;
2944 int id; 2944 int id;
2945 int c, c1; 2945 int c, c1;
2946 int consumed_chars = 0; 2946 EMACS_INT consumed_chars = 0;
2947 int i; 2947 int i;
2948 int rejected = 0; 2948 int rejected = 0;
2949 int found = 0; 2949 int found = 0;
@@ -3453,7 +3453,7 @@ decode_coding_iso_2022 (struct coding_system *coding)
3453 loop and one more charset annotation at the end. */ 3453 loop and one more charset annotation at the end. */
3454 int *charbuf_end 3454 int *charbuf_end
3455 = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3); 3455 = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 3);
3456 int consumed_chars = 0, consumed_chars_base; 3456 EMACS_INT consumed_chars = 0, consumed_chars_base;
3457 int multibytep = coding->src_multibyte; 3457 int multibytep = coding->src_multibyte;
3458 /* Charsets invoked to graphic plane 0 and 1 respectively. */ 3458 /* Charsets invoked to graphic plane 0 and 1 respectively. */
3459 int charset_id_0 = CODING_ISO_INVOKED_CHARSET (coding, 0); 3459 int charset_id_0 = CODING_ISO_INVOKED_CHARSET (coding, 0);
@@ -3463,8 +3463,8 @@ decode_coding_iso_2022 (struct coding_system *coding)
3463 int c; 3463 int c;
3464 struct composition_status *cmp_status = CODING_ISO_CMP_STATUS (coding); 3464 struct composition_status *cmp_status = CODING_ISO_CMP_STATUS (coding);
3465 Lisp_Object attrs = CODING_ID_ATTRS (coding->id); 3465 Lisp_Object attrs = CODING_ID_ATTRS (coding->id);
3466 int char_offset = coding->produced_char; 3466 EMACS_INT char_offset = coding->produced_char;
3467 int last_offset = char_offset; 3467 EMACS_INT last_offset = char_offset;
3468 int last_id = charset_ascii; 3468 int last_id = charset_ascii;
3469 int eol_dos = 3469 int eol_dos =
3470 !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); 3470 !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -4190,10 +4190,10 @@ decode_coding_iso_2022 (struct coding_system *coding)
4190static unsigned char * 4190static unsigned char *
4191encode_invocation_designation (struct charset *charset, 4191encode_invocation_designation (struct charset *charset,
4192 struct coding_system *coding, 4192 struct coding_system *coding,
4193 unsigned char *dst, int *p_nchars) 4193 unsigned char *dst, EMACS_INT *p_nchars)
4194{ 4194{
4195 int multibytep = coding->dst_multibyte; 4195 int multibytep = coding->dst_multibyte;
4196 int produced_chars = *p_nchars; 4196 EMACS_INT produced_chars = *p_nchars;
4197 int reg; /* graphic register number */ 4197 int reg; /* graphic register number */
4198 int id = CHARSET_ID (charset); 4198 int id = CHARSET_ID (charset);
4199 4199
@@ -4285,7 +4285,7 @@ encode_designation_at_bol (struct coding_system *coding, int *charbuf,
4285 /* Table of charsets to be designated to each graphic register. */ 4285 /* Table of charsets to be designated to each graphic register. */
4286 int r[4]; 4286 int r[4];
4287 int c, found = 0, reg; 4287 int c, found = 0, reg;
4288 int produced_chars = 0; 4288 EMACS_INT produced_chars = 0;
4289 int multibytep = coding->dst_multibyte; 4289 int multibytep = coding->dst_multibyte;
4290 Lisp_Object attrs; 4290 Lisp_Object attrs;
4291 Lisp_Object charset_list; 4291 Lisp_Object charset_list;
@@ -4340,7 +4340,7 @@ encode_coding_iso_2022 (struct coding_system *coding)
4340 int bol_designation 4340 int bol_designation
4341 = (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_DESIGNATE_AT_BOL 4341 = (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_DESIGNATE_AT_BOL
4342 && CODING_ISO_BOL (coding)); 4342 && CODING_ISO_BOL (coding));
4343 int produced_chars = 0; 4343 EMACS_INT produced_chars = 0;
4344 Lisp_Object attrs, eol_type, charset_list; 4344 Lisp_Object attrs, eol_type, charset_list;
4345 int ascii_compatible; 4345 int ascii_compatible;
4346 int c; 4346 int c;
@@ -4528,7 +4528,7 @@ detect_coding_sjis (struct coding_system *coding,
4528 const unsigned char *src = coding->source, *src_base; 4528 const unsigned char *src = coding->source, *src_base;
4529 const unsigned char *src_end = coding->source + coding->src_bytes; 4529 const unsigned char *src_end = coding->source + coding->src_bytes;
4530 int multibytep = coding->src_multibyte; 4530 int multibytep = coding->src_multibyte;
4531 int consumed_chars = 0; 4531 EMACS_INT consumed_chars = 0;
4532 int found = 0; 4532 int found = 0;
4533 int c; 4533 int c;
4534 Lisp_Object attrs, charset_list; 4534 Lisp_Object attrs, charset_list;
@@ -4585,7 +4585,7 @@ detect_coding_big5 (struct coding_system *coding,
4585 const unsigned char *src = coding->source, *src_base; 4585 const unsigned char *src = coding->source, *src_base;
4586 const unsigned char *src_end = coding->source + coding->src_bytes; 4586 const unsigned char *src_end = coding->source + coding->src_bytes;
4587 int multibytep = coding->src_multibyte; 4587 int multibytep = coding->src_multibyte;
4588 int consumed_chars = 0; 4588 EMACS_INT consumed_chars = 0;
4589 int found = 0; 4589 int found = 0;
4590 int c; 4590 int c;
4591 4591
@@ -4636,13 +4636,13 @@ decode_coding_sjis (struct coding_system *coding)
4636 the end. */ 4636 the end. */
4637 int *charbuf_end 4637 int *charbuf_end
4638 = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); 4638 = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2);
4639 int consumed_chars = 0, consumed_chars_base; 4639 EMACS_INT consumed_chars = 0, consumed_chars_base;
4640 int multibytep = coding->src_multibyte; 4640 int multibytep = coding->src_multibyte;
4641 struct charset *charset_roman, *charset_kanji, *charset_kana; 4641 struct charset *charset_roman, *charset_kanji, *charset_kana;
4642 struct charset *charset_kanji2; 4642 struct charset *charset_kanji2;
4643 Lisp_Object attrs, charset_list, val; 4643 Lisp_Object attrs, charset_list, val;
4644 int char_offset = coding->produced_char; 4644 EMACS_INT char_offset = coding->produced_char;
4645 int last_offset = char_offset; 4645 EMACS_INT last_offset = char_offset;
4646 int last_id = charset_ascii; 4646 int last_id = charset_ascii;
4647 int eol_dos = 4647 int eol_dos =
4648 !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); 4648 !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -4754,12 +4754,12 @@ decode_coding_big5 (struct coding_system *coding)
4754 the end. */ 4754 the end. */
4755 int *charbuf_end 4755 int *charbuf_end
4756 = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); 4756 = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2);
4757 int consumed_chars = 0, consumed_chars_base; 4757 EMACS_INT consumed_chars = 0, consumed_chars_base;
4758 int multibytep = coding->src_multibyte; 4758 int multibytep = coding->src_multibyte;
4759 struct charset *charset_roman, *charset_big5; 4759 struct charset *charset_roman, *charset_big5;
4760 Lisp_Object attrs, charset_list, val; 4760 Lisp_Object attrs, charset_list, val;
4761 int char_offset = coding->produced_char; 4761 EMACS_INT char_offset = coding->produced_char;
4762 int last_offset = char_offset; 4762 EMACS_INT last_offset = char_offset;
4763 int last_id = charset_ascii; 4763 int last_id = charset_ascii;
4764 int eol_dos = 4764 int eol_dos =
4765 !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); 4765 !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -4856,7 +4856,7 @@ encode_coding_sjis (struct coding_system *coding)
4856 unsigned char *dst = coding->destination + coding->produced; 4856 unsigned char *dst = coding->destination + coding->produced;
4857 unsigned char *dst_end = coding->destination + coding->dst_bytes; 4857 unsigned char *dst_end = coding->destination + coding->dst_bytes;
4858 int safe_room = 4; 4858 int safe_room = 4;
4859 int produced_chars = 0; 4859 EMACS_INT produced_chars = 0;
4860 Lisp_Object attrs, charset_list, val; 4860 Lisp_Object attrs, charset_list, val;
4861 int ascii_compatible; 4861 int ascii_compatible;
4862 struct charset *charset_kanji, *charset_kana; 4862 struct charset *charset_kanji, *charset_kana;
@@ -4947,7 +4947,7 @@ encode_coding_big5 (struct coding_system *coding)
4947 unsigned char *dst = coding->destination + coding->produced; 4947 unsigned char *dst = coding->destination + coding->produced;
4948 unsigned char *dst_end = coding->destination + coding->dst_bytes; 4948 unsigned char *dst_end = coding->destination + coding->dst_bytes;
4949 int safe_room = 4; 4949 int safe_room = 4;
4950 int produced_chars = 0; 4950 EMACS_INT produced_chars = 0;
4951 Lisp_Object attrs, charset_list, val; 4951 Lisp_Object attrs, charset_list, val;
4952 int ascii_compatible; 4952 int ascii_compatible;
4953 struct charset *charset_big5; 4953 struct charset *charset_big5;
@@ -5022,10 +5022,10 @@ detect_coding_ccl (struct coding_system *coding,
5022 const unsigned char *src = coding->source, *src_base; 5022 const unsigned char *src = coding->source, *src_base;
5023 const unsigned char *src_end = coding->source + coding->src_bytes; 5023 const unsigned char *src_end = coding->source + coding->src_bytes;
5024 int multibytep = coding->src_multibyte; 5024 int multibytep = coding->src_multibyte;
5025 int consumed_chars = 0; 5025 EMACS_INT consumed_chars = 0;
5026 int found = 0; 5026 int found = 0;
5027 unsigned char *valids; 5027 unsigned char *valids;
5028 int head_ascii = coding->head_ascii; 5028 EMACS_INT head_ascii = coding->head_ascii;
5029 Lisp_Object attrs; 5029 Lisp_Object attrs;
5030 5030
5031 detect_info->checked |= CATEGORY_MASK_CCL; 5031 detect_info->checked |= CATEGORY_MASK_CCL;
@@ -5062,7 +5062,7 @@ decode_coding_ccl (struct coding_system *coding)
5062 const unsigned char *src_end = coding->source + coding->src_bytes; 5062 const unsigned char *src_end = coding->source + coding->src_bytes;
5063 int *charbuf = coding->charbuf + coding->charbuf_used; 5063 int *charbuf = coding->charbuf + coding->charbuf_used;
5064 int *charbuf_end = coding->charbuf + coding->charbuf_size; 5064 int *charbuf_end = coding->charbuf + coding->charbuf_size;
5065 int consumed_chars = 0; 5065 EMACS_INT consumed_chars = 0;
5066 int multibytep = coding->src_multibyte; 5066 int multibytep = coding->src_multibyte;
5067 struct ccl_program *ccl = &coding->spec.ccl->ccl; 5067 struct ccl_program *ccl = &coding->spec.ccl->ccl;
5068 int source_charbuf[1024]; 5068 int source_charbuf[1024];
@@ -5134,7 +5134,8 @@ encode_coding_ccl (struct coding_system *coding)
5134 unsigned char *dst = coding->destination + coding->produced; 5134 unsigned char *dst = coding->destination + coding->produced;
5135 unsigned char *dst_end = coding->destination + coding->dst_bytes; 5135 unsigned char *dst_end = coding->destination + coding->dst_bytes;
5136 int destination_charbuf[1024]; 5136 int destination_charbuf[1024];
5137 int i, produced_chars = 0; 5137 EMACS_INT produced_chars = 0;
5138 int i;
5138 Lisp_Object attrs, charset_list; 5139 Lisp_Object attrs, charset_list;
5139 5140
5140 CODING_GET_INFO (coding, attrs, charset_list); 5141 CODING_GET_INFO (coding, attrs, charset_list);
@@ -5220,7 +5221,7 @@ encode_coding_raw_text (struct coding_system *coding)
5220 int *charbuf_end = coding->charbuf + coding->charbuf_used; 5221 int *charbuf_end = coding->charbuf + coding->charbuf_used;
5221 unsigned char *dst = coding->destination + coding->produced; 5222 unsigned char *dst = coding->destination + coding->produced;
5222 unsigned char *dst_end = coding->destination + coding->dst_bytes; 5223 unsigned char *dst_end = coding->destination + coding->dst_bytes;
5223 int produced_chars = 0; 5224 EMACS_INT produced_chars = 0;
5224 int c; 5225 int c;
5225 5226
5226 if (multibytep) 5227 if (multibytep)
@@ -5303,10 +5304,10 @@ detect_coding_charset (struct coding_system *coding,
5303 const unsigned char *src = coding->source, *src_base; 5304 const unsigned char *src = coding->source, *src_base;
5304 const unsigned char *src_end = coding->source + coding->src_bytes; 5305 const unsigned char *src_end = coding->source + coding->src_bytes;
5305 int multibytep = coding->src_multibyte; 5306 int multibytep = coding->src_multibyte;
5306 int consumed_chars = 0; 5307 EMACS_INT consumed_chars = 0;
5307 Lisp_Object attrs, valids, name; 5308 Lisp_Object attrs, valids, name;
5308 int found = 0; 5309 int found = 0;
5309 int head_ascii = coding->head_ascii; 5310 EMACS_INT head_ascii = coding->head_ascii;
5310 int check_latin_extra = 0; 5311 int check_latin_extra = 0;
5311 5312
5312 detect_info->checked |= CATEGORY_MASK_CHARSET; 5313 detect_info->checked |= CATEGORY_MASK_CHARSET;
@@ -5410,12 +5411,12 @@ decode_coding_charset (struct coding_system *coding)
5410 the end. */ 5411 the end. */
5411 int *charbuf_end 5412 int *charbuf_end
5412 = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2); 5413 = coding->charbuf + coding->charbuf_size - (MAX_ANNOTATION_LENGTH * 2);
5413 int consumed_chars = 0, consumed_chars_base; 5414 EMACS_INT consumed_chars = 0, consumed_chars_base;
5414 int multibytep = coding->src_multibyte; 5415 int multibytep = coding->src_multibyte;
5415 Lisp_Object attrs = CODING_ID_ATTRS (coding->id); 5416 Lisp_Object attrs = CODING_ID_ATTRS (coding->id);
5416 Lisp_Object valids; 5417 Lisp_Object valids;
5417 int char_offset = coding->produced_char; 5418 EMACS_INT char_offset = coding->produced_char;
5418 int last_offset = char_offset; 5419 EMACS_INT last_offset = char_offset;
5419 int last_id = charset_ascii; 5420 int last_id = charset_ascii;
5420 int eol_dos = 5421 int eol_dos =
5421 !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); 5422 !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
@@ -5536,7 +5537,7 @@ encode_coding_charset (struct coding_system *coding)
5536 unsigned char *dst = coding->destination + coding->produced; 5537 unsigned char *dst = coding->destination + coding->produced;
5537 unsigned char *dst_end = coding->destination + coding->dst_bytes; 5538 unsigned char *dst_end = coding->destination + coding->dst_bytes;
5538 int safe_room = MAX_MULTIBYTE_LENGTH; 5539 int safe_room = MAX_MULTIBYTE_LENGTH;
5539 int produced_chars = 0; 5540 EMACS_INT produced_chars = 0;
5540 Lisp_Object attrs, charset_list; 5541 Lisp_Object attrs, charset_list;
5541 int ascii_compatible; 5542 int ascii_compatible;
5542 int c; 5543 int c;
@@ -6444,7 +6445,7 @@ decode_eol (struct coding_system *coding)
6444 } 6445 }
6445 else if (EQ (eol_type, Qdos)) 6446 else if (EQ (eol_type, Qdos))
6446 { 6447 {
6447 int n = 0; 6448 EMACS_INT n = 0;
6448 6449
6449 if (NILP (coding->dst_object)) 6450 if (NILP (coding->dst_object))
6450 { 6451 {
@@ -6459,9 +6460,9 @@ decode_eol (struct coding_system *coding)
6459 } 6460 }
6460 else 6461 else
6461 { 6462 {
6462 int pos_byte = coding->dst_pos_byte; 6463 EMACS_INT pos_byte = coding->dst_pos_byte;
6463 int pos = coding->dst_pos; 6464 EMACS_INT pos = coding->dst_pos;
6464 int pos_end = pos + coding->produced_char - 1; 6465 EMACS_INT pos_end = pos + coding->produced_char - 1;
6465 6466
6466 while (pos < pos_end) 6467 while (pos < pos_end)
6467 { 6468 {
@@ -6646,7 +6647,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
6646 6647
6647 if (c >= 0) 6648 if (c >= 0)
6648 { 6649 {
6649 int from_nchars = 1, to_nchars = 1; 6650 EMACS_INT from_nchars = 1, to_nchars = 1;
6650 Lisp_Object trans = Qnil; 6651 Lisp_Object trans = Qnil;
6651 6652
6652 LOOKUP_TRANSLATION_TABLE (translation_table, c, trans); 6653 LOOKUP_TRANSLATION_TABLE (translation_table, c, trans);