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:
parent
894c9ebd7a
commit
a126dce676
@ -264,9 +264,9 @@ void write_char(int c, int sft_idx)
|
|||||||
DosRWSft(sft_idx, 1, &ch, XFR_FORCE_WRITE);
|
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) < ' ')
|
#define iscntrl(c) ((unsigned char)(c) < ' ')
|
||||||
|
@ -430,12 +430,12 @@ dispatch:
|
|||||||
/* Read Keyboard with Echo */
|
/* Read Keyboard with Echo */
|
||||||
case 0x01:
|
case 0x01:
|
||||||
lr.AL = read_char_stdin(TRUE);
|
lr.AL = read_char_stdin(TRUE);
|
||||||
write_char_stdin(lr.AL);
|
write_char_stdout(lr.AL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Display Character */
|
/* Display Character */
|
||||||
case 0x02:
|
case 0x02:
|
||||||
write_char_stdin(lr.DL);
|
write_char_stdout(lr.DL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Auxiliary Input */
|
/* Auxiliary Input */
|
||||||
@ -455,7 +455,7 @@ dispatch:
|
|||||||
/* Direct Console I/O */
|
/* Direct Console I/O */
|
||||||
case 0x06:
|
case 0x06:
|
||||||
if (lr.DL != 0xff)
|
if (lr.DL != 0xff)
|
||||||
write_char_stdin(lr.DL);
|
write_char_stdout(lr.DL);
|
||||||
else if (StdinBusy())
|
else if (StdinBusy())
|
||||||
{
|
{
|
||||||
lr.AL = 0x00;
|
lr.AL = 0x00;
|
||||||
|
@ -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);
|
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);
|
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(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);
|
long cooked_write(int sft_idx, size_t n, char FAR *bp);
|
||||||
|
|
||||||
sft FAR *get_sft(UCOUNT);
|
sft FAR *get_sft(UCOUNT);
|
||||||
|
Loading…
Reference in New Issue
Block a user