Mercurial > emacs
comparison src/msdos.c @ 34561:62530d6f561d
(Fmsdos_set_mouse_buttons): Signal an error if the
argument is outside the range [2..3].
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Thu, 14 Dec 2000 15:12:58 +0000 |
parents | eccf7d43bead |
children | 9ff4148959a8 |
comparison
equal
deleted
inserted
replaced
34560:df3a9e4e055c | 34561:62530d6f561d |
---|---|
193 e.g., if the number of buttons is reported as 3, but Emacs only sees 2 of\n\ | 193 e.g., if the number of buttons is reported as 3, but Emacs only sees 2 of\n\ |
194 them. This happens with wheeled mice on Windows 9X, for example.") | 194 them. This happens with wheeled mice on Windows 9X, for example.") |
195 (nbuttons) | 195 (nbuttons) |
196 Lisp_Object nbuttons; | 196 Lisp_Object nbuttons; |
197 { | 197 { |
198 int n; | |
199 | |
198 CHECK_NUMBER (nbuttons, 0); | 200 CHECK_NUMBER (nbuttons, 0); |
199 mouse_setup_buttons (XINT (nbuttons)); | 201 n = XINT (nbuttons); |
202 if (n < 2 || n > 3) | |
203 Fsignal (Qargs_out_of_range, | |
204 Fcons (build_string ("only 2 or 3 mouse buttons are supported"), | |
205 Fcons (nbuttons, Qnil))); | |
206 mouse_setup_buttons (n); | |
200 return Qnil; | 207 return Qnil; |
201 } | 208 } |
202 | 209 |
203 static void | 210 static void |
204 mouse_get_xy (int *x, int *y) | 211 mouse_get_xy (int *x, int *y) |