diff options
| author | Richard M. Stallman | 1993-05-31 18:33:08 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-05-31 18:33:08 +0000 |
| commit | 2d3682341cf62a260125aae190c5a2b3df80fe10 (patch) | |
| tree | 88774ca0861a0998bf8f572ce98bbdbd9621d37f | |
| parent | e36ab06b7ffac6d1380d198f3a2cbfe5f0a26526 (diff) | |
| download | emacs-2d3682341cf62a260125aae190c5a2b3df80fe10.tar.gz emacs-2d3682341cf62a260125aae190c5a2b3df80fe10.zip | |
(XTread_socket, case KeyPress) [HPUX]: Test IsModifiedKey.
Include systty.h; don't mess with FIONREAD.
Don't include termio.h dorectly.
| -rw-r--r-- | src/xterm.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/src/xterm.c b/src/xterm.c index 86b66f8fc84..77cc54021dd 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -58,24 +58,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 58 | #include <strings.h> | 58 | #include <strings.h> |
| 59 | #else /* ! defined (BSD) */ | 59 | #else /* ! defined (BSD) */ |
| 60 | #ifndef VMS | 60 | #ifndef VMS |
| 61 | #include <sys/termio.h> | ||
| 62 | #include <string.h> | 61 | #include <string.h> |
| 63 | #endif | 62 | #endif |
| 64 | #endif /* ! defined (BSD) */ | 63 | #endif /* ! defined (BSD) */ |
| 65 | 64 | ||
| 66 | /* Allow m- file to inhibit use of FIONREAD. */ | 65 | #include "systty.h" |
| 67 | #ifdef BROKEN_FIONREAD | ||
| 68 | #undef FIONREAD | ||
| 69 | #endif /* ! defined (BROKEN_FIONREAD) */ | ||
| 70 | |||
| 71 | /* We are unable to use interrupts if FIONREAD is not available, | ||
| 72 | so flush SIGIO so we won't try. */ | ||
| 73 | #ifndef FIONREAD | ||
| 74 | #ifdef SIGIO | ||
| 75 | #undef SIGIO | ||
| 76 | #endif /* ! defined (SIGIO) */ | ||
| 77 | #endif /* FIONREAD */ | ||
| 78 | |||
| 79 | #include "systime.h" | 66 | #include "systime.h" |
| 80 | 67 | ||
| 81 | #include <fcntl.h> | 68 | #include <fcntl.h> |
| @@ -2855,7 +2842,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 2855 | 2842 | ||
| 2856 | if (f != 0) | 2843 | if (f != 0) |
| 2857 | { | 2844 | { |
| 2858 | KeySym keysym; | 2845 | KeySym keysym, orig_keysym; |
| 2859 | char copy_buffer[80]; | 2846 | char copy_buffer[80]; |
| 2860 | int modifiers; | 2847 | int modifiers; |
| 2861 | 2848 | ||
| @@ -2875,6 +2862,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 2875 | /* Strip off the vendor-specific keysym bit, and take a shot | 2862 | /* Strip off the vendor-specific keysym bit, and take a shot |
| 2876 | at recognizing the codes. HP servers have extra keysyms | 2863 | at recognizing the codes. HP servers have extra keysyms |
| 2877 | that fit into the MiscFunctionKey category. */ | 2864 | that fit into the MiscFunctionKey category. */ |
| 2865 | orig_keysym = keysym; | ||
| 2878 | keysym &= ~(1<<28); | 2866 | keysym &= ~(1<<28); |
| 2879 | 2867 | ||
| 2880 | if (numchars > 1) | 2868 | if (numchars > 1) |
| @@ -2882,11 +2870,14 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 2882 | if ((keysym >= XK_BackSpace && keysym <= XK_Escape) | 2870 | if ((keysym >= XK_BackSpace && keysym <= XK_Escape) |
| 2883 | || keysym == XK_Delete | 2871 | || keysym == XK_Delete |
| 2884 | || IsCursorKey (keysym) /* 0xff50 <= x < 0xff60 */ | 2872 | || IsCursorKey (keysym) /* 0xff50 <= x < 0xff60 */ |
| 2885 | || IsMiscFunctionKey (keysym) /* 0xff60 <= x < 0xff80 */ | 2873 | || IsMiscFunctionKey (keysym) /* 0xff60 <= x < 0xff7e */ |
| 2886 | #ifdef HPUX | 2874 | #ifdef HPUX |
| 2887 | /* This recognizes the "extended function keys". | 2875 | /* This recognizes the "extended function keys". |
| 2888 | It seems there's no cleaner way. */ | 2876 | It seems there's no cleaner way. |
| 2889 | || ((unsigned) (keysym) >= XK_Select | 2877 | Test IsModifierKey to avoid handling mode_switch |
| 2878 | incorrectly. */ | ||
| 2879 | || (!IsModifierKey (orig_keysym) | ||
| 2880 | && (unsigned) (keysym) >= XK_Select | ||
| 2890 | && (unsigned)(keysym) < XK_KP_Space) | 2881 | && (unsigned)(keysym) < XK_KP_Space) |
| 2891 | #endif | 2882 | #endif |
| 2892 | || IsKeypadKey (keysym) /* 0xff80 <= x < 0xffbe */ | 2883 | || IsKeypadKey (keysym) /* 0xff80 <= x < 0xffbe */ |