diff options
| author | Paul Eggert | 2011-06-12 16:25:12 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-12 16:25:12 -0700 |
| commit | ea204efb8a3e81a4d9b04d2a36cb8c2a1c74662c (patch) | |
| tree | b209feeebf1bdb6994f46217e29ba860dcc6c7ba /src/keyboard.c | |
| parent | 78cf1fe8a256ffc91533b43eb851bf4519e9fbcc (diff) | |
| download | emacs-ea204efb8a3e81a4d9b04d2a36cb8c2a1c74662c.tar.gz emacs-ea204efb8a3e81a4d9b04d2a36cb8c2a1c74662c.zip | |
* lisp.h (UNSIGNED_CMP): New macro.
This fixes comparison bugs on 64-bit hosts.
(ASCII_CHAR_P): Use it.
* casefiddle.c (casify_object):
* character.h (ASCII_BYTE_P, CHAR_VALID_P):
(SINGLE_BYTE_CHAR_P, CHAR_STRING):
* composite.h (COMPOSITION_ENCODE_RULE_VALID):
* dispextern.h (FACE_FROM_ID):
* keyboard.c (read_char): Use UNSIGNED_CMP.
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 89483972a65..0bacc2fa28f 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2906,9 +2906,13 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event | |||
| 2906 | goto exit; | 2906 | goto exit; |
| 2907 | 2907 | ||
| 2908 | if ((STRINGP (KVAR (current_kboard, Vkeyboard_translate_table)) | 2908 | if ((STRINGP (KVAR (current_kboard, Vkeyboard_translate_table)) |
| 2909 | && SCHARS (KVAR (current_kboard, Vkeyboard_translate_table)) > (unsigned) XFASTINT (c)) | 2909 | && UNSIGNED_CMP (XFASTINT (c), <, |
| 2910 | SCHARS (KVAR (current_kboard, | ||
| 2911 | Vkeyboard_translate_table)))) | ||
| 2910 | || (VECTORP (KVAR (current_kboard, Vkeyboard_translate_table)) | 2912 | || (VECTORP (KVAR (current_kboard, Vkeyboard_translate_table)) |
| 2911 | && ASIZE (KVAR (current_kboard, Vkeyboard_translate_table)) > (unsigned) XFASTINT (c)) | 2913 | && UNSIGNED_CMP (XFASTINT (c), <, |
| 2914 | ASIZE (KVAR (current_kboard, | ||
| 2915 | Vkeyboard_translate_table)))) | ||
| 2912 | || (CHAR_TABLE_P (KVAR (current_kboard, Vkeyboard_translate_table)) | 2916 | || (CHAR_TABLE_P (KVAR (current_kboard, Vkeyboard_translate_table)) |
| 2913 | && CHARACTERP (c))) | 2917 | && CHARACTERP (c))) |
| 2914 | { | 2918 | { |