mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-29 16:41:45 -08:00
(ccl_driver) [CCL_ReadMultibyteChar2]: If SRC points an
invalid mulitbyte sequence, treat *SRC as a character of eight-bit-graphic.
This commit is contained in:
parent
2a55cd3a13
commit
0fc71a7725
2 changed files with 24 additions and 12 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2001-02-15 Kenichi Handa <handa@etl.go.jp>
|
||||
|
||||
* ccl.c (ccl_driver) [CCL_ReadMultibyteChar2]: If SRC points an
|
||||
invalid multibyte sequence, treat *SRC as a character of
|
||||
eight-bit-graphic.
|
||||
|
||||
2001-02-15 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
* textprop.c (Fset_text_properties): Doc fix.
|
||||
|
|
|
|||
30
src/ccl.c
30
src/ccl.c
|
|
@ -1255,21 +1255,27 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
|
|||
reg[rrr] = i;
|
||||
reg[RRR] = CHARSET_ASCII;
|
||||
}
|
||||
else if (i <= MAX_CHARSET_OFFICIAL_DIMENSION1)
|
||||
{
|
||||
if (src >= src_end)
|
||||
goto ccl_read_multibyte_character_suspend;
|
||||
reg[RRR] = i;
|
||||
reg[rrr] = (*src++ & 0x7F);
|
||||
}
|
||||
else if (i <= MAX_CHARSET_OFFICIAL_DIMENSION2)
|
||||
{
|
||||
if ((src + 1) >= src_end)
|
||||
int dimension = BYTES_BY_CHAR_HEAD (i) - 1;
|
||||
|
||||
if (dimension == 0)
|
||||
{
|
||||
/* `i' is a leading code for an undefined charset. */
|
||||
reg[RRR] = CHARSET_8_BIT_GRAPHIC;
|
||||
reg[rrr] = i;
|
||||
}
|
||||
else if (src + dimension > src_end)
|
||||
goto ccl_read_multibyte_character_suspend;
|
||||
reg[RRR] = i;
|
||||
i = (*src++ & 0x7F);
|
||||
reg[rrr] = ((i << 7) | (*src & 0x7F));
|
||||
src++;
|
||||
else
|
||||
{
|
||||
reg[RRR] = i;
|
||||
i = (*src++ & 0x7F);
|
||||
if (dimension == 1)
|
||||
reg[rrr] = i;
|
||||
else
|
||||
reg[rrr] = ((i << 7) | (*src++ & 0x7F));
|
||||
}
|
||||
}
|
||||
else if ((i == LEADING_CODE_PRIVATE_11)
|
||||
|| (i == LEADING_CODE_PRIVATE_12))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue