changeset 35853:3ee9fd074b8c

Use more appropriate types.
author reimar
date Sun, 10 Mar 2013 15:16:17 +0000
parents 1eb092275eb8
children 08c22970003b
files osdep/getch2.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/osdep/getch2.c	Sun Mar 10 14:28:10 2013 +0000
+++ b/osdep/getch2.c	Sun Mar 10 15:16:17 2013 +0000
@@ -64,7 +64,7 @@
 static struct termios tio_orig;
 #endif
 static int getch2_len=0;
-static char getch2_buf[BUF_LEN];
+static uint8_t getch2_buf[BUF_LEN];
 
 int screen_width=80;
 int screen_height=24;
@@ -224,7 +224,7 @@
             }
             if ((c == '[' || c == 'O') && getch2_len >= 3) {
                 int c = getch2_buf[2];
-                const short ctable[] = {
+                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};
@@ -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 short ftable[20] = {
+                    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;