aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-10 18:14:02 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-10 18:14:02 -0700
commit42d9cb33a555d113897b5decb29c099b4d47a164 (patch)
tree65f85132f3158bdc68aff1638cf49bd37da35a64
parent6e4a45c0050ed8eacdd2426b971e263cbdcca0ae (diff)
downloaduemacs-42d9cb33a555d113897b5decb29c099b4d47a164.tar.gz
Expand keycode to 'int' from 'short'
This uses the four high bits for the meta and control key sequences. This means that we will be limiting our Unicode space to 28 bits, but that's more than we really need. It *would* be nicer if we just used the sign bit to mark "we have meta character information") but that would require bigger changes. And we really don't need to worry about 30-bit unicode. Small steps, remember. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--estruct.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/estruct.h b/estruct.h
index 61de40b..1a7a683 100644
--- a/estruct.h
+++ b/estruct.h
@@ -237,10 +237,10 @@
#define NCOLORS 8 /* number of supported colors */
#define KBLOCK 250 /* sizeof kill buffer chunks */
-#define CONTROL 0x0100 /* Control flag, or'ed in */
-#define META 0x0200 /* Meta flag, or'ed in */
-#define CTLX 0x0400 /* ^X flag, or'ed in */
-#define SPEC 0x0800 /* special key (function keys) */
+#define CONTROL 0x10000000 /* Control flag, or'ed in */
+#define META 0x20000000 /* Meta flag, or'ed in */
+#define CTLX 0x40000000 /* ^X flag, or'ed in */
+#define SPEC 0x80000000 /* special key (function keys) */
#ifdef FALSE
#undef FALSE
@@ -556,7 +556,7 @@ struct terminal {
/* Structure for the table of initial key bindings. */
struct key_tab {
- short k_code; /* Key code */
+ int k_code; /* Key code */
int (*k_fp)(int, int); /* Routine to handle it */
};