The screen position (for TABs) is only for raw *CONOUT* devices already

updated in dosfns.c


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@873 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2004-04-13 11:21:29 +00:00
parent 3e1c1a526f
commit 06de625da2

View File

@ -284,17 +284,17 @@ void write_char(int c, int sft_idx)
void write_char_stdout(int c) void write_char_stdout(int c)
{ {
unsigned char count = 1; unsigned char count = 1;
unsigned flags = get_sft(STDOUT)->sft_flags & (SFT_FDEVICE | SFT_FBINARY); unsigned flags = get_sft(STDOUT)->sft_flags;
/* ah=2, ah=9 should expand tabs even for raw devices and disk files */ /* ah=2, ah=9 should expand tabs even for raw devices and disk files */
if (flags != SFT_FDEVICE) if ((flags & (SFT_FDEVICE|SFT_FBINARY)) != SFT_FDEVICE)
{ {
if (c == HT) { if (c == HT) {
count = 8 - (scr_pos & 7); count = 8 - (scr_pos & 7);
c = ' '; c = ' ';
} }
/* for raw devices already updated in dosfns.c */ /* for raw CONOUT devices already updated in dosfns.c */
if (!(flags & SFT_FDEVICE)) if ((flags & (SFT_FDEVICE|SFT_FCONOUT)) != (SFT_FDEVICE|SFT_FCONOUT))
update_scr_pos(c, count); update_scr_pos(c, count);
} }