Fix bug in the output redirection of the character i/o routines.

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@466 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2002-11-11 08:41:28 +00:00
parent 894c9ebd7a
commit a126dce676
3 changed files with 6 additions and 6 deletions

View File

@ -264,9 +264,9 @@ void write_char(int c, int sft_idx)
DosRWSft(sft_idx, 1, &ch, XFR_FORCE_WRITE);
}
void write_char_stdin(int c)
void write_char_stdout(int c)
{
write_char(c, get_sft_idx(STDIN));
write_char(c, get_sft_idx(STDOUT));
}
#define iscntrl(c) ((unsigned char)(c) < ' ')

View File

@ -430,12 +430,12 @@ dispatch:
/* Read Keyboard with Echo */
case 0x01:
lr.AL = read_char_stdin(TRUE);
write_char_stdin(lr.AL);
write_char_stdout(lr.AL);
break;
/* Display Character */
case 0x02:
write_char_stdin(lr.DL);
write_char_stdout(lr.DL);
break;
/* Auxiliary Input */
@ -455,7 +455,7 @@ dispatch:
/* Direct Console I/O */
case 0x06:
if (lr.DL != 0xff)
write_char_stdin(lr.DL);
write_char_stdout(lr.DL);
else if (StdinBusy())
{
lr.AL = 0x00;

View File

@ -64,7 +64,7 @@ long cooked_read(int sft_idx, size_t n, char FAR *bp);
void read_line(int sft_in, int sft_out, keyboard FAR * kp);
size_t read_line_handle(int sft_idx, size_t n, char FAR * bp);
void write_char(int c, int sft_idx);
void write_char_stdin(int c);
void write_char_stdout(int c);
long cooked_write(int sft_idx, size_t n, char FAR *bp);
sft FAR *get_sft(UCOUNT);