Fix warnings and remove Jamfiles.
authorFilip Navara <filip.navara@gmail.com>
Mon, 20 Jun 2005 13:43:05 +0000 (13:43 +0000)
committerFilip Navara <filip.navara@gmail.com>
Mon, 20 Jun 2005 13:43:05 +0000 (13:43 +0000)
svn path=/trunk/; revision=16147

reactos/lib/kbduk/Jamfile [deleted file]
reactos/lib/kbduk/kbduk.c
reactos/lib/kbdus/Jamfile [deleted file]
reactos/lib/kbdus/kbdus.c

diff --git a/reactos/lib/kbduk/Jamfile b/reactos/lib/kbduk/Jamfile
deleted file mode 100644 (file)
index 18a7372..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-SubDir ROS_TOP lib kbduk ;
-
-# This stuff should actually be moved to Jamrules
-# in order to more easily support other compilers
-CCFLAGS += -Wall -fno-builtin ;
-
-# NOTE - I'm no Jam expert, yet. This stuff should be
-# abstracted into the Jamrules file.
-LINKFLAGS = -nostartfiles -nostdlib -shared ;
-LINKFLAGS += -Wl,--image-base,0x77F00000 -lgcc ;
-
-SRCS = kbduk
-
-SharedLibrary kbduk : $(SRCS) ;
-LINKLIBS = ;
index fd695ec..3a6f821 100644 (file)
 #ifdef _M_IA64
 #define ROSDATA static __declspec(allocate(".data"))
 #else
+#ifdef _MSC_VER
 #pragma data_seg(".data")
 #define ROSDATA static
+#else
+#define ROSDATA static __attribute__((section(".data")))
+#endif
 #endif
 
 #define VK_EMPTY 0xff   /* The non-existent VK */
 #define KNUMS    0xc00  /* Special + number pad */
 #define KMEXT    0x300  /* Multi + ext */
 
-/* Thanks to http://asp.flaaten.dk/pforum/keycode/keycode.htm */
-#ifndef VK_OEM_1
-#define VK_OEM_1  0xba
-#endif
-#ifndef VK_OEM_PLUS
-#define VK_OEM_PLUS 0xbb
-#endif
-#ifndef VK_OEM_COMMA
-#define VK_OEM_COMMA 0xbc
-#endif
-#ifndef VK_OEM_MINUS
-#define VK_OEM_MINUS 0xbd
-#endif
-#ifndef VK_OEM_PERIOD
-#define VK_OEM_PERIOD 0xbe
-#endif
-#ifndef VK_OEM_2
-#define VK_OEM_2 0xbf
-#endif
-#ifndef VK_OEM_3
-#define VK_OEM_3 0xc0
-#endif
-#ifndef VK_OEM_4
-#define VK_OEM_4 0xdb
-#endif
-#ifndef VK_OEM_5
-#define VK_OEM_5 0xdc
-#endif
-#ifndef VK_OEM_6
-#define VK_OEM_6 0xdd
-#endif
-#ifndef VK_OEM_7
-#define VK_OEM_7 0xde
-#endif
-#ifndef VK_OEM_8
-#define VK_OEM_8 0xdf
-#endif
-#ifndef VK_OEM_102
-#define VK_OEM_102 0xe1
-#endif
-
 ROSDATA USHORT scancode_to_vk[] = {
   /* Numbers Row */
   /* - 00 - */
@@ -162,13 +125,7 @@ ROSDATA VK_TO_BIT modifier_keys[] = {
   { 0,          0 }
 };
 
-typedef struct _mymod {
-  PVOID mod_keys;
-  WORD maxmod;
-  BYTE mod_max[8];
-} INTERNAL_KBD_MODIFIERS;
-
-ROSDATA INTERNAL_KBD_MODIFIERS modifier_bits[] = {
+ROSDATA MODIFIERS modifier_bits = {
   modifier_keys,
   7,
   { 0, 1, 2, 3 ,0, 0,4,5} /* Modifier bit order, NONE, SHIFT, CTRL, SHIFT+CTRL,ALT(not used),SHIFT-ALT (not used), CTR+ALT, SHIFT-CTRL-ALT*/
@@ -180,112 +137,112 @@ ROSDATA INTERNAL_KBD_MODIFIERS modifier_bits[] = {
 ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = {
   /* Normal vs Shifted */
   /* The numbers */
-  { '1',       NOCAPS, '1', '!' },
-  { '2',       NOCAPS, '2', '\"'},
-  { '3',       NOCAPS, '3', 0x00a3},
-  { '5',       NOCAPS, '5', '%'},
-  { '7',       NOCAPS, '7', '&'},
-  { '8',       NOCAPS, '8', '*'},
-  { '9',       NOCAPS, '9', '('},
-  { '0',       NOCAPS, '0', ')'},
-  { VK_OEM_PLUS ,NOCAPS, '=', '+'},
+  { '1',       NOCAPS, {'1', '!'} },
+  { '2',       NOCAPS, {'2', '\"'} },
+  { '3',       NOCAPS, {'3', 0xa3} },
+  { '5',       NOCAPS, {'5', '%'} },
+  { '7',       NOCAPS, {'7', '&'} },
+  { '8',       NOCAPS, {'8', '*'} },
+  { '9',       NOCAPS, {'9', '('} },
+  { '0',       NOCAPS, {'0', ')'} },
+  { VK_OEM_PLUS ,NOCAPS, {'=', '+'} },
   /* First letter row */
-  { 'Q',         CAPS,   'q', 'Q' },
-  { 'W',         CAPS,   'w', 'W' },
-  { 'R',         CAPS,   'r', 'R' },
-  { 'T',         CAPS,   't', 'T' },
-  { 'Y',         CAPS,   'y', 'Y' },
-  { 'P',         CAPS,   'p', 'P' },
+  { 'Q',         CAPS,   {'q', 'Q'} },
+  { 'W',         CAPS,   {'w', 'W'} },
+  { 'E',         CAPS,   {'e', 'E'} },
+  { 'R',         CAPS,   {'r', 'R'} },
+  { 'T',         CAPS,   {'t', 'T'} },
+  { 'Y',         CAPS,   {'y', 'Y'} },
+  { 'P',         CAPS,   {'p', 'P'} },
   /* Second letter row */
-  { 'S',         CAPS,   's', 'S' },
-  { 'D',         CAPS,   'd', 'D' },
-  { 'F',         CAPS,   'f', 'F' },
-  { 'G',         CAPS,   'g', 'G' },
-  { 'H',         CAPS,   'h', 'H' },
-  { 'J',         CAPS,   'j', 'J' },
-  { 'K',         CAPS,   'k', 'K' },
-  { 'L',         CAPS,   'l', 'L' },
-  { VK_OEM_1 ,NOCAPS, ';', ':' },
+  { 'S',         CAPS,   {'s', 'S'} },
+  { 'D',         CAPS,   {'d', 'D'} },
+  { 'F',         CAPS,   {'f', 'F'} },
+  { 'G',         CAPS,   {'g', 'G'} },
+  { 'H',         CAPS,   {'h', 'H'} },
+  { 'J',         CAPS,   {'j', 'J'} },
+  { 'K',         CAPS,   {'k', 'K'} },
+  { 'L',         CAPS,   {'l', 'L'} },
+  { VK_OEM_1 ,NOCAPS, {';', ':'} },
   
   /* Third letter row */
-  { 'Z',         CAPS,   'z', 'Z' },
-  { 'X',         CAPS,   'x', 'X' },
-  { 'C',         CAPS,   'c', 'C' },
-  { 'V',         CAPS,   'v', 'V' },
-  { 'B',         CAPS,   'b', 'B' },
-  { 'N',         CAPS,   'n', 'N' },
-  { 'M',         CAPS,   'm', 'M' },
-  { VK_OEM_COMMA,      NOCAPS, ',', '<' },
-  { VK_OEM_PERIOD,     NOCAPS, '.', '>' },
-  { VK_OEM_2,          NOCAPS, '/', '?' },
+  { 'Z',         CAPS,   {'z', 'Z'} },
+  { 'X',         CAPS,   {'x', 'X'} },
+  { 'C',         CAPS,   {'c', 'C'} },
+  { 'V',         CAPS,   {'v', 'V'} },
+  { 'B',         CAPS,   {'b', 'B'} },
+  { 'N',         CAPS,   {'n', 'N'} },
+  { 'M',         CAPS,   {'m', 'M'} },
+  { VK_OEM_COMMA,      NOCAPS, {',', '<'} },
+  { VK_OEM_PERIOD,     NOCAPS, {'.', '>'} },
+  { VK_OEM_2,          NOCAPS, {'/', '?'} },
 
   
   /* Keys that do not have shift states */
-  { VK_TAB,            NOCAPS, '\t','\t'},
-  { VK_ADD,            NOCAPS, '+', '+' },
-  { VK_SUBTRACT,       NOCAPS, '-', '-' },
-  { VK_MULTIPLY,       NOCAPS, '*', '*' },
-  { VK_DIVIDE,         NOCAPS, '/', '/' },
-  { VK_ESCAPE,         NOCAPS, '\x1b','\x1b' },
-  { VK_SPACE,          NOCAPS, ' ', ' ' },
-  { 0, 0, 0, 0 }
+  { VK_TAB,            NOCAPS, {'\t','\t'} },
+  { VK_ADD,            NOCAPS, {'+', '+'} },
+  { VK_SUBTRACT,       NOCAPS, {'-', '-'} },
+  { VK_MULTIPLY,       NOCAPS, {'*', '*'} },
+  { VK_DIVIDE,         NOCAPS, {'/', '/'} },
+  { VK_ESCAPE,         NOCAPS, {'\x1b','\x1b'} },
+  { VK_SPACE,          NOCAPS, {' ', ' '} },
+  { 0, 0 }
 };
 
 ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = {
   /* Normal, Shifted, Ctrl */
   /* Legacy (telnet-style) ascii escapes */
-  { VK_OEM_4, NOCAPS, '[', '{', 0x001b},
-  { VK_OEM_6, NOCAPS, ']', '}', 0x001d},
-  { VK_OEM_7, NOCAPS, '#', '~', 0x001c},
-  { VK_OEM_5, 0, '\\', '|', 0x001c},
-  { VK_RETURN,0, '\r', '\r', '\n' },
-  { 0, 0, 0, 0, 0 }
+  { VK_OEM_4, NOCAPS, {'[', '{', 0x1b} },
+  { VK_OEM_6, NOCAPS, {']', '}', 0x1d} },
+  { VK_OEM_7, NOCAPS, {'#', '~', 0x1c} },
+  { VK_OEM_5, 0, {'\\', '|', 0x1c} },
+  { VK_RETURN, 0, {'\r', '\r', '\n'} },
+  { 0, 0 }
 };
 
 ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = {
   /* Normal, Shifted, Ctrl, C-Shift */
   /* Legacy Ascii generators */
   
- { '6', NOCAPS, '6', '^', WCH_NONE, 0x1e },
- { VK_OEM_MINUS, NOCAPS, '-', '_', WCH_NONE,0x1f },
- { VK_OEM_3, NOCAPS, '\'', '@', WCH_NONE, 0x0000 },
- { 0, 0, 0, 0, 0, 0 }
+ { '6', NOCAPS, {'6', '^', WCH_NONE, 0x1e} },
+ { VK_OEM_MINUS, NOCAPS, {'-', '_', WCH_NONE, 0x1f} },
+ { VK_OEM_3, NOCAPS, {'\'', '@', WCH_NONE, 0x00} },
+ { 0, 0 }
 };
 
 ROSDATA VK_TO_WCHARS5 key_to_chars_5mod[] = {
   /* Normal, Shifted, Ctrl, Sh-Ctrl,Sh-Alt,Ctl-Alt */
 /* Ctrl-sh-6 generates RS */
-  {VK_OEM_8, NOCAPS, '`', 0x00ac,  WCH_NONE, WCH_NONE, 0x00a6},
-  { '4', NOCAPS, '4', '$', WCH_NONE, WCH_NONE, 0x20ac},
-  { 0, 0, 0, 0, 0, 0, 0 }
+  {VK_OEM_8, NOCAPS, {'`', 0x00ac,  WCH_NONE, WCH_NONE, 0xa6} },
+  { '4', NOCAPS, {'4', '$', WCH_NONE, WCH_NONE, 0x20ac} },
+  { 0, 0 }
 };
 
 ROSDATA VK_TO_WCHARS6 key_to_chars_6mod[] = {
   /* Normal, Shifted, Ctrl, Sh-Ctrl,Sh-Alt,Ctl-Alt,Ctl-Sh-Alt */
  
-  { 'E',         CAPS,   'e', 'E', WCH_NONE, WCH_NONE, 0x00e9, 0x00c9},
-  { 'U',         CAPS,   'u', 'U', WCH_NONE, WCH_NONE, 0x00fa, 0x00da},
-  { 'I',         CAPS,    'i', 'I', WCH_NONE, WCH_NONE, 0x00ed, 0x00cd},
-  { 'O',         CAPS,   'o', 'O', WCH_NONE, WCH_NONE, 0x00f3, 0x00d3},
-  { 'A',         CAPS,   'a', 'A', WCH_NONE, WCH_NONE, 0x00e1, 0x00c1},
+  { 'E',         CAPS,   {'e', 'E', WCH_NONE, WCH_NONE, 0x00e9, 0x00c9} },
+  { 'U',         CAPS,   {'u', 'U', WCH_NONE, WCH_NONE, 0x00fa, 0x00da} },
+  { 'I',         CAPS,   {'i', 'I', WCH_NONE, WCH_NONE, 0x00ed, 0x00cd} },
+  { 'O',         CAPS,   {'o', 'O', WCH_NONE, WCH_NONE, 0x00f3, 0x00d3} },
+  { 'A',         CAPS,   {'a', 'A', WCH_NONE, WCH_NONE, 0x00e1, 0x00c1} },
   { 0, 0 }
 };
 
 ROSDATA VK_TO_WCHARS1 keypad_numbers[] = {
-  { VK_DECIMAL, 0, '.' },
-  { VK_NUMPAD0, 0, '0' },
-  { VK_NUMPAD1, 0, '1' },
-  { VK_NUMPAD2, 0, '2' },
-  { VK_NUMPAD3, 0, '3' },
-  { VK_NUMPAD4, 0, '4' },
-  { VK_NUMPAD5, 0, '5' },
-  { VK_NUMPAD6, 0, '6' },
-  { VK_NUMPAD7, 0, '7' },
-  { VK_NUMPAD8, 0, '8' },
-  { VK_NUMPAD9, 0, '9' },
-  { VK_BACK,    0, '\010' },
-  { 0, 0, 0 }
+  { VK_DECIMAL, 0, {'.'} },
+  { VK_NUMPAD0, 0, {'0'} },
+  { VK_NUMPAD1, 0, {'1'} },
+  { VK_NUMPAD2, 0, {'2'} },
+  { VK_NUMPAD3, 0, {'3'} },
+  { VK_NUMPAD4, 0, {'4'} },
+  { VK_NUMPAD5, 0, {'5'} },
+  { VK_NUMPAD6, 0, {'6'} },
+  { VK_NUMPAD7, 0, {'7'} },
+  { VK_NUMPAD8, 0, {'8'} },
+  { VK_NUMPAD9, 0, {'9'} },
+  { VK_BACK,    0, {'\010'} },
+  { 0, 0 }
 };
 
 #define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) }
@@ -385,7 +342,7 @@ ROSDATA VSC_LPWSTR extended_key_names[] = {
 /* Finally, the master table */
 ROSDATA KBDTABLES keyboard_layout_table = {
   /* modifier assignments */
-  (PMODIFIERS)&modifier_bits,
+  &modifier_bits,
   
   /* character from vk tables */
   vk_to_wchar_master_table,
diff --git a/reactos/lib/kbdus/Jamfile b/reactos/lib/kbdus/Jamfile
deleted file mode 100644 (file)
index 442641d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-SubDir ROS_TOP lib kbdus ;
-
-# This stuff should actually be moved to Jamrules
-# in order to more easily support other compilers
-CCFLAGS += -Wall -fno-builtin ;
-
-# NOTE - I'm no Jam expert, yet. This stuff should be
-# abstracted into the Jamrules file.
-LINKFLAGS = -nostartfiles -nostdlib -shared ;
-LINKFLAGS += -Wl,--image-base,0x77F00000 -lgcc ;
-
-SRCS = kbdus
-
-SharedLibrary kbdus : $(SRCS) ;
-LINKLIBS = ;
index 78cfc2a..6176cf4 100644 (file)
 #ifdef _M_IA64
 #define ROSDATA static __declspec(allocate(".data"))
 #else
+#ifdef _MSC_VER
 #pragma data_seg(".data")
 #define ROSDATA static
+#else
+#define ROSDATA static __attribute__((section(".data")))
+#endif
 #endif
 
 #define VK_EMPTY 0xff   /* The non-existent VK */
 #define KNUMS    0xc00  /* Special + number pad */
 #define KMEXT    0x300  /* Multi + ext */
 
-/* Thanks to http://asp.flaaten.dk/pforum/keycode/keycode.htm */
-#ifndef VK_OEM_1
-#define VK_OEM_1  0xba
-#endif
-#ifndef VK_OEM_PLUS
-#define VK_OEM_PLUS 0xbb
-#endif
-#ifndef VK_OEM_COMMA
-#define VK_OEM_COMMA 0xbc
-#endif
-#ifndef VK_OEM_MINUS
-#define VK_OEM_MINUS 0xbd
-#endif
-#ifndef VK_OEM_PERIOD
-#define VK_OEM_PERIOD 0xbe
-#endif
-#ifndef VK_OEM_2
-#define VK_OEM_2 0xbf
-#endif
-#ifndef VK_OEM_3
-#define VK_OEM_3 0xc0
-#endif
-#ifndef VK_OEM_4
-#define VK_OEM_4 0xdb
-#endif
-#ifndef VK_OEM_5
-#define VK_OEM_5 0xdc
-#endif
-#ifndef VK_OEM_6
-#define VK_OEM_6 0xdd
-#endif
-#ifndef VK_OEM_7
-#define VK_OEM_7 0xde
-#endif
-#ifndef VK_OEM_8
-#define VK_OEM_8 0xdf
-#endif
-#ifndef VK_OEM_102
-#define VK_OEM_102 0xe1
-#endif
-
 ROSDATA USHORT scancode_to_vk[] = {
   /* Numbers Row */
   /* - 00 - */
@@ -158,13 +121,7 @@ ROSDATA VK_TO_BIT modifier_keys[] = {
   { 0,          0 }
 };
 
-typedef struct _mymod {
-  PVOID mod_keys;
-  WORD maxmod;
-  BYTE mod_max[4];
-} INTERNAL_KBD_MODIFIERS;
-
-ROSDATA INTERNAL_KBD_MODIFIERS modifier_bits[] = {
+ROSDATA MODIFIERS modifier_bits = {
   modifier_keys,
   3,
   { 0, 1, 2, 3 } /* Modifier bit order, NONE, SHIFT, CTRL, ALT */
@@ -176,98 +133,98 @@ ROSDATA INTERNAL_KBD_MODIFIERS modifier_bits[] = {
 ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = {
   /* Normal vs Shifted */
   /* The numbers */
-  { '1',         NOCAPS, '1', '!' },
+  { '1',         NOCAPS, {'1', '!'} },
   /* Ctrl-2 generates NUL */
-  { '3',         NOCAPS, '3', '#' },
-  { '4',         NOCAPS, '4', '$' },
-  { '5',         NOCAPS, '5', '%' },
+  { '3',         NOCAPS, {'3', '#'} },
+  { '4',         NOCAPS, {'4', '$'} },
+  { '5',         NOCAPS, {'5', '%'} },
   /* Ctrl-6 generates RS */
-  { '7',         NOCAPS, '7', '&' },
-  { '8',         NOCAPS, '8', '*' },
-  { '9',         NOCAPS, '9', '(' },
-  { '0',         NOCAPS, '0', ')' },
+  { '7',         NOCAPS, {'7', '&'} },
+  { '8',         NOCAPS, {'8', '*'} },
+  { '9',         NOCAPS, {'9', '('} },
+  { '0',         NOCAPS, {'0', ')'} },
   /* First letter row */
-  { 'Q',         CAPS,   'q', 'Q' },
-  { 'W',         CAPS,   'w', 'W' },
-  { 'E',         CAPS,   'e', 'E' },
-  { 'R',         CAPS,   'r', 'R' },
-  { 'T',         CAPS,   't', 'T' },
-  { 'Y',         CAPS,   'y', 'Y' },
-  { 'U',         CAPS,   'u', 'U' },
-  { 'I',         CAPS,   'i', 'I' },
-  { 'O',         CAPS,   'o', 'O' },
-  { 'P',         CAPS,   'p', 'P' },
+  { 'Q',         CAPS,   {'q', 'Q'} },
+  { 'W',         CAPS,   {'w', 'W'} },
+  { 'E',         CAPS,   {'e', 'E'} },
+  { 'R',         CAPS,   {'r', 'R'} },
+  { 'T',         CAPS,   {'t', 'T'} },
+  { 'Y',         CAPS,   {'y', 'Y'} },
+  { 'U',         CAPS,   {'u', 'U'} },
+  { 'I',         CAPS,   {'i', 'I'} },
+  { 'O',         CAPS,   {'o', 'O'} },
+  { 'P',         CAPS,   {'p', 'P'} },
   /* Second letter row */
-  { 'A',         CAPS,   'a', 'A' },
-  { 'S',         CAPS,   's', 'S' },
-  { 'D',         CAPS,   'd', 'D' },
-  { 'F',         CAPS,   'f', 'F' },
-  { 'G',         CAPS,   'g', 'G' },
-  { 'H',         CAPS,   'h', 'H' },
-  { 'J',         CAPS,   'j', 'J' },
-  { 'K',         CAPS,   'k', 'K' },
-  { 'L',         CAPS,   'l', 'L' },
+  { 'A',         CAPS,   {'a', 'A'} },
+  { 'S',         CAPS,   {'s', 'S'} },
+  { 'D',         CAPS,   {'d', 'D'} },
+  { 'F',         CAPS,   {'f', 'F'} },
+  { 'G',         CAPS,   {'g', 'G'} },
+  { 'H',         CAPS,   {'h', 'H'} },
+  { 'J',         CAPS,   {'j', 'J'} },
+  { 'K',         CAPS,   {'k', 'K'} },
+  { 'L',         CAPS,   {'l', 'L'} },
   /* Third letter row */
-  { 'Z',         CAPS,   'z', 'Z' },
-  { 'X',         CAPS,   'x', 'X' },
-  { 'C',         CAPS,   'c', 'C' },
-  { 'V',         CAPS,   'v', 'V' },
-  { 'B',         CAPS,   'b', 'B' },
-  { 'N',         CAPS,   'n', 'N' },
-  { 'M',         CAPS,   'm', 'M' },
+  { 'Z',         CAPS,   {'z', 'Z'} },
+  { 'X',         CAPS,   {'x', 'X'} },
+  { 'C',         CAPS,   {'c', 'C'} },
+  { 'V',         CAPS,   {'v', 'V'} },
+  { 'B',         CAPS,   {'b', 'B'} },
+  { 'N',         CAPS,   {'n', 'N'} },
+  { 'M',         CAPS,   {'m', 'M'} },
 
   /* Specials */
   /* Ctrl-_ generates US */
-  { VK_OEM_PLUS    ,NOCAPS, '=', '+' },
-  { VK_OEM_1       ,NOCAPS, ';', ':' },
-  { VK_OEM_7       ,NOCAPS, '\'','\"'},
-  { VK_OEM_3       ,NOCAPS, '`', '~' },
-  { VK_OEM_COMMA   ,NOCAPS, ',', '<' },
-  { VK_OEM_PERIOD  ,NOCAPS, '.', '>' },
-  { VK_OEM_2       ,NOCAPS, '/', '?' },
+  { VK_OEM_PLUS    ,NOCAPS, {'=', '+'} },
+  { VK_OEM_1       ,NOCAPS, {';', ':'} },
+  { VK_OEM_7       ,NOCAPS, {'\'','\"'} },
+  { VK_OEM_3       ,NOCAPS, {'`', '~'} },
+  { VK_OEM_COMMA   ,NOCAPS, {',', '<'} },
+  { VK_OEM_PERIOD  ,NOCAPS, {'.', '>'} },
+  { VK_OEM_2       ,NOCAPS, {'/', '?'} },
   /* Keys that do not have shift states */
-  { VK_TAB     ,NOCAPS, '\t','\t'},
-  { VK_ADD     ,NOCAPS, '+', '+' },
-  { VK_SUBTRACT,NOCAPS, '-', '-' },
-  { VK_MULTIPLY,NOCAPS, '*', '*' },
-  { VK_DIVIDE  ,NOCAPS, '/', '/' },
-  { VK_ESCAPE  ,NOCAPS, '\x1b','\x1b' },
-  { VK_SPACE   ,NOCAPS, ' ', ' ' },
+  { VK_TAB     ,NOCAPS, {'\t','\t'} },
+  { VK_ADD     ,NOCAPS, {'+', '+'} },
+  { VK_SUBTRACT,NOCAPS, {'-', '-'} },
+  { VK_MULTIPLY,NOCAPS, {'*', '*'} },
+  { VK_DIVIDE  ,NOCAPS, {'/', '/'} },
+  { VK_ESCAPE  ,NOCAPS, {'\x1b','\x1b'} },
+  { VK_SPACE   ,NOCAPS, {' ', ' '} },
   { 0, 0 }
 };
 
 ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = {
   /* Normal, Shifted, Ctrl */
   /* Legacy (telnet-style) ascii escapes */
-  { VK_OEM_4, 0, '[', '{', 0x1b /* ESC */ },
-  { VK_OEM_6, 0, ']', '}', 0x1d /* GS */ },
-  { VK_OEM_5, 0, '\\','|', 0x1c /* FS */ },
-  { VK_RETURN,0, '\r', '\r', '\n' },
+  { VK_OEM_4, 0, {'[', '{', 0x1b /* ESC */} },
+  { VK_OEM_6, 0, {']', '}', 0x1d /* GS */} },
+  { VK_OEM_5, 0, {'\\','|', 0x1c /* FS */} },
+  { VK_RETURN,0, {'\r', '\r', '\n'} },
   { 0,0 }
 };
 
 ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = {
   /* Normal, Shifted, Ctrl, C-S-x */
   /* Legacy Ascii generators */
-  { '2', NOCAPS, '2', '@', WCH_NONE, 0 },
-  { '6', NOCAPS, '6', '^', WCH_NONE, 0x1e /* RS */ },
-  { VK_OEM_MINUS, NOCAPS, '-', '_', WCH_NONE, 0x1f /* US */ },
+  { '2', NOCAPS, {'2', '@', WCH_NONE, 0} },
+  { '6', NOCAPS, {'6', '^', WCH_NONE, 0x1e /* RS */} },
+  { VK_OEM_MINUS, NOCAPS, {'-', '_', WCH_NONE, 0x1f /* US */} },
   { 0, 0 }
 };
 
 ROSDATA VK_TO_WCHARS1 keypad_numbers[] = {
-  { VK_NUMPAD0, 0, '0' },
-  { VK_NUMPAD1, 0, '1' },
-  { VK_NUMPAD2, 0, '2' },
-  { VK_NUMPAD3, 0, '3' },
-  { VK_NUMPAD4, 0, '4' },
-  { VK_NUMPAD5, 0, '5' },
-  { VK_NUMPAD6, 0, '6' },
-  { VK_NUMPAD7, 0, '7' },
-  { VK_NUMPAD8, 0, '8' },
-  { VK_NUMPAD9, 0, '9' },
-  { VK_DECIMAL, 0, '.' },
-  { VK_BACK,    0, '\010' },
+  { VK_NUMPAD0, 0, {'0'} },
+  { VK_NUMPAD1, 0, {'1'} },
+  { VK_NUMPAD2, 0, {'2'} },
+  { VK_NUMPAD3, 0, {'3'} },
+  { VK_NUMPAD4, 0, {'4'} },
+  { VK_NUMPAD5, 0, {'5'} },
+  { VK_NUMPAD6, 0, {'6'} },
+  { VK_NUMPAD7, 0, {'7'} },
+  { VK_NUMPAD8, 0, {'8'} },
+  { VK_NUMPAD9, 0, {'9'} },
+  { VK_DECIMAL, 0, {'.'} },
+  { VK_BACK,    0, {'\010'} },
   { 0,0 }
 };
 
@@ -366,7 +323,7 @@ ROSDATA VSC_LPWSTR extended_key_names[] = {
 /* Finally, the master table */
 ROSDATA KBDTABLES keyboard_layout_table = {
   /* modifier assignments */
-  (PMODIFIERS)&modifier_bits,
+  &modifier_bits,
   
   /* character from vk tables */
   vk_to_wchar_master_table,