echo ^C to stdout, not stdin or stderr.

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@809 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2004-03-21 22:01:41 +00:00
parent 600e02b1b4
commit 43ca8741b0
3 changed files with 3 additions and 8 deletions

View File

@ -68,7 +68,7 @@ int check_handle_break(void)
*/ */
void handle_break(struct dhdr FAR **pdev) void handle_break(struct dhdr FAR **pdev)
{ {
echo_char_stdin(CTL_C); echo_char(CTL_C, get_sft_idx(STDOUT));
con_flush(pdev); con_flush(pdev);
if (!ErrorMode) /* within int21_handler, InDOS is not incremented */ if (!ErrorMode) /* within int21_handler, InDOS is not incremented */
if (InDOS) if (InDOS)

View File

@ -306,7 +306,7 @@ void write_char_stdout(int c)
#define iscntrl(c) ((unsigned char)(c) < ' ') #define iscntrl(c) ((unsigned char)(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 int echo_char(int c, int sft_idx) int echo_char(int c, int sft_idx)
{ {
int out = c; int out = c;
if (iscntrl(c) && c != HT && c != LF && c != CR) if (iscntrl(c) && c != HT && c != LF && c != CR)
@ -318,11 +318,6 @@ STATIC int echo_char(int c, int sft_idx)
return c; return c;
} }
int echo_char_stdin(int c)
{
return echo_char(c, get_sft_idx(STDIN));
}
STATIC void destr_bs(int sft_idx) STATIC void destr_bs(int sft_idx)
{ {
write_char(BS, sft_idx); write_char(BS, sft_idx);

View File

@ -58,7 +58,7 @@ void handle_break(struct dhdr FAR **pdev);
struct dhdr FAR *sft_to_dev(sft FAR *sft); struct dhdr FAR *sft_to_dev(sft FAR *sft);
long BinaryCharIO(struct dhdr FAR **pdev, size_t n, void FAR * bp, long BinaryCharIO(struct dhdr FAR **pdev, size_t n, void FAR * bp,
unsigned command); unsigned command);
int echo_char_stdin(int c); int echo_char(int c, int sft_idx);
int con_break(void); int con_break(void);
int StdinBusy(void); int StdinBusy(void);
void con_flush(struct dhdr FAR **pdev); void con_flush(struct dhdr FAR **pdev);