diff src/device-x.c @ 253:157b30c96d03 r20-5b25

Import from CVS: tag r20-5b25
author cvs
date Mon, 13 Aug 2007 10:20:27 +0200
parents 0e522484dd2a
children 11cf20601dec
line wrap: on
line diff
--- a/src/device-x.c	Mon Aug 13 10:20:01 2007 +0200
+++ b/src/device-x.c	Mon Aug 13 10:20:27 2007 +0200
@@ -107,6 +107,7 @@
 /************************************************************************/
 
 /* JH 97/11/25 removed the static declaration because I need it during setup in event-Xt... */
+struct device * get_device_from_display_1 (Display *dpy);
 struct device *
 get_device_from_display_1 (Display *dpy)
 {
@@ -593,7 +594,7 @@
 x_event_name (int event_type)
 {
   if (event_type < 0) return 0;
-  if (event_type >= (sizeof (events) / sizeof (char *))) return 0;
+  if (event_type >= countof (events)) return 0;
   return events [event_type];
 }
 
@@ -1387,13 +1388,16 @@
 on the keyboard of DEVICE without any modifier keys generates KEYSYM.
 Valid keysyms are listed in the files /usr/include/X11/keysymdef.h and in
 /usr/lib/X11/XKeysymDB, or whatever the equivalents are on your system.
+The keysym name can be provided in two forms:
+- if keysym is a string, it must be the name as known to X windows.
+- if keysym is a symbol, it must be the name as known to XEmacs.
+The two names differ in capitalization and underscoring.
 */
        (keysym, device))
 {
   struct device *d = decode_device (device);
   if (!DEVICE_X_P (d))
     signal_simple_error ("Not an X device", device);
-  CHECK_STRING (keysym);
 
   return (EQ (Qsans_modifiers,
 	      Fgethash (keysym, DEVICE_X_KEYSYM_MAP_HASHTABLE (d), Qnil)) ?
@@ -1407,14 +1411,16 @@
 on the keyboard of DEVICE keys generates KEYSYM.
 Valid keysyms are listed in the files /usr/include/X11/keysymdef.h and in
 /usr/lib/X11/XKeysymDB, or whatever the equivalents are on your system.
+The keysym name can be provided in two forms:
+- if keysym is a string, it must be the name as known to X windows.
+- if keysym is a symbol, it must be the name as known to XEmacs.
+The two names differ in capitalization and underscoring.
 */
        (keysym, device))
 {
   struct device *d = decode_device (device);
-
   if (!DEVICE_X_P (d))
     signal_simple_error ("Not an X device", device);
-  CHECK_STRING (keysym);
 
   return (NILP (Fgethash (keysym, DEVICE_X_KEYSYM_MAP_HASHTABLE (d), Qnil)) ?
 	  Qnil : Qt);