Mercurial > emacs
comparison src/coding.c @ 88443:6b86cf30a0b9
(produce_chars): Set the variable `multibytep' correctly.
(decode_coding_gap): Set coding->dst_multibyte correctly.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Mon, 11 Mar 2002 11:28:41 +0000 |
| parents | 3a34b722dd71 |
| children | a7b309f72920 |
comparison
equal
deleted
inserted
replaced
| 88442:9ebe131ccd17 | 88443:6b86cf30a0b9 |
|---|---|
| 5090 buf -= c + 1; | 5090 buf -= c + 1; |
| 5091 } | 5091 } |
| 5092 } | 5092 } |
| 5093 else | 5093 else |
| 5094 { | 5094 { |
| 5095 int multibytep = coding->src_multibyte; | |
| 5096 unsigned char *src = coding->source; | 5095 unsigned char *src = coding->source; |
| 5097 unsigned char *src_end = src + coding->src_bytes; | 5096 unsigned char *src_end = src + coding->src_bytes; |
| 5098 Lisp_Object eol_type; | 5097 Lisp_Object eol_type; |
| 5099 | 5098 |
| 5100 eol_type = CODING_ID_EOL_TYPE (coding->id); | 5099 eol_type = CODING_ID_EOL_TYPE (coding->id); |
| 5101 | 5100 |
| 5102 if (coding->src_multibyte != coding->dst_multibyte) | 5101 if (coding->src_multibyte != coding->dst_multibyte) |
| 5103 { | 5102 { |
| 5104 if (coding->src_multibyte) | 5103 if (coding->src_multibyte) |
| 5105 { | 5104 { |
| 5105 int multibytep = 1; | |
| 5106 int consumed_chars; | 5106 int consumed_chars; |
| 5107 | 5107 |
| 5108 while (1) | 5108 while (1) |
| 5109 { | 5109 { |
| 5110 unsigned char *src_base = src; | 5110 unsigned char *src_base = src; |
| 5139 ; | 5139 ; |
| 5140 } | 5140 } |
| 5141 else | 5141 else |
| 5142 while (src < src_end) | 5142 while (src < src_end) |
| 5143 { | 5143 { |
| 5144 int multibytep = 1; | |
| 5144 int c = *src++; | 5145 int c = *src++; |
| 5145 | 5146 |
| 5146 if (c == '\r') | 5147 if (c == '\r') |
| 5147 { | 5148 { |
| 5148 if (EQ (eol_type, Qdos)) | 5149 if (EQ (eol_type, Qdos)) |
| 5704 coding->src_pos_byte = -bytes; | 5705 coding->src_pos_byte = -bytes; |
| 5705 coding->src_multibyte = chars < bytes; | 5706 coding->src_multibyte = chars < bytes; |
| 5706 coding->dst_object = coding->src_object; | 5707 coding->dst_object = coding->src_object; |
| 5707 coding->dst_pos = PT; | 5708 coding->dst_pos = PT; |
| 5708 coding->dst_pos_byte = PT_BYTE; | 5709 coding->dst_pos_byte = PT_BYTE; |
| 5710 coding->dst_multibyte = ! NILP (current_buffer->enable_multibyte_characters); | |
| 5709 | 5711 |
| 5710 if (CODING_REQUIRE_DETECTION (coding)) | 5712 if (CODING_REQUIRE_DETECTION (coding)) |
| 5711 detect_coding (coding); | 5713 detect_coding (coding); |
| 5712 | 5714 |
| 5713 decode_coding (coding); | 5715 decode_coding (coding); |
