diff options
| author | Kenichi Handa | 2000-05-25 01:30:37 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-05-25 01:30:37 +0000 |
| commit | 5c464c4d2ced85f946a85e17d02d09c28091fe76 (patch) | |
| tree | 3c85a68d743fd52cbd1eeff50c52340c60316e42 /src | |
| parent | eacfd7fe019ac55b576aad3ec7b2273aa3405273 (diff) | |
| download | emacs-5c464c4d2ced85f946a85e17d02d09c28091fe76.tar.gz emacs-5c464c4d2ced85f946a85e17d02d09c28091fe76.zip | |
(ccl_driver) <CCL_ReadMultibyteChar2>
<CCL_WriteMultibyteChar2>: Handle charsets eight-bit-control and
eight-bit-graphic correctly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ccl.c | 16 |
1 files changed, 15 insertions, 1 deletions
| @@ -1191,6 +1191,18 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 1191 | reg[rrr] = ((i << 7) | (*src & 0x7F)); | 1191 | reg[rrr] = ((i << 7) | (*src & 0x7F)); |
| 1192 | src++; | 1192 | src++; |
| 1193 | } | 1193 | } |
| 1194 | else if (i == LEADING_CODE_8_BIT_CONTROL) | ||
| 1195 | { | ||
| 1196 | if ((src + 1) >= src_end) | ||
| 1197 | goto ccl_read_multibyte_character_suspend; | ||
| 1198 | reg[RRR] = CHARSET_8_BIT_CONTROL; | ||
| 1199 | reg[rrr] = (*src++ - 0x20); | ||
| 1200 | } | ||
| 1201 | else if (i >= 0xA0) | ||
| 1202 | { | ||
| 1203 | reg[RRR] = CHARSET_8_BIT_GRAPHIC; | ||
| 1204 | reg[rrr] = i; | ||
| 1205 | } | ||
| 1194 | else | 1206 | else |
| 1195 | { | 1207 | { |
| 1196 | /* INVALID CODE. Return a single byte character. */ | 1208 | /* INVALID CODE. Return a single byte character. */ |
| @@ -1215,7 +1227,9 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 1215 | 1227 | ||
| 1216 | case CCL_WriteMultibyteChar2: | 1228 | case CCL_WriteMultibyteChar2: |
| 1217 | i = reg[RRR]; /* charset */ | 1229 | i = reg[RRR]; /* charset */ |
| 1218 | if (i == CHARSET_ASCII) | 1230 | if (i == CHARSET_ASCII |
| 1231 | || i == CHARSET_8_BIT_CONTROL | ||
| 1232 | || i == CHARSET_8_BIT_GRAPHIC) | ||
| 1219 | i = reg[rrr] & 0xFF; | 1233 | i = reg[rrr] & 0xFF; |
| 1220 | else if (CHARSET_DIMENSION (i) == 1) | 1234 | else if (CHARSET_DIMENSION (i) == 1) |
| 1221 | i = ((i - 0x70) << 7) | (reg[rrr] & 0x7F); | 1235 | i = ((i - 0x70) << 7) | (reg[rrr] & 0x7F); |