1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
--- src/keyboard/keyboard.c.orig Sun Jul 18 09:41:15 1999
+++ src/keyboard/keyboard.c Wed Aug 30 19:04:39 2000
@@ -28,12 +28,12 @@
#include <sys/ioctl.h>
#include <fcntl.h>
#include <termios.h>
-#include <linux/kd.h>
+#include <sys/kbio.h>
/* linux/keyboard.h defines NR_KEYS and some scancode-like constants, so it */
/* should also be useful for svgalib programs using the keyboard. It misses */
/* a few KERNEL ifdefs around kernel data structures though. */
#include <linux/keyboard.h>
-#include <sys/vt.h>
+#include <sys/consio.h>
/* Needed to check uid of keymap files */
#include <sys/stat.h>
#include <unistd.h>
@@ -340,7 +340,7 @@
tcsetattr(__svgalib_kbd_fd, TCSAFLUSH, &newkbdtermios);
- ioctl(__svgalib_kbd_fd, KDSKBMODE, K_MEDIUMRAW);
+ ioctl(__svgalib_kbd_fd, KDSKBMODE, K_CODE);
keyboard_clearstate();
@@ -578,7 +578,7 @@
/* VT switch. */
/* *** what about F11 & F12? */
int j, vt = 0;
- struct vt_stat vts;
+ int vts;
for (j = 0; j < 12; j++)
if (functionkey_state & (1 << j)) {
vt = j + 1;
@@ -587,9 +587,9 @@
}
/* Do not switch vt's if need not to */
- ioctl(__svgalib_tty_fd, VT_GETSTATE, &vts);
+ ioctl(__svgalib_tty_fd, VT_GETACTIVE, &vts);
- if(vt != vts.v_active) {
+ if(vt != vts) {
/* if switching vt's, need to clear keystates */
keyboard_clearstate();
/*
|