]> git.proxmox.com Git - qemu.git/commitdiff
Make keysym tables const
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 2 Oct 2008 18:26:42 +0000 (18:26 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 2 Oct 2008 18:26:42 +0000 (18:26 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5396 c046a42c-6fe2-441c-8c8c-71466251a162

curses_keys.h
keymaps.c
sdl_keysym.h
vnc_keysym.h

index 10bdf8b5fe3dbb47997e9b0dc28ad6b48aad998d..9cdaf693588487ec26e2dd3f78b32f4727c07570 100644 (file)
@@ -37,7 +37,7 @@
 
 #define CURSES_KEYS         KEY_MAX     /* KEY_MAX defined in <curses.h> */
 
-static int curses2keycode[CURSES_KEYS] = {
+static const int curses2keycode[CURSES_KEYS] = {
     [0 ... (CURSES_KEYS - 1)] = -1,
 
     [0x01b] = 1, /* Escape */
@@ -216,7 +216,7 @@ static int curses2keycode[CURSES_KEYS] = {
 
 };
 
-static int curses2keysym[CURSES_KEYS] = {
+static const int curses2keysym[CURSES_KEYS] = {
     [0 ... (CURSES_KEYS - 1)] = -1,
 
     ['\n'] = '\n',
@@ -244,7 +244,7 @@ typedef struct {
        int keysym;
 } name2keysym_t;
 
-static name2keysym_t name2keysym[] = {
+static const name2keysym_t name2keysym[] = {
     /* Plain ASCII */
     { "space", 0x020 },
     { "exclam", 0x021 },
index 15c40fadc1baab32309a74eb9f449f17779ede41..38e50f0c07d4e18fe73b17e643c4add97d071db6 100644 (file)
--- a/keymaps.c
+++ b/keymaps.c
@@ -24,7 +24,7 @@
 
 static int get_keysym(const char *name)
 {
-    name2keysym_t *p;
+    const name2keysym_t *p;
     for(p = name2keysym; p->name != NULL; p++) {
         if (!strcmp(p->name, name))
             return p->keysym;
index 9a7414209f5789fbce50e0860c24ca48e3b8fa60..c9087d75a7d64ee1a3011605e1eee995140e397a 100644 (file)
@@ -2,7 +2,7 @@ typedef struct {
        const char* name;
        int keysym;
 } name2keysym_t;
-static name2keysym_t name2keysym[]={
+static const name2keysym_t name2keysym[]={
 /* ascii */
     { "space",                0x020},
     { "exclam",               0x021},
index b6a172de9c62f158788e612b3cf8b825e856a391..d1527ec02a790ae793f64febdc4c663180f42ff7 100644 (file)
@@ -2,7 +2,7 @@ typedef struct {
        const char* name;
        int keysym;
 } name2keysym_t;
-static name2keysym_t name2keysym[]={
+static const name2keysym_t name2keysym[]={
 /* ascii */
     { "space",                0x020},
     { "exclam",               0x021},