changeset 35854:08c22970003b

Tables should be "static".
author reimar
date Sun, 10 Mar 2013 15:17:44 +0000
parents 3ee9fd074b8c
children 2f68de22fba6
files osdep/getch2.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/osdep/getch2.c	Sun Mar 10 15:16:17 2013 +0000
+++ b/osdep/getch2.c	Sun Mar 10 15:17:44 2013 +0000
@@ -224,7 +224,7 @@
             }
             if ((c == '[' || c == 'O') && getch2_len >= 3) {
                 int c = getch2_buf[2];
-                const unsigned ctable[] = {
+                static const unsigned ctable[] = {
                     KEY_UP, KEY_DOWN, KEY_RIGHT, KEY_LEFT, 0,
                     KEY_END, KEY_PGDWN, KEY_HOME, KEY_PGUP, 0, 0, KEY_INS, 0, 0, 0,
                     KEY_F+1, KEY_F+2, KEY_F+3, KEY_F+4};
@@ -237,7 +237,7 @@
             }
             if (getch2_len >= 4 && c == '[' && getch2_buf[3] == '~') {
                 int c = getch2_buf[2];
-                const int ctable[8] = {KEY_HOME, KEY_INS, KEY_DEL, KEY_END, KEY_PGUP, KEY_PGDWN, KEY_HOME, KEY_END};
+                static const int ctable[8] = {KEY_HOME, KEY_INS, KEY_DEL, KEY_END, KEY_PGUP, KEY_PGDWN, KEY_HOME, KEY_END};
                 if (c >= '1' && c <= '8') {
                     code = ctable[c - '1'];
                     len = 4;
@@ -248,7 +248,7 @@
                 int i = getch2_buf[2] - '0';
                 int j = getch2_buf[3] - '0';
                 if (i >= 0 && i <= 9 && j >= 0 && j <= 9) {
-                    const uint8_t ftable[20] = {
+                    static const uint8_t ftable[20] = {
                         11,12,13,14,15, 17,18,19,20,21,
                         23,24,25,26,28, 29,31,32,33,34 };
                     int a = i*10 + j;