From: blueswir1 Date: Thu, 2 Oct 2008 18:26:42 +0000 (+0000) Subject: Make keysym tables const X-Git-Tag: 0.10.0-0maemo1~947 X-Git-Url: http://git.maemo.org/git/?p=qemu;a=commitdiff_plain;h=be7fb97f8a0818dfe7f7582193a80ef27f677615 Make keysym tables const git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5396 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/curses_keys.h b/curses_keys.h index 10bdf8b..9cdaf69 100644 --- a/curses_keys.h +++ b/curses_keys.h @@ -37,7 +37,7 @@ #define CURSES_KEYS KEY_MAX /* KEY_MAX defined in */ -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 }, diff --git a/keymaps.c b/keymaps.c index 15c40fa..38e50f0 100644 --- 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; diff --git a/sdl_keysym.h b/sdl_keysym.h index 9a74142..c9087d7 100644 --- a/sdl_keysym.h +++ b/sdl_keysym.h @@ -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}, diff --git a/vnc_keysym.h b/vnc_keysym.h index b6a172d..d1527ec 100644 --- a/vnc_keysym.h +++ b/vnc_keysym.h @@ -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},