Commit 2d368234 authored by Richard M. Stallman's avatar Richard M. Stallman

(XTread_socket, case KeyPress) [HPUX]: Test IsModifiedKey.

Include systty.h; don't mess with FIONREAD.
Don't include termio.h dorectly.
parent e36ab06b
...@@ -58,24 +58,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -58,24 +58,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <strings.h> #include <strings.h>
#else /* ! defined (BSD) */ #else /* ! defined (BSD) */
#ifndef VMS #ifndef VMS
#include <sys/termio.h>
#include <string.h> #include <string.h>
#endif #endif
#endif /* ! defined (BSD) */ #endif /* ! defined (BSD) */
/* Allow m- file to inhibit use of FIONREAD. */ #include "systty.h"
#ifdef BROKEN_FIONREAD
#undef FIONREAD
#endif /* ! defined (BROKEN_FIONREAD) */
/* We are unable to use interrupts if FIONREAD is not available,
so flush SIGIO so we won't try. */
#ifndef FIONREAD
#ifdef SIGIO
#undef SIGIO
#endif /* ! defined (SIGIO) */
#endif /* FIONREAD */
#include "systime.h" #include "systime.h"
#include <fcntl.h> #include <fcntl.h>
...@@ -2855,7 +2842,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected) ...@@ -2855,7 +2842,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
if (f != 0) if (f != 0)
{ {
KeySym keysym; KeySym keysym, orig_keysym;
char copy_buffer[80]; char copy_buffer[80];
int modifiers; int modifiers;
...@@ -2875,6 +2862,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected) ...@@ -2875,6 +2862,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
/* Strip off the vendor-specific keysym bit, and take a shot /* Strip off the vendor-specific keysym bit, and take a shot
at recognizing the codes. HP servers have extra keysyms at recognizing the codes. HP servers have extra keysyms
that fit into the MiscFunctionKey category. */ that fit into the MiscFunctionKey category. */
orig_keysym = keysym;
keysym &= ~(1<<28); keysym &= ~(1<<28);
if (numchars > 1) if (numchars > 1)
...@@ -2882,11 +2870,14 @@ XTread_socket (sd, bufp, numchars, waitp, expected) ...@@ -2882,11 +2870,14 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
if ((keysym >= XK_BackSpace && keysym <= XK_Escape) if ((keysym >= XK_BackSpace && keysym <= XK_Escape)
|| keysym == XK_Delete || keysym == XK_Delete
|| IsCursorKey (keysym) /* 0xff50 <= x < 0xff60 */ || IsCursorKey (keysym) /* 0xff50 <= x < 0xff60 */
|| IsMiscFunctionKey (keysym) /* 0xff60 <= x < 0xff80 */ || IsMiscFunctionKey (keysym) /* 0xff60 <= x < 0xff7e */
#ifdef HPUX #ifdef HPUX
/* This recognizes the "extended function keys". /* This recognizes the "extended function keys".
It seems there's no cleaner way. */ It seems there's no cleaner way.
|| ((unsigned) (keysym) >= XK_Select Test IsModifierKey to avoid handling mode_switch
incorrectly. */
|| (!IsModifierKey (orig_keysym)
&& (unsigned) (keysym) >= XK_Select
&& (unsigned)(keysym) < XK_KP_Space) && (unsigned)(keysym) < XK_KP_Space)
#endif #endif
|| IsKeypadKey (keysym) /* 0xff80 <= x < 0xffbe */ || IsKeypadKey (keysym) /* 0xff80 <= x < 0xffbe */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment