diff options
| author | Kenichi Handa | 2008-02-01 01:18:05 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-02-01 01:18:05 +0000 |
| commit | 661e8ab2f906ff1c4b762c74fa92afd596f801dc (patch) | |
| tree | b6ea23a5c994a0b2107952463fe7ebbed1bfcc9c | |
| parent | 17f6865b4015a6c58057c273de77e34531483096 (diff) | |
| download | emacs-661e8ab2f906ff1c4b762c74fa92afd596f801dc.tar.gz emacs-661e8ab2f906ff1c4b762c74fa92afd596f801dc.zip | |
(CCL_WRITE_CHAR, CCL_WRITE_MULTIBYTE_CHAR, ccl_driver):
Cancel previous change.
| -rw-r--r-- | src/ccl.c | 17 |
1 files changed, 10 insertions, 7 deletions
| @@ -748,13 +748,16 @@ while(0) | |||
| 748 | int bytes = SINGLE_BYTE_CHAR_P (ch) ? 1: CHAR_BYTES (ch); \ | 748 | int bytes = SINGLE_BYTE_CHAR_P (ch) ? 1: CHAR_BYTES (ch); \ |
| 749 | if (!dst) \ | 749 | if (!dst) \ |
| 750 | CCL_INVALID_CMD; \ | 750 | CCL_INVALID_CMD; \ |
| 751 | if (ccl->eight_bit_control \ | 751 | else if (dst + bytes + extra_bytes < (dst_bytes ? dst_end : src)) \ |
| 752 | && bytes == 1 && (ch) >= 0x80 && (ch) < 0xA0) \ | ||
| 753 | extra_bytes++; \ | ||
| 754 | if (dst + bytes + extra_bytes <= (dst_bytes ? dst_end : src)) \ | ||
| 755 | { \ | 752 | { \ |
| 756 | if (bytes == 1) \ | 753 | if (bytes == 1) \ |
| 757 | *dst++ = (ch); \ | 754 | { \ |
| 755 | *dst++ = (ch); \ | ||
| 756 | if (extra_bytes && (ch) >= 0x80 && (ch) < 0xA0) \ | ||
| 757 | /* We may have to convert this eight-bit char to \ | ||
| 758 | multibyte form later. */ \ | ||
| 759 | extra_bytes++; \ | ||
| 760 | } \ | ||
| 758 | else if (CHAR_VALID_P (ch, 0)) \ | 761 | else if (CHAR_VALID_P (ch, 0)) \ |
| 759 | dst += CHAR_STRING (ch, dst); \ | 762 | dst += CHAR_STRING (ch, dst); \ |
| 760 | else \ | 763 | else \ |
| @@ -772,7 +775,7 @@ while(0) | |||
| 772 | int bytes = CHAR_BYTES (ch); \ | 775 | int bytes = CHAR_BYTES (ch); \ |
| 773 | if (!dst) \ | 776 | if (!dst) \ |
| 774 | CCL_INVALID_CMD; \ | 777 | CCL_INVALID_CMD; \ |
| 775 | else if (dst + bytes + extra_bytes <= (dst_bytes ? dst_end : src)) \ | 778 | else if (dst + bytes + extra_bytes < (dst_bytes ? dst_end : src)) \ |
| 776 | { \ | 779 | { \ |
| 777 | if (CHAR_VALID_P ((ch), 0)) \ | 780 | if (CHAR_VALID_P ((ch), 0)) \ |
| 778 | dst += CHAR_STRING ((ch), dst); \ | 781 | dst += CHAR_STRING ((ch), dst); \ |
| @@ -916,7 +919,7 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 916 | each of them will be converted to multibyte form of 2-byte | 919 | each of them will be converted to multibyte form of 2-byte |
| 917 | sequence. For that conversion, we remember how many more bytes | 920 | sequence. For that conversion, we remember how many more bytes |
| 918 | we must keep in DESTINATION in this variable. */ | 921 | we must keep in DESTINATION in this variable. */ |
| 919 | int extra_bytes = 0; | 922 | int extra_bytes = ccl->eight_bit_control; |
| 920 | int eof_ic = ccl->eof_ic; | 923 | int eof_ic = ccl->eof_ic; |
| 921 | int eof_hit = 0; | 924 | int eof_hit = 0; |
| 922 | 925 | ||