X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/4bc81323e51ac138e733c14eeb6f283ae706e904..fecee2418b6aea15008ed6d3a856d202d59a5cdb:/avr/cli_readline.c diff --git a/avr/cli_readline.c b/avr/cli_readline.c index 17d5494..93a0355 100644 --- a/avr/cli_readline.c +++ b/avr/cli_readline.c @@ -1,4 +1,6 @@ /* + * (C) Copyright 2014 Leo C. + * * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * @@ -10,8 +12,6 @@ */ #include "common.h" - -#include #include #include @@ -74,7 +74,7 @@ static char *delete_char (char *buffer, char *p, int *colp, int *np, int plen) #define CREAD_HIST_CHAR ('!') #define getcmd_putch(ch) putchar(ch) -#define getcmd_getch() my_getchar() +#define getcmd_getch() my_getchar(1) #define getcmd_cbeep() getcmd_putch('\a') #define HIST_MAX 5 @@ -500,7 +500,7 @@ static int cli_readline_into_buffer(const FLASH char *const prompt, char *buffer for (;;) { - c = my_getchar(); + c = my_getchar(1); /* * Special character handling @@ -561,16 +561,8 @@ static int cli_readline_into_buffer(const FLASH char *const prompt, char *buffer my_puts_P(tab_seq + (col & 07)); col += 8 - (col & 07); } else { - char buf[2]; - - /* - * Echo input using puts() to force an - * LCD flush if we are using an LCD - */ ++col; - buf[0] = c; - buf[1] = '\0'; - my_puts(buf); + putchar(c); } *p++ = c; ++n; @@ -592,4 +584,3 @@ int cli_readline(const FLASH char *const prompt) return cli_readline_into_buffer(prompt, console_buffer); } -