aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-05-04 16:27:01 +0000
committerRichard M. Stallman1995-05-04 16:27:01 +0000
commitec0faad26604f07fdc117fbc7956f74a4aae492a (patch)
treeb58758fec19c56c14757e9308446407bd3eba576 /src
parent5a10939a7de6892554a82bd23ff9ee351341322e (diff)
downloademacs-ec0faad26604f07fdc117fbc7956f74a4aae492a.tar.gz
emacs-ec0faad26604f07fdc117fbc7956f74a4aae492a.zip
(parse_modifiers, apply_modifiers): Don't assume 32-bit EMACS_INT.
(parse_modifiers): modifiers is an int, not an EMACS_INT. (read_key_sequence): Pass modifiers as int, not EMACS_INT.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 3160a380fac..a387edb3e06 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3568,7 +3568,7 @@ parse_modifiers (symbol)
3568 else 3568 else
3569 { 3569 {
3570 int end; 3570 int end;
3571 EMACS_INT modifiers = parse_modifiers_uncached (symbol, &end); 3571 int modifiers = parse_modifiers_uncached (symbol, &end);
3572 Lisp_Object unmodified; 3572 Lisp_Object unmodified;
3573 Lisp_Object mask; 3573 Lisp_Object mask;
3574 3574
@@ -3576,7 +3576,7 @@ parse_modifiers (symbol)
3576 XSYMBOL (symbol)->name->size - end), 3576 XSYMBOL (symbol)->name->size - end),
3577 Qnil); 3577 Qnil);
3578 3578
3579 if (modifiers & ~((1<<VALBITS) - 1)) 3579 if (modifiers & ~(((EMACS_INT)1 << VALBITS) - 1))
3580 abort (); 3580 abort ();
3581 XSETFASTINT (mask, modifiers); 3581 XSETFASTINT (mask, modifiers);
3582 elements = Fcons (unmodified, Fcons (mask, Qnil)); 3582 elements = Fcons (unmodified, Fcons (mask, Qnil));
@@ -3613,7 +3613,7 @@ apply_modifiers (modifiers, base)
3613 Lisp_Object cache, index, entry, new_symbol; 3613 Lisp_Object cache, index, entry, new_symbol;
3614 3614
3615 /* Mask out upper bits. We don't know where this value's been. */ 3615 /* Mask out upper bits. We don't know where this value's been. */
3616 modifiers &= (1<<VALBITS) - 1; 3616 modifiers &= ((EMACS_INT)1 << VALBITS) - 1;
3617 3617
3618 /* The click modifier never figures into cache indices. */ 3618 /* The click modifier never figures into cache indices. */
3619 cache = Fget (base, Qmodifier_cache); 3619 cache = Fget (base, Qmodifier_cache);
@@ -5845,7 +5845,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
5845 if (modifiers & shift_modifier) 5845 if (modifiers & shift_modifier)
5846 { 5846 {
5847 modifiers &= ~shift_modifier; 5847 modifiers &= ~shift_modifier;
5848 key = apply_modifiers (make_number (modifiers), 5848 key = apply_modifiers (modifiers,
5849 XCONS (breakdown)->car); 5849 XCONS (breakdown)->car);
5850 5850
5851 keybuf[t - 1] = key; 5851 keybuf[t - 1] = key;