32 lines
884 B
Text
32 lines
884 B
Text
$NetBSD: patch-ad,v 1.3 2004/07/09 12:45:03 wiz Exp $
|
|
|
|
--- main.c.orig 1994-06-22 16:24:50.000000000 +0200
|
|
+++ main.c
|
|
@@ -39,6 +39,18 @@ void exit_emu(void)
|
|
exit(0);
|
|
}
|
|
|
|
+static char *set_keymap(char *buf)
|
|
+{
|
|
+ char c;
|
|
+ int code;
|
|
+
|
|
+ if(sscanf(buf, " %*s %i=%c", &code, &c) != 2)
|
|
+ return "usage: keymap code=char";
|
|
+ if(put_scan_table(code, (unsigned char)c))
|
|
+ return "bad value for keymap";
|
|
+ return 0;
|
|
+}
|
|
+
|
|
|
|
void check_error(char *msg, int line)
|
|
{
|
|
@@ -89,6 +101,8 @@ void read_pcemurc(void)
|
|
check_error(set_update_rate(strtol(value, NULL,10)), line);
|
|
else if (strcasecmp(keyword,"cursorspeed") == 0)
|
|
check_error(set_cursor_rate(strtol(value, NULL,10)), line);
|
|
+ else if (strcasecmp(keyword,"keymap") == 0)
|
|
+ check_error(set_keymap(buffer), line);
|
|
else
|
|
check_error("Syntax error in .pcemu file", line);
|
|
}
|