9
0
Fork 0

Remove unnecessary casts in key defines

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2009-12-18 11:26:12 +01:00
parent 8fc2d57024
commit 73108301d4
4 changed files with 11 additions and 11 deletions

View File

@ -394,7 +394,7 @@ static int do_edit(cmd_tbl_t * cmdtp, int argc, char *argv[])
int lastscrcol;
int i;
int linepos;
char c;
int c;
if (argc != 2)
return COMMAND_ERROR_USAGE;

View File

@ -14,15 +14,15 @@
#define KEY_ERASE_LINE CTL_CH('x')
#define KEY_INSERT CTL_CH('o')
#define KEY_CLEAR_SCREEN CTL_CH('l')
#define KEY_DEL7 (char)127
#define KEY_END (char)133 // Cursor Key End
#define KEY_PAGEUP (char)135 // Cursor Key Page Up
#define KEY_PAGEDOWN (char)136 // Cursor Key Page Down
#define KEY_DEL (char)137 // Cursor Key Del
#define KEY_DEL7 127
#define KEY_END 133 // Cursor Key End
#define KEY_PAGEUP 135 // Cursor Key Page Up
#define KEY_PAGEDOWN 136 // Cursor Key Page Down
#define KEY_DEL 137 // Cursor Key Del
#define ANSI_CLEAR_SCREEN "\e[2J\e[;H"
char read_key(void);
int read_key(void);
#endif /* READKEY_H */

View File

@ -52,7 +52,7 @@ static const struct esc_cmds esccmds[] = {
{"[6~", KEY_PAGEDOWN},// Cursor Key Page Down
};
char read_key(void)
int read_key(void)
{
char c;
char esc[5];

View File

@ -17,8 +17,8 @@
#define MAX_CMDBUF_SIZE 256
#define CTL_BACKSPACE ('\b')
#define DEL ((char)255)
#define DEL7 ((char)127)
#define DEL 255
#define DEL7 127
#define CREAD_HIST_CHAR ('!')
#define getcmd_putch(ch) putchar(ch)
@ -178,7 +178,7 @@ int readline(const char *prompt, char *buf, int len)
unsigned long eol_num = 0;
unsigned long rlen;
unsigned long wlen;
unsigned char ichar;
int ichar;
int insert = 1;
int rc = 0;
#ifdef CONFIG_AUTO_COMPLETE