From a82122eec8d80223c63123b11c15f66acb6811ef Mon Sep 17 00:00:00 2001 From: Luchezar Georgiev Date: Sat, 22 Oct 2005 11:14:06 +0000 Subject: [PATCH] Fix Ctrl-Z bug and retro-optimise a bit git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/branches/UNSTABLE@1146 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/chario.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/chario.c b/kernel/chario.c index 0740ca7..9870c7c 100644 --- a/kernel/chario.c +++ b/kernel/chario.c @@ -89,7 +89,10 @@ STATIC int CharIO(struct dhdr FAR **pdev, unsigned char ch, unsigned command) /* STATE FUNCTIONS */ -#define CharCmd(pdev, command) while (CharRequest(pdev, command) > 0) +STATIC void CharCmd(struct dhdr FAR **pdev, unsigned command) +{ + while (CharRequest(pdev, command) == 1); +} STATIC int Busy(struct dhdr FAR **pdev) { @@ -223,13 +226,13 @@ void write_char_stdout(int c) /* this is for handling things like ^C, mostly used in echoed input */ STATIC VOID echo_char(int c, int sft_idx, unsigned i) { + local_buffer[i] = c; if (iscntrl(c) && c != HT && c != LF && c != CR) { write_char('^', sft_idx); c += '@'; } write_char(c, sft_idx); - local_buffer[i] = c; } STATIC void destr_bs(int sft_idx)