From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 05/36] Remove unnecessary casts in key defines
Date: Fri, 18 Dec 2009 16:47:54 +0100 [thread overview]
Message-ID: <1261151305-18627-6-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1261151305-18627-5-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
commands/edit.c | 2 +-
include/readkey.h | 12 ++++++------
lib/readkey.c | 2 +-
lib/readline.c | 6 +++---
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/commands/edit.c b/commands/edit.c
index 6503edf..d292a52 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -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;
diff --git a/include/readkey.h b/include/readkey.h
index d27f0b4..d073e43 100644
--- a/include/readkey.h
+++ b/include/readkey.h
@@ -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 */
diff --git a/lib/readkey.c b/lib/readkey.c
index 0464ce4..a42d1cb 100644
--- a/lib/readkey.c
+++ b/lib/readkey.c
@@ -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];
diff --git a/lib/readline.c b/lib/readline.c
index 750da3b..b82150e 100644
--- a/lib/readline.c
+++ b/lib/readline.c
@@ -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
--
1.6.5.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2009-12-18 15:49 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-18 15:47 barebox Patches Sascha Hauer
2009-12-18 15:47 ` [PATCH 01/36] i.MX25 3stack: fixup flash header to new names/layout Sascha Hauer
2009-12-18 15:47 ` [PATCH 02/36] ipe337: add missing include Sascha Hauer
2009-12-18 15:47 ` [PATCH 03/36] scb9328: setup chipselect the correct way Sascha Hauer
2009-12-18 15:47 ` [PATCH 04/36] read_key: Use ARRAY_SIZE instead of hardcoded value Sascha Hauer
2009-12-18 15:47 ` Sascha Hauer [this message]
2009-12-18 15:47 ` [PATCH 06/36] replace // style comments Sascha Hauer
2009-12-18 15:47 ` [PATCH 07/36] netx: enable second ethernet device Sascha Hauer
2009-12-18 15:47 ` [PATCH 08/36] pcm037: Add missing include Sascha Hauer
2009-12-18 15:47 ` [PATCH 09/36] imx ipu fb: Make fb_videomode const Sascha Hauer
2009-12-18 15:47 ` [PATCH 10/36] i.MX nand: mx21 has a v1 type controller Sascha Hauer
2009-12-18 15:48 ` [PATCH 11/36] vsprintf: Only define PAGE_SIZE if not already defined Sascha Hauer
2009-12-18 15:48 ` [PATCH 12/36] i2c: Add a no-op i2c_register_board_info if i2c is disabled Sascha Hauer
2009-12-18 15:48 ` [PATCH 13/36] sandbox: update defconfig Sascha Hauer
2009-12-18 15:48 ` [PATCH 14/36] pcm030: Update defconfig Sascha Hauer
2009-12-18 15:48 ` [PATCH 15/36] mx21ads: update defconfig Sascha Hauer
2009-12-18 15:48 ` [PATCH 16/36] pcm037: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 17/36] pca100: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 18/36] mx27ads: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 19/36] ipe337: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 20/36] scb9328: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 21/36] pcm043: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 22/36] pm9263: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 23/36] netx: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 24/36] mmccpu: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 25/36] eukrea cpuimx27: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 26/36] at91sam9260ek: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 27/36] at91sam9263ek: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 28/36] Digi a9m2410: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 29/36] Digi a9m2440: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 30/36] i.MX25 3stack: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 31/36] i.MX35 " Sascha Hauer
2009-12-18 15:48 ` [PATCH 32/36] sdp3430: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 33/36] beagle board: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 34/36] omap3_evm: " Sascha Hauer
2009-12-18 15:48 ` [PATCH 35/36] Makefile: clean barebox.ldr Sascha Hauer
2009-12-18 15:48 ` [PATCH 36/36] Fix barebox Version number Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1261151305-18627-6-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox