Commit be7fb97f8a0818dfe7f7582193a80ef27f677615

Authored by blueswir1
1 parent 88b4e9db

Make keysym tables const

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5396 c046a42c-6fe2-441c-8c8c-71466251a162
curses_keys.h
... ... @@ -37,7 +37,7 @@
37 37  
38 38 #define CURSES_KEYS KEY_MAX /* KEY_MAX defined in <curses.h> */
39 39  
40   -static int curses2keycode[CURSES_KEYS] = {
  40 +static const int curses2keycode[CURSES_KEYS] = {
41 41 [0 ... (CURSES_KEYS - 1)] = -1,
42 42  
43 43 [0x01b] = 1, /* Escape */
... ... @@ -216,7 +216,7 @@ static int curses2keycode[CURSES_KEYS] = {
216 216  
217 217 };
218 218  
219   -static int curses2keysym[CURSES_KEYS] = {
  219 +static const int curses2keysym[CURSES_KEYS] = {
220 220 [0 ... (CURSES_KEYS - 1)] = -1,
221 221  
222 222 ['\n'] = '\n',
... ... @@ -244,7 +244,7 @@ typedef struct {
244 244 int keysym;
245 245 } name2keysym_t;
246 246  
247   -static name2keysym_t name2keysym[] = {
  247 +static const name2keysym_t name2keysym[] = {
248 248 /* Plain ASCII */
249 249 { "space", 0x020 },
250 250 { "exclam", 0x021 },
... ...
keymaps.c
... ... @@ -24,7 +24,7 @@
24 24  
25 25 static int get_keysym(const char *name)
26 26 {
27   - name2keysym_t *p;
  27 + const name2keysym_t *p;
28 28 for(p = name2keysym; p->name != NULL; p++) {
29 29 if (!strcmp(p->name, name))
30 30 return p->keysym;
... ...
sdl_keysym.h
... ... @@ -2,7 +2,7 @@ typedef struct {
2 2 const char* name;
3 3 int keysym;
4 4 } name2keysym_t;
5   -static name2keysym_t name2keysym[]={
  5 +static const name2keysym_t name2keysym[]={
6 6 /* ascii */
7 7 { "space", 0x020},
8 8 { "exclam", 0x021},
... ...
vnc_keysym.h
... ... @@ -2,7 +2,7 @@ typedef struct {
2 2 const char* name;
3 3 int keysym;
4 4 } name2keysym_t;
5   -static name2keysym_t name2keysym[]={
  5 +static const name2keysym_t name2keysym[]={
6 6 /* ascii */
7 7 { "space", 0x020},
8 8 { "exclam", 0x021},
... ...