diff options
| author | Kenichi Handa | 1999-02-18 12:52:07 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1999-02-18 12:52:07 +0000 |
| commit | 9da8350f2efab0bc2f1d631a697705ceda652b0f (patch) | |
| tree | e8128ff4cd2f7a30533cfad7daa2e6475eabae69 /src/coding.c | |
| parent | 7cbf1dc1d32e76e7177b407c11512c654a2bb00b (diff) | |
| download | emacs-9da8350f2efab0bc2f1d631a697705ceda652b0f.tar.gz emacs-9da8350f2efab0bc2f1d631a697705ceda652b0f.zip | |
(Fdecode_sjis_char): In case of error, use %x for
formatting error message.
(Fdecode_big5_char): Likewise.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/coding.c b/src/coding.c index 15eadaf58ff..863f0d89d7a 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -5040,13 +5040,13 @@ Return the corresponding character.") | |||
| 5040 | XSETFASTINT (val, | 5040 | XSETFASTINT (val, |
| 5041 | MAKE_NON_ASCII_CHAR (charset_katakana_jisx0201, s2, 0)); | 5041 | MAKE_NON_ASCII_CHAR (charset_katakana_jisx0201, s2, 0)); |
| 5042 | else | 5042 | else |
| 5043 | error ("Invalid Shift JIS code: %d", XFASTINT (code)); | 5043 | error ("Invalid Shift JIS code: %x", XFASTINT (code)); |
| 5044 | } | 5044 | } |
| 5045 | else | 5045 | else |
| 5046 | { | 5046 | { |
| 5047 | if ((s1 < 0x80 || s1 > 0x9F && s1 < 0xE0 || s1 > 0xEF) | 5047 | if ((s1 < 0x80 || s1 > 0x9F && s1 < 0xE0 || s1 > 0xEF) |
| 5048 | || (s2 < 0x40 || s2 == 0x7F || s2 > 0xFC)) | 5048 | || (s2 < 0x40 || s2 == 0x7F || s2 > 0xFC)) |
| 5049 | error ("Invalid Shift JIS code: %d", XFASTINT (code)); | 5049 | error ("Invalid Shift JIS code: %x", XFASTINT (code)); |
| 5050 | DECODE_SJIS (s1, s2, c1, c2); | 5050 | DECODE_SJIS (s1, s2, c1, c2); |
| 5051 | XSETFASTINT (val, MAKE_NON_ASCII_CHAR (charset_jisx0208, c1, c2)); | 5051 | XSETFASTINT (val, MAKE_NON_ASCII_CHAR (charset_jisx0208, c1, c2)); |
| 5052 | } | 5052 | } |
| @@ -5099,14 +5099,14 @@ Return the corresponding character.") | |||
| 5099 | if (b1 == 0) | 5099 | if (b1 == 0) |
| 5100 | { | 5100 | { |
| 5101 | if (b2 >= 0x80) | 5101 | if (b2 >= 0x80) |
| 5102 | error ("Invalid BIG5 code: %d", XFASTINT (code)); | 5102 | error ("Invalid BIG5 code: %x", XFASTINT (code)); |
| 5103 | val = code; | 5103 | val = code; |
| 5104 | } | 5104 | } |
| 5105 | else | 5105 | else |
| 5106 | { | 5106 | { |
| 5107 | if ((b1 < 0xA1 || b1 > 0xFE) | 5107 | if ((b1 < 0xA1 || b1 > 0xFE) |
| 5108 | || (b2 < 0x40 || (b2 > 0x7E && b2 < 0xA1) || b2 > 0xFE)) | 5108 | || (b2 < 0x40 || (b2 > 0x7E && b2 < 0xA1) || b2 > 0xFE)) |
| 5109 | error ("Invalid BIG5 code: %d", XFASTINT (code)); | 5109 | error ("Invalid BIG5 code: %x", XFASTINT (code)); |
| 5110 | DECODE_BIG5 (b1, b2, charset, c1, c2); | 5110 | DECODE_BIG5 (b1, b2, charset, c1, c2); |
| 5111 | XSETFASTINT (val, MAKE_NON_ASCII_CHAR (charset, c1, c2)); | 5111 | XSETFASTINT (val, MAKE_NON_ASCII_CHAR (charset, c1, c2)); |
| 5112 | } | 5112 | } |