diff options
| author | Kenichi Handa | 2008-11-29 13:47:31 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-11-29 13:47:31 +0000 |
| commit | 8cc53f96e5dc3d647411e01298e4125ed4b00928 (patch) | |
| tree | 02ac71d866683a4c1ca4632d85e083a9a1a9eb8f /src | |
| parent | 9c6361c98bf378474cac35b6f9b3330ba66e91ce (diff) | |
| download | emacs-8cc53f96e5dc3d647411e01298e4125ed4b00928.tar.gz emacs-8cc53f96e5dc3d647411e01298e4125ed4b00928.zip | |
(CHAR_CHARSET_P): Check if the encoder is loaded or
not before accessing it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/charset.h | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e0575f03d76..1cb44419d1f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2008-11-29 Kenichi Handa <handa@m17n.org> | 1 | 2008-11-29 Kenichi Handa <handa@m17n.org> |
| 2 | 2 | ||
| 3 | * charset.h (CHAR_CHARSET_P): Check if the encoder is loaded or | ||
| 4 | not before accessing it. | ||
| 5 | |||
| 3 | * charset.c (Fdefine_charset_internal): After calculating | 6 | * charset.c (Fdefine_charset_internal): After calculating |
| 4 | min_char, max_char, and fastmap, copy the charset structure again. | 7 | min_char, max_char, and fastmap, copy the charset structure again. |
| 5 | (encode_char): Fix the previous change. | 8 | (encode_char): Fix the previous change. |
diff --git a/src/charset.h b/src/charset.h index 1dac7add242..fa3f363a9e8 100644 --- a/src/charset.h +++ b/src/charset.h | |||
| @@ -503,7 +503,8 @@ extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL]; | |||
| 503 | && ((charset)->method == CHARSET_METHOD_OFFSET \ | 503 | && ((charset)->method == CHARSET_METHOD_OFFSET \ |
| 504 | ? (c) >= (charset)->min_char && (c) <= (charset)->max_char \ | 504 | ? (c) >= (charset)->min_char && (c) <= (charset)->max_char \ |
| 505 | : ((charset)->method == CHARSET_METHOD_MAP \ | 505 | : ((charset)->method == CHARSET_METHOD_MAP \ |
| 506 | && (charset)->compact_codes_p) \ | 506 | && (charset)->compact_codes_p \ |
| 507 | && CHAR_TABLE_P (CHARSET_ENCODER (charset))) \ | ||
| 507 | ? ! NILP (CHAR_TABLE_REF (CHARSET_ENCODER (charset), (c))) \ | 508 | ? ! NILP (CHAR_TABLE_REF (CHARSET_ENCODER (charset), (c))) \ |
| 508 | : encode_char ((charset), (c)) != (charset)->invalid_code)))) | 509 | : encode_char ((charset), (c)) != (charset)->invalid_code)))) |
| 509 | 510 | ||