Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hpcmips/vr Fix an obscure bug:
details: https://anonhg.NetBSD.org/src/rev/2dbbcc537e1c
branches: trunk
changeset: 482899:2dbbcc537e1c
user: mycroft <mycroft%NetBSD.org@localhost>
date: Fri Feb 25 00:42:47 2000 +0000
description:
Fix an obscure bug:
If we enter DDB from the keyboard, kc_scandata[] wasn't updated before the
debugger was entered, and the first call to cngetc() would see the ESC and
stack another DDB entry on top. This was... poor.
diffstat:
sys/arch/hpcmips/vr/vrkiu.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (35 lines):
diff -r cb182446d8a2 -r 2dbbcc537e1c sys/arch/hpcmips/vr/vrkiu.c
--- a/sys/arch/hpcmips/vr/vrkiu.c Fri Feb 25 00:29:55 2000 +0000
+++ b/sys/arch/hpcmips/vr/vrkiu.c Fri Feb 25 00:42:47 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vrkiu.c,v 1.15 2000/02/18 06:54:47 mycroft Exp $ */
+/* $NetBSD: vrkiu.c,v 1.16 2000/02/25 00:42:47 mycroft Exp $ */
/*-
* Copyright (c) 1999 SASAKI Takesi All rights reserved.
@@ -543,12 +543,13 @@
detected = 0;
for (i = 0; i < KIU_NSCANLINE / 2; i++) {
modified = scandata[i] ^ chip->kc_scandata[i];
+ chip->kc_scandata[i] = scandata[i];
mask = 1;
for (j = 0; j < 16; j++, mask <<= 1) {
- /* XXX: The order of keys can be a problem.
- If CTRL and normal key are pushed simultaneously,
- normal key can be entered in queue first.
- Same problem would occur in key break. */
+ /*
+ * Simultaneous keypresses are resolved by registering
+ * the one with the lowest bit index first.
+ */
if (modified & mask) {
int key, type;
key = i * 16 + j;
@@ -576,7 +577,6 @@
}
}
}
- chip->kc_scandata[i] = scandata[i];
}
DPRINTF(("\n"));
Home |
Main Index |
Thread Index |
Old Index