add const for keymap data

This commit is contained in:
Vincent Wei
2019-03-07 19:09:34 +08:00
parent adab30261c
commit b82128091e
10 changed files with 160 additions and 160 deletions
+19 -19
View File
@@ -49,7 +49,7 @@
#ifdef _MGKBDLAYOUT_DE
static u_short plain_map[NR_KEYS] = {
static const u_short plain_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
0xf037, 0xf038, 0xf039, 0xf030, /*0xf05c*/0xf0df, /*0xf027*/0xf0b4, 0xf07f, 0xf009,
0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb7a, 0xfb75, 0xfb69,
@@ -68,7 +68,7 @@ static u_short plain_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_map[NR_KEYS] = {
static const u_short shift_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf021, 0xf022, /*0xf023*/0xf0a7, 0xf024, 0xf025, 0xf026,
0xf02f, 0xf028, 0xf029, 0xf03d, 0xf03f, 0xf060, 0xf07f, 0xf009,
0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb5a, 0xfb55, 0xfb49,
@@ -87,7 +87,7 @@ static u_short shift_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_map[NR_KEYS] = {
static const u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf032, 0xf033, 0xf200, 0xf200, 0xf200,
0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf200, 0xf200, 0xf200, 0xf200,
0xf040, 0xfb77, 0xf0a4, 0xfb72, 0xfb74, 0xfb7a, 0xfb75, 0xfb69,
@@ -106,7 +106,7 @@ static u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_map[NR_KEYS] = {
static const u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf000, 0xf01b, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf01a, 0xf015, 0xf009,
@@ -125,7 +125,7 @@ static u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_ctrl_map[NR_KEYS] = {
static const u_short shift_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf01a, 0xf015, 0xf009,
@@ -144,7 +144,7 @@ static u_short shift_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_ctrl_map[NR_KEYS] = {
static const u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf01d, 0xf200, 0xf01c, 0xf200, 0xf200, 0xf200,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf01a, 0xf015, 0xf009,
@@ -163,7 +163,7 @@ static u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short alt_map[NR_KEYS] = {
static const u_short alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
0xf837, 0xf838, 0xf839, 0xf830, 0xf85c, 0xf827, 0xf87f, 0xf809,
0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf87a, 0xf875, 0xf869,
@@ -182,7 +182,7 @@ static u_short alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_alt_map[NR_KEYS] = {
static const u_short shift_alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf821, 0xf822, 0xf823, 0xf824, 0xf825, 0xf826,
0xf82f, 0xf828, 0xf829, 0xf83d, 0xf83f, 0xf860, 0xf87f, 0xf809,
0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf85a, 0xf855, 0xf849,
@@ -201,7 +201,7 @@ static u_short shift_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_alt_map[NR_KEYS] = {
static const u_short altgr_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf832, 0xf833, 0xf200, 0xf200, 0xf200,
0xf87b, 0xf85b, 0xf85d, 0xf87d, 0xf200, 0xf200, 0xf200, 0xf200,
0xf840, 0xf877, 0xf865, 0xf872, 0xf874, 0xf87a, 0xf875, 0xf869,
@@ -220,7 +220,7 @@ static u_short altgr_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_alt_map[NR_KEYS] = {
static const u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf800, 0xf81b, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf81a, 0xf815, 0xf809,
@@ -239,7 +239,7 @@ static u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static ushort *key_maps[MAX_NR_KEYMAPS] = {
static const ushort *key_maps[MAX_NR_KEYMAPS] = {
plain_map, shift_map, altgr_map, 0,
ctrl_map, shift_ctrl_map, altgr_ctrl_map, 0,
alt_map, shift_alt_map, altgr_alt_map, 0,
@@ -248,11 +248,11 @@ static ushort *key_maps[MAX_NR_KEYMAPS] = {
/*
* Philosophy: most people do not define more strings, but they who do
* often want quite a lot of string space. So, we statically allocate
* often want quite a lot of string space. So, we static constally allocate
* the default and allocate dynamically in chunks of 512 bytes.
*/
static char func_buf[] = {
static const char func_buf[] = {
'\033', '[', '[', 'A', 0,
'\033', '[', '[', 'B', 0,
'\033', '[', '[', 'C', 0,
@@ -283,7 +283,7 @@ static char func_buf[] = {
'\033', '[', 'P', 0,
};
static char *func_table[MAX_NR_FUNC] = {
static const char *func_table[MAX_NR_FUNC] = {
func_buf + 0,
func_buf + 5,
func_buf + 10,
@@ -326,7 +326,7 @@ unsigned int accent_table_size = 0;
#else
static struct kbdiacr accent_table[MAX_DIACR] = {
static const struct kbdiacr accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'},
{'^', 'A', '\302'}, {'^', 'a', '\342'},
@@ -365,17 +365,17 @@ static struct kbdiacr accent_table[MAX_DIACR] = {
{'`', '`', '\140'}, {'i', 'j', '\377'},
};
static unsigned int accent_table_size = 68;
static const unsigned int accent_table_size = 68;
#endif
void init_de_kbd_layout (ushort*** key_maps_p, struct kbdiacr** accent_table_p,
unsigned int* accent_table_size_p, char*** func_table_p)
{
*key_maps_p = key_maps;
*accent_table_p = accent_table;
*key_maps_p = (ushort**)key_maps;
*accent_table_p = (struct kbdiacr*)accent_table;
*accent_table_size_p = accent_table_size;
*func_table_p = func_table;
*func_table_p = (char**)func_table;
}
#endif /* _MGKBDLAYOUT_DE */
+20 -20
View File
@@ -47,7 +47,7 @@
#ifdef _MGKBDLAYOUT_DELATIN1
static u_short plain_map[NR_KEYS] = {
static const u_short plain_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
0xf037, 0xf038, 0xf039, 0xf030, 0xf0df, 0xf401, 0xf07f, 0xf009,
0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb7a, 0xfb75, 0xfb69,
@@ -66,7 +66,7 @@ static u_short plain_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_map[NR_KEYS] = {
static const u_short shift_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf021, 0xf022, 0xf0a7, 0xf024, 0xf025, 0xf026,
0xf02f, 0xf028, 0xf029, 0xf03d, 0xf03f, 0xf400, 0xf07f, 0xf009,
0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb5a, 0xfb55, 0xfb49,
@@ -85,7 +85,7 @@ static u_short shift_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_map[NR_KEYS] = {
static const u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf0b9, 0xf0b2, 0xf0b3, 0xf200, 0xf200, 0xf200,
0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf05c, 0xf200, 0xf200, 0xf200,
0xf040, 0xfb77, 0xf0a4, 0xf0ae, 0xfb74, 0xfb7a, 0xfb75, 0xfb69,
@@ -104,7 +104,7 @@ static u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_altgr_map[NR_KEYS] = {
static const u_short shift_altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf0a1, 0xf000, 0xf01b, 0xf200, 0xf200, 0xf200,
0xf200, 0xf0ab, 0xf0bb, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb5a, 0xfb55, 0xfb49,
@@ -123,7 +123,7 @@ static u_short shift_altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_map[NR_KEYS] = {
static const u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf01a, 0xf015, 0xf009,
@@ -142,7 +142,7 @@ static u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_ctrl_map[NR_KEYS] = {
static const u_short shift_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf01a, 0xf015, 0xf009,
@@ -161,7 +161,7 @@ static u_short shift_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_ctrl_map[NR_KEYS] = {
static const u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf01d, 0xf200, 0xf01c, 0xf200, 0xf200, 0xf200,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf01a, 0xf015, 0xf009,
@@ -180,7 +180,7 @@ static u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short alt_map[NR_KEYS] = {
static const u_short alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
0xf837, 0xf838, 0xf839, 0xf830, 0xf200, 0xf8b4, 0xf87f, 0xf809,
0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf87a, 0xf875, 0xf869,
@@ -199,7 +199,7 @@ static u_short alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_alt_map[NR_KEYS] = {
static const u_short shift_alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf821, 0xf822, 0xf200, 0xf824, 0xf825, 0xf826,
0xf82f, 0xf828, 0xf829, 0xf83d, 0xf83f, 0xf860, 0xf87f, 0xf809,
0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf85a, 0xf855, 0xf849,
@@ -218,7 +218,7 @@ static u_short shift_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_alt_map[NR_KEYS] = {
static const u_short altgr_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf87b, 0xf85b, 0xf85d, 0xf87d, 0xf85c, 0xf200, 0xf200, 0xf200,
0xf840, 0xf877, 0xf865, 0xf872, 0xf874, 0xf87a, 0xf875, 0xf869,
@@ -237,7 +237,7 @@ static u_short altgr_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_alt_map[NR_KEYS] = {
static const u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf81a, 0xf815, 0xf809,
@@ -256,7 +256,7 @@ static u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static ushort *key_maps[MAX_NR_KEYMAPS] = {
static const ushort *key_maps[MAX_NR_KEYMAPS] = {
plain_map, shift_map, altgr_map, shift_altgr_map,
ctrl_map, shift_ctrl_map, altgr_ctrl_map, 0,
alt_map, shift_alt_map, altgr_alt_map, 0,
@@ -265,11 +265,11 @@ static ushort *key_maps[MAX_NR_KEYMAPS] = {
/*
* Philosophy: most people do not define more strings, but they who do
* often want quite a lot of string space. So, we statically allocate
* often want quite a lot of string space. So, we static constally allocate
* the default and allocate dynamically in chunks of 512 bytes.
*/
static char func_buf[] = {
static const char func_buf[] = {
'\033', '[', '[', 'A', 0,
'\033', '[', '[', 'B', 0,
'\033', '[', '[', 'C', 0,
@@ -300,7 +300,7 @@ static char func_buf[] = {
'\033', '[', 'P', 0,
};
static char *func_table[MAX_NR_FUNC] = {
static const char *func_table[MAX_NR_FUNC] = {
func_buf + 0,
func_buf + 5,
func_buf + 10,
@@ -343,7 +343,7 @@ unsigned int accent_table_size = 0;
#else
static struct kbdiacr accent_table[MAX_DIACR] = {
static const struct kbdiacr accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'},
{'^', 'A', '\302'}, {'^', 'a', '\342'},
@@ -380,17 +380,17 @@ static struct kbdiacr accent_table[MAX_DIACR] = {
{'s', 'z', '\337'}, {'i', 'j', '\377'},
};
static unsigned int accent_table_size = 68;
static const unsigned int accent_table_size = 68;
#endif
void init_delatin1_kbd_layout (ushort*** key_maps_p, struct kbdiacr** accent_table_p,
unsigned int* accent_table_size_p, char*** func_table_p)
{
*key_maps_p = key_maps;
*accent_table_p = accent_table;
*key_maps_p = (ushort**)key_maps;
*accent_table_p = (struct kbdiacr*)accent_table;
*accent_table_size_p = accent_table_size;
*func_table_p = func_table;
*func_table_p = (char**)func_table;
}
#endif /* _MGKBDLAYOUT_DELATIN1 */
+4 -4
View File
@@ -38,7 +38,7 @@
#include "linux_keyboard.h"
#include "linux_kd.h"
u_short plain_map[NR_KEYS] = {
static u_short plain_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
0xf037, 0xf038, 0xf039, 0xf030, 0xf0df, 0xf027, 0xf07f, 0xf009,
0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb7a, 0xfb75, 0xfb69,
@@ -247,14 +247,14 @@ static u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
ushort *key_maps[MAX_NR_KEYMAPS] = {
static ushort *key_maps[MAX_NR_KEYMAPS] = {
plain_map, shift_map, altgr_map, shift_altgr_map,
ctrl_map, shift_ctrl_map, altgr_ctrl_map, 0,
alt_map, shift_alt_map, altgr_alt_map, 0,
ctrl_alt_map, 0
};
unsigned int keymap_count = 11;
static unsigned int keymap_count = 11;
/*
@@ -263,7 +263,7 @@ unsigned int keymap_count = 11;
* the default and allocate dynamically in chunks of 512 bytes.
*/
char func_buf[] = {
static char func_buf[] = {
'\033', '[', '[', 'A', 0,
'\033', '[', '[', 'B', 0,
'\033', '[', '[', 'C', 0,
+16 -16
View File
@@ -51,7 +51,7 @@
//typedef unsigned short u_short;
static u_short plain_map[NR_KEYS] = {
static const u_short plain_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -70,7 +70,7 @@ static u_short plain_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_map[NR_KEYS] = {
static const u_short shift_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
@@ -89,7 +89,7 @@ static u_short shift_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_map[NR_KEYS] = {
static const u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf040, 0xf200, 0xf024, 0xf200, 0xf200,
0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf05c, 0xf200, 0xf200, 0xf200,
0xfb71, 0xfb77, 0xf918, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -108,7 +108,7 @@ static u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_map[NR_KEYS] = {
static const u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01d, 0xf01e,
0xf01f, 0xf07f, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf200,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -127,7 +127,7 @@ static u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_ctrl_map[NR_KEYS] = {
static const u_short shift_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf200, 0xf200,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -146,7 +146,7 @@ static u_short shift_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short alt_map[NR_KEYS] = {
static const u_short alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
@@ -165,7 +165,7 @@ static u_short alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_alt_map[NR_KEYS] = {
static const u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
@@ -184,7 +184,7 @@ static u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static ushort *key_maps[MAX_NR_KEYMAPS] = {
static const ushort *key_maps[MAX_NR_KEYMAPS] = {
plain_map, shift_map, altgr_map, 0,
ctrl_map, shift_ctrl_map, 0, 0,
alt_map, 0, 0, 0,
@@ -193,11 +193,11 @@ static ushort *key_maps[MAX_NR_KEYMAPS] = {
/*
* Philosophy: most people do not define more strings, but they who do
* often want quite a lot of string space. So, we statically allocate
* often want quite a lot of string space. So, we static constally allocate
* the default and allocate dynamically in chunks of 512 bytes.
*/
static char func_buf[] = {
static const char func_buf[] = {
'\033', '[', '[', 'A', 0,
'\033', '[', '[', 'B', 0,
'\033', '[', '[', 'C', 0,
@@ -228,7 +228,7 @@ static char func_buf[] = {
'\033', '[', 'P', 0,
};
static char *func_table[MAX_NR_FUNC] = {
static const char *func_table[MAX_NR_FUNC] = {
func_buf + 0,
func_buf + 5,
func_buf + 10,
@@ -262,7 +262,7 @@ static char *func_table[MAX_NR_FUNC] = {
0,
};
static struct kbdiacr accent_table[MAX_DIACR] = {
static const struct kbdiacr accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'},
{'^', 'A', '\302'}, {'^', 'a', '\342'},
@@ -299,15 +299,15 @@ static struct kbdiacr accent_table[MAX_DIACR] = {
{'s', 'z', '\337'}, {'i', 'j', '\377'},
};
static unsigned int accent_table_size = 68;
static const unsigned int accent_table_size = 68;
void init_default_kbd_layout (ushort*** key_maps_p, struct kbdiacr** accent_table_p,
unsigned int* accent_table_size_p, char*** func_table_p)
{
*key_maps_p = key_maps;
*accent_table_p = accent_table;
*key_maps_p = (ushort**)key_maps;
*accent_table_p = (struct kbdiacr*)accent_table;
*accent_table_size_p = accent_table_size;
*func_table_p = func_table;
*func_table_p = (char**)func_table;
}
+17 -17
View File
@@ -47,7 +47,7 @@
#ifdef _MGKBDLAYOUT_ESCP850
static u_short plain_map[NR_KEYS] = {
static const u_short plain_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
0xf037, 0xf038, 0xf039, 0xf030, 0xf027, /*0xf0ad*/0xf0bf, 0xf07f, 0xf009,
0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -66,7 +66,7 @@ static u_short plain_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_map[NR_KEYS] = {
static const u_short shift_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf021, 0xf022, 0xf0fa, 0xf024, 0xf025, 0xf026,
0xf02f, 0xf028, 0xf029, 0xf03d, 0xf03f, /*0xf0a8*/0xf0a1, 0xf07f, 0xf009,
0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
@@ -85,7 +85,7 @@ static u_short shift_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_map[NR_KEYS] = {
static const u_short altgr_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf07c, 0xf040, 0xf023, 0xf07e, 0xf200, 0xfbaa,
0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf05c, 0xf07e, 0xf07f, 0xf009,
0xfb71, 0xfb77, 0xf0a4, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -104,7 +104,7 @@ static u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_map[NR_KEYS] = {
static const u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01d, 0xf01e,
0xf01f, 0xf07f, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf01f, 0xf009,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -123,7 +123,7 @@ static u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_ctrl_map[NR_KEYS] = {
static const u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf07f, 0xf009,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -142,7 +142,7 @@ static u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short alt_map[NR_KEYS] = {
static const u_short alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
@@ -161,7 +161,7 @@ static u_short alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_alt_map[NR_KEYS] = {
static const u_short shift_alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf821, 0xf822, 0xf200, 0xf824, 0xf825, 0xf826,
0xf82f, 0xf828, 0xf829, 0xf83d, 0xf83f, 0xf200, 0xf07f, 0xf809,
0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
@@ -180,7 +180,7 @@ static u_short shift_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_alt_map[NR_KEYS] = {
static const u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf200, 0xf800, 0xf81b, 0xf81c, 0xf81d, 0xf81e,
0xf81f, 0xf87f, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf07f, 0xf809,
0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
@@ -199,7 +199,7 @@ static u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static ushort *key_maps[MAX_NR_KEYMAPS] = {
static const ushort *key_maps[MAX_NR_KEYMAPS] = {
plain_map, shift_map, altgr_map, 0,
ctrl_map, 0, altgr_ctrl_map, 0,
alt_map, shift_alt_map, 0, 0,
@@ -208,11 +208,11 @@ static ushort *key_maps[MAX_NR_KEYMAPS] = {
/*
* Philosophy: most people do not define more strings, but they who do
* often want quite a lot of string space. So, we statically allocate
* often want quite a lot of string space. So, we static constally allocate
* the default and allocate dynamically in chunks of 512 bytes.
*/
static char func_buf[] = {
static const char func_buf[] = {
'\033', '[', '[', 'A', 0,
'\033', '[', '[', 'B', 0,
'\033', '[', '[', 'C', 0,
@@ -243,7 +243,7 @@ static char func_buf[] = {
'\033', '[', 'P', 0,
};
static char *func_table[MAX_NR_FUNC] = {
static const char *func_table[MAX_NR_FUNC] = {
func_buf + 0,
func_buf + 5,
func_buf + 10,
@@ -277,7 +277,7 @@ static char *func_table[MAX_NR_FUNC] = {
0,
};
static struct kbdiacr accent_table[MAX_DIACR] = {
static const struct kbdiacr accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'},
{'^', 'A', '\302'}, {'^', 'a', '\342'},
@@ -314,15 +314,15 @@ static struct kbdiacr accent_table[MAX_DIACR] = {
{'s', 'z', '\337'}, {'i', 'j', '\377'},
};
static unsigned int accent_table_size = 68;
static const unsigned int accent_table_size = 68;
void init_escp850_kbd_layout (ushort*** key_maps_p, struct kbdiacr** accent_table_p,
unsigned int* accent_table_size_p, char*** func_table_p)
{
*key_maps_p = key_maps;
*accent_table_p = accent_table;
*key_maps_p = (ushort**)key_maps;
*accent_table_p = (struct kbdiacr*)accent_table;
*accent_table_size_p = accent_table_size;
*func_table_p = func_table;
*func_table_p = (char**)func_table;
}
+17 -17
View File
@@ -47,7 +47,7 @@
#ifdef _MGKBDLAYOUT_ES
static u_short plain_map[NR_KEYS] = {
static const u_short plain_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
0xf037, 0xf038, 0xf039, 0xf030, 0xf027, 0xf0a1, 0xf07f, 0xf009,
0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -66,7 +66,7 @@ static u_short plain_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_map[NR_KEYS] = {
static const u_short shift_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf021, 0xf022, 0xf0b7, 0xf024, 0xf025, 0xf026,
0xf02f, 0xf028, 0xf029, 0xf03d, 0xf03f, 0xf0bf, 0xf07f, 0xf009,
0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
@@ -85,7 +85,7 @@ static u_short shift_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_map[NR_KEYS] = {
static const u_short altgr_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf07c, 0xf040, 0xf023, 0xf07e, 0xf200, 0xf0ac,
0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf05c, 0xf07e, 0xf07f, 0xf009,
0xfb71, 0xfb77, 0xf0a4, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -104,7 +104,7 @@ static u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_map[NR_KEYS] = {
static const u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01d, 0xf01e,
0xf01f, 0xf07f, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf01f, 0xf009,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -123,7 +123,7 @@ static u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_ctrl_map[NR_KEYS] = {
static const u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf07f, 0xf009,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -142,7 +142,7 @@ static u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short alt_map[NR_KEYS] = {
static const u_short alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
@@ -161,7 +161,7 @@ static u_short alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_alt_map[NR_KEYS] = {
static const u_short shift_alt_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf07f, 0xf009,
0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
@@ -180,7 +180,7 @@ static u_short shift_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_alt_map[NR_KEYS] = {
static const u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf07f, 0xf009,
0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
@@ -199,7 +199,7 @@ static u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static ushort *key_maps[MAX_NR_KEYMAPS] = {
static const ushort *key_maps[MAX_NR_KEYMAPS] = {
plain_map, shift_map, altgr_map, 0,
ctrl_map, 0, altgr_ctrl_map, 0,
alt_map, shift_alt_map, 0, 0,
@@ -208,11 +208,11 @@ static ushort *key_maps[MAX_NR_KEYMAPS] = {
/*
* Philosophy: most people do not define more strings, but they who do
* often want quite a lot of string space. So, we statically allocate
* often want quite a lot of string space. So, we static constally allocate
* the default and allocate dynamically in chunks of 512 bytes.
*/
static char func_buf[] = {
static const char func_buf[] = {
'\033', '[', '[', 'A', 0,
'\033', '[', '[', 'B', 0,
'\033', '[', '[', 'C', 0,
@@ -243,7 +243,7 @@ static char func_buf[] = {
'\033', '[', 'P', 0,
};
char *func_table[MAX_NR_FUNC] = {
static const char *func_table[MAX_NR_FUNC] = {
func_buf + 5,
func_buf + 10,
func_buf + 15,
@@ -285,7 +285,7 @@ unsigned int accent_table_size = 0;
#else
static struct kbdiacr accent_table[MAX_DIACR] = {
static const struct kbdiacr accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'},
{'^', 'A', '\302'}, {'^', 'a', '\342'},
@@ -322,17 +322,17 @@ static struct kbdiacr accent_table[MAX_DIACR] = {
{'s', 'z', '\337'}, {'i', 'j', '\377'},
};
static unsigned int accent_table_size = 68;
static const unsigned int accent_table_size = 68;
#endif
void init_es_kbd_layout (ushort*** key_maps_p, struct kbdiacr** accent_table_p,
unsigned int* accent_table_size_p, char*** func_table_p)
{
*key_maps_p = key_maps;
*accent_table_p = accent_table;
*key_maps_p = (ushort**)key_maps;
*accent_table_p = (struct kbdiacr*)accent_table;
*accent_table_size_p = accent_table_size;
*func_table_p = func_table;
*func_table_p = (char**)func_table;
}
#endif /* _MGKBDLAYOUT_ES */
+18 -18
View File
@@ -47,7 +47,7 @@
#ifdef _MGKBDLAYOUT_FR
static u_short plain_map[NR_KEYS] = {
static const u_short plain_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf026, /*0xf07b*/0xf0e9, 0xf022, 0xf027, 0xf028, 0xf02d,
/*0xf07d*/0xf0e8, 0xf05f, /*0xf02f*/0xf0e7, /*0xf040*/0xf0e0, 0xf029, 0xf03d, 0xf07f, 0xf009,
0xfb61, 0xfb7a, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -66,7 +66,7 @@ static u_short plain_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_map[NR_KEYS] = {
static const u_short shift_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
0xf037, 0xf038, 0xf039, 0xf030, /*0xf05d*/0xf0b0, 0xf02b, 0xf07f, 0xf009,
0xfb41, 0xfb5a, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
@@ -85,7 +85,7 @@ static u_short shift_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_map[NR_KEYS] = {
static const u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf07e, 0xf023, 0xf07b, 0xf05b, 0xf07c,
0xf060, 0xf05c, 0xf05e, 0xf040, 0xf05d, 0xf07d, 0xf200, 0xf200,
0xfb61, 0xfb7a, 0xf0a4, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -104,7 +104,7 @@ static u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_map[NR_KEYS] = {
static const u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01d, 0xf01e,
0xf01f, 0xf07f, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf200, 0xf200,
0xf001, 0xf01a, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -123,7 +123,7 @@ static u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_ctrl_map[NR_KEYS] = {
static const u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf001, 0xf01a, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -142,7 +142,7 @@ static u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short alt_map[NR_KEYS] = {
static const u_short alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
0xf861, 0xf87a, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
@@ -161,7 +161,7 @@ static u_short alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_alt_map[NR_KEYS] = {
static const u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf801, 0xf81a, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
@@ -180,7 +180,7 @@ static u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static ushort *key_maps[MAX_NR_KEYMAPS] = {
static const ushort *key_maps[MAX_NR_KEYMAPS] = {
plain_map, shift_map, altgr_map, 0,
ctrl_map, 0, altgr_ctrl_map, 0,
alt_map, 0, 0, 0,
@@ -189,11 +189,11 @@ static ushort *key_maps[MAX_NR_KEYMAPS] = {
/*
* Philosophy: most people do not define more strings, but they who do
* often want quite a lot of string space. So, we statically allocate
* often want quite a lot of string space. So, we static constally allocate
* the default and allocate dynamically in chunks of 512 bytes.
*/
static char func_buf[] = {
static const char func_buf[] = {
'\033', '[', '[', 'A', 0,
'\033', '[', '[', 'B', 0,
'\033', '[', '[', 'C', 0,
@@ -224,7 +224,7 @@ static char func_buf[] = {
'\033', '[', 'P', 0,
};
static char *func_table[MAX_NR_FUNC] = {
static const char *func_table[MAX_NR_FUNC] = {
func_buf + 0,
func_buf + 5,
func_buf + 10,
@@ -260,14 +260,14 @@ static char *func_table[MAX_NR_FUNC] = {
#if 0
static struct kbdiacr accent_table[MAX_DIACR] = {
static const struct kbdiacr accent_table[MAX_DIACR] = {
};
static unsigned int accent_table_size = 0;
static const unsigned int accent_table_size = 0;
#else
static struct kbdiacr accent_table[MAX_DIACR] = {
static const struct kbdiacr accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'},
{'^', 'A', '\302'}, {'^', 'a', '\342'},
@@ -304,17 +304,17 @@ static struct kbdiacr accent_table[MAX_DIACR] = {
{'s', 'z', '\337'}, {'i', 'j', '\377'},
};
static unsigned int accent_table_size = 68;
static const unsigned int accent_table_size = 68;
#endif
void init_fr_kbd_layout (ushort*** key_maps_p, struct kbdiacr** accent_table_p,
unsigned int* accent_table_size_p, char*** func_table_p)
{
*key_maps_p = key_maps;
*accent_table_p = accent_table;
*key_maps_p = (ushort**)key_maps;
*accent_table_p = (struct kbdiacr*)accent_table;
*accent_table_size_p = accent_table_size;
*func_table_p = func_table;
*func_table_p = (char**)func_table;
}
#endif /* _MGKBDLAYOUT_FR */
+16 -16
View File
@@ -47,7 +47,7 @@
#ifdef _MGKBDLAYOUT_FRPC
static u_short plain_map[NR_KEYS] = {
static const u_short plain_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf026, 0xf0e9, 0xf022, 0xf027, 0xf028, 0xf02d,
0xf0e8, 0xf05f, 0xf0e7, 0xf0e0, 0xf029, 0xf03d, 0xf07f, 0xf009,
0xfb61, 0xfb7a, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -66,7 +66,7 @@ static u_short plain_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_map[NR_KEYS] = {
static const u_short shift_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
0xf037, 0xf038, 0xf039, 0xf030, 0xf0b0, 0xf02b, 0xf07f, 0xf009,
0xfb41, 0xfb5a, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
@@ -85,7 +85,7 @@ static u_short shift_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_map[NR_KEYS] = {
static const u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf07e, 0xf023, 0xf07b, 0xf05b, 0xf07c,
0xf060, 0xf05c, 0xf05e, 0xf040, 0xf05d, 0xf07d, 0xf200, 0xf200,
0xfb61, 0xfb7a, 0xf0a4, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -104,7 +104,7 @@ static u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_map[NR_KEYS] = {
static const u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01d, 0xf01e,
0xf01f, 0xf07f, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf200, 0xf200,
0xf001, 0xf01a, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -123,7 +123,7 @@ static u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_ctrl_map[NR_KEYS] = {
static const u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf001, 0xf01a, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -142,7 +142,7 @@ static u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short alt_map[NR_KEYS] = {
static const u_short alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
0xf861, 0xf87a, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
@@ -161,7 +161,7 @@ static u_short alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_alt_map[NR_KEYS] = {
static const u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf801, 0xf81a, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
@@ -180,7 +180,7 @@ static u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static ushort *key_maps[MAX_NR_KEYMAPS] = {
static const ushort *key_maps[MAX_NR_KEYMAPS] = {
plain_map, shift_map, altgr_map, 0,
ctrl_map, 0, altgr_ctrl_map, 0,
alt_map, 0, 0, 0,
@@ -190,11 +190,11 @@ static ushort *key_maps[MAX_NR_KEYMAPS] = {
/*
* Philosophy: most people do not define more strings, but they who do
* often want quite a lot of string space. So, we statically allocate
* often want quite a lot of string space. So, we static constally allocate
* the default and allocate dynamically in chunks of 512 bytes.
*/
static char func_buf[] = {
static const char func_buf[] = {
'\033', '[', '[', 'A', 0,
'\033', '[', '[', 'B', 0,
'\033', '[', '[', 'C', 0,
@@ -226,7 +226,7 @@ static char func_buf[] = {
};
static char *func_table[MAX_NR_FUNC] = {
static const char *func_table[MAX_NR_FUNC] = {
func_buf + 0,
func_buf + 5,
func_buf + 10,
@@ -269,7 +269,7 @@ unsigned int accent_table_size = 0;
#else
static struct kbdiacr accent_table[MAX_DIACR] = {
static const struct kbdiacr accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'},
{'^', 'A', '\302'}, {'^', 'a', '\342'},
@@ -306,17 +306,17 @@ static struct kbdiacr accent_table[MAX_DIACR] = {
{'s', 'z', '\337'}, {'i', 'j', '\377'},
};
static unsigned int accent_table_size = 68;
static const unsigned int accent_table_size = 68;
#endif
void init_frpc_kbd_layout (ushort*** key_maps_p, struct kbdiacr** accent_table_p,
unsigned int* accent_table_size_p, char*** func_table_p)
{
*key_maps_p = key_maps;
*accent_table_p = accent_table;
*key_maps_p = (ushort**)key_maps;
*accent_table_p = (struct kbdiacr*)accent_table;
*accent_table_size_p = accent_table_size;
*func_table_p = func_table;
*func_table_p = (char**)func_table;
}
#endif /* _MGKBDLAYOUT_FRPC */
+16 -16
View File
@@ -53,7 +53,7 @@
#ifdef _MGKBDLAYOUT_HEBREWPC
static u_short plain_map[NR_KEYS] = {
static const u_short plain_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
0xfb2f, 0xfb27, 0xfbf7, 0xfbf8, 0xfbe0, 0xfbe8, 0xfbe5, 0xfbef,
@@ -72,7 +72,7 @@ static u_short plain_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
};
static u_short shift_map[NR_KEYS] = {
static const u_short shift_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
@@ -91,7 +91,7 @@ static u_short shift_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
};
static u_short altgr_map[NR_KEYS] = {
static const u_short altgr_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -111,7 +111,7 @@ static u_short altgr_map[NR_KEYS] = {
};
static u_short ctrl_map[NR_KEYS] = {
static const u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01d, 0xf01e,
0xf01f, 0xf07f, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -130,7 +130,7 @@ static u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
};
static u_short shift_ctrl_map[NR_KEYS] = {
static const u_short shift_ctrl_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01d, 0xf01e,
0xf01f, 0xf07f, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -149,7 +149,7 @@ static u_short shift_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
};
static u_short alt_map[NR_KEYS] = {
static const u_short alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
@@ -169,7 +169,7 @@ static u_short alt_map[NR_KEYS] = {
};
static u_short ctrl_alt_map[NR_KEYS] = {
static const u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf200, 0xf800, 0xf81b, 0xf81c, 0xf81d, 0xf81e,
0xf81f, 0xf87f, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
@@ -188,7 +188,7 @@ static u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
};
static ushort *key_maps[MAX_NR_KEYMAPS] = {
static const ushort *key_maps[MAX_NR_KEYMAPS] = {
plain_map, shift_map, altgr_map,0 ,
ctrl_map, shift_ctrl_map, 0, 0,
alt_map,0 ,0 ,0 ,
@@ -197,11 +197,11 @@ static ushort *key_maps[MAX_NR_KEYMAPS] = {
/*
* Philosophy: most people do not define more strings, but they who do
* often want quite a lot of string space. So, we statically allocate
* often want quite a lot of string space. So, we static constally allocate
* the default and allocate dynamically in chunks of 512 bytes.
*/
static char func_buf[] = {
static const char func_buf[] = {
'\033', '[', '[', 'A', 0,
'\033', '[', '[', 'B', 0,
'\033', '[', '[', 'C', 0,
@@ -237,7 +237,7 @@ static char func_buf[] = {
int funcbufsize = sizeof(func_buf);
int funcbufleft = 0;*/ /* space left */
static char *func_table[MAX_NR_FUNC] = {
static const char *func_table[MAX_NR_FUNC] = {
func_buf + 0,
func_buf + 5,
func_buf + 10,
@@ -271,7 +271,7 @@ static char *func_table[MAX_NR_FUNC] = {
0,
};
static struct kbdiacr accent_table[MAX_DIACR] = {
static const struct kbdiacr accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'},
{'^', 'A', '\302'}, {'^', 'a', '\342'},
@@ -308,15 +308,15 @@ static struct kbdiacr accent_table[MAX_DIACR] = {
{'s', 'z', '\337'}, {'i', 'j', '\377'},
};
static unsigned int accent_table_size = 68;
static const unsigned int accent_table_size = 68;
void init_hebrew_kbd_layout (ushort*** key_maps_p, struct kbdiacr** accent_table_p,
unsigned int* accent_table_size_p, char*** func_table_p)
{
*key_maps_p = key_maps;
*accent_table_p = accent_table;
*key_maps_p = (ushort**)key_maps;
*accent_table_p = (struct kbdiacr*)accent_table;
*accent_table_size_p = accent_table_size;
*func_table_p = func_table;
*func_table_p = (char**)func_table;
}
#endif /*_MGKBDLAYOUT_HEBREWPC*/
+17 -17
View File
@@ -47,7 +47,7 @@
#ifdef _MGKBDLAYOUT_IT
static u_short plain_map[NR_KEYS] = {
static const u_short plain_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
0xf037, 0xf038, 0xf039, 0xf030, 0xf027, 0xf0ec, 0xf07f, 0xf009,
0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -66,7 +66,7 @@ static u_short plain_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_map[NR_KEYS] = {
static const u_short shift_map[NR_KEYS] = {
0xf200, 0xf01b, 0xf021, 0xf022, 0xf0a3, 0xf024, 0xf025, 0xf026,
0xf02f, 0xf028, 0xf029, 0xf03d, 0xf03f, 0xf05e, 0xf07f, 0xf009,
0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
@@ -85,7 +85,7 @@ static u_short shift_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_map[NR_KEYS] = {
static const u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf07b, 0xf07d, 0xf07e, 0xf060, 0xf0ed, 0xf200, 0xf200,
0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -104,7 +104,7 @@ static u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_map[NR_KEYS] = {
static const u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01d, 0xf01e,
0xf01f, 0xf07f, 0xf200, 0xf200, 0xf07f, 0xf01e, 0xf01f, 0xf200,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -123,7 +123,7 @@ static u_short ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short altgr_ctrl_map[NR_KEYS] = {
static const u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
@@ -142,7 +142,7 @@ static u_short altgr_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short alt_map[NR_KEYS] = {
static const u_short alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
@@ -161,7 +161,7 @@ static u_short alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short shift_alt_map[NR_KEYS] = {
static const u_short shift_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf821, 0xf200, 0xf200, 0xf824, 0xf825, 0xf200,
0xf82f, 0xf828, 0xf829, 0xf83d, 0xf200, 0xf85e, 0xf200, 0xf200,
0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
@@ -180,7 +180,7 @@ static u_short shift_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static u_short ctrl_alt_map[NR_KEYS] = {
static const u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf800, 0xf81b, 0xf81c, 0xf200, 0xf200,
0xf200, 0xf87f, 0xf200, 0xf200, 0xf87f, 0xf200, 0xf200, 0xf200,
0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
@@ -199,7 +199,7 @@ static u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
static ushort *key_maps[MAX_NR_KEYMAPS] = {
static const ushort *key_maps[MAX_NR_KEYMAPS] = {
plain_map, shift_map, altgr_map, 0,
ctrl_map, 0, altgr_ctrl_map, 0,
alt_map, shift_alt_map, 0, 0,
@@ -208,11 +208,11 @@ static ushort *key_maps[MAX_NR_KEYMAPS] = {
/*
* Philosophy: most people do not define more strings, but they who do
* often want quite a lot of string space. So, we statically allocate
* often want quite a lot of string space. So, we static constally allocate
* the default and allocate dynamically in chunks of 512 bytes.
*/
static char func_buf[] = {
static const char func_buf[] = {
'\033', '[', '[', 'A', 0,
'\033', '[', '[', 'B', 0,
'\033', '[', '[', 'C', 0,
@@ -243,7 +243,7 @@ static char func_buf[] = {
'\033', '[', 'P', 0,
};
static char *func_table[MAX_NR_FUNC] = {
static const char *func_table[MAX_NR_FUNC] = {
func_buf + 0,
func_buf + 5,
func_buf + 10,
@@ -286,7 +286,7 @@ unsigned int accent_table_size = 0;
#else
static struct kbdiacr accent_table[MAX_DIACR] = {
static const struct kbdiacr accent_table[MAX_DIACR] = {
{'`', 'A', '\300'}, {'`', 'a', '\340'},
{'\'', 'A', '\301'}, {'\'', 'a', '\341'},
{'^', 'A', '\302'}, {'^', 'a', '\342'},
@@ -323,17 +323,17 @@ static struct kbdiacr accent_table[MAX_DIACR] = {
{'s', 'z', '\337'}, {'i', 'j', '\377'},
};
static unsigned int accent_table_size = 68;
static const unsigned int accent_table_size = 68;
#endif
void init_it_kbd_layout (ushort*** key_maps_p, struct kbdiacr** accent_table_p,
unsigned int* accent_table_size_p, char*** func_table_p)
{
*key_maps_p = key_maps;
*accent_table_p = accent_table;
*key_maps_p = (ushort**)key_maps;
*accent_table_p = (struct kbdiacr*)accent_table;
*accent_table_size_p = accent_table_size;
*func_table_p = func_table;
*func_table_p = (char**)func_table;
}
#endif /* _MGKBDLAYOUT_IT */