mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-25 23:04:57 +02:00
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
This commit is contained in:
parent
da5f4a917f
commit
a82122eec8
@ -89,7 +89,10 @@ STATIC int CharIO(struct dhdr FAR **pdev, unsigned char ch, unsigned command)
|
|||||||
|
|
||||||
/* STATE FUNCTIONS */
|
/* 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)
|
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 */
|
/* this is for handling things like ^C, mostly used in echoed input */
|
||||||
STATIC VOID echo_char(int c, int sft_idx, unsigned i)
|
STATIC VOID echo_char(int c, int sft_idx, unsigned i)
|
||||||
{
|
{
|
||||||
|
local_buffer[i] = c;
|
||||||
if (iscntrl(c) && c != HT && c != LF && c != CR)
|
if (iscntrl(c) && c != HT && c != LF && c != CR)
|
||||||
{
|
{
|
||||||
write_char('^', sft_idx);
|
write_char('^', sft_idx);
|
||||||
c += '@';
|
c += '@';
|
||||||
}
|
}
|
||||||
write_char(c, sft_idx);
|
write_char(c, sft_idx);
|
||||||
local_buffer[i] = c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC void destr_bs(int sft_idx)
|
STATIC void destr_bs(int sft_idx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user