Mail Archives: djgpp/1993/12/21/13:09:14
Hello,
I have installed 1.11.maint1 fixes and I find there still is a little bug
in clrscr (gppconio.h). It erases one char to the right from where it should.
This is because .winright starts in 1 and VIDADDR require arguments starting
from 0. This code will show the problem (the 'x' won't be erased):
main ()
{
gotoxy (1,1);
putch ('x');
clrscr ();
}
The problem is bigger when clearing windows. Anyway here goes the diff to
correct the problem:
*** gppconio.c Wed Dec 15 03:20:02 1993
--- gppconio.new Tue Dec 21 15:17:26 1993
***************
*** 269,273 ****
filler[col] = ' ' | (ScreenAttrib << 8);
for (row=txinfo.wintop-1; row < txinfo.winbottom; row++)
! dosmemput(filler, (txinfo.winright - txinfo.winleft + 1)*2, VIDADDR(row, txinfo.winleft));
gotoxy(1, 1);
}
--- 269,273 ----
filler[col] = ' ' | (ScreenAttrib << 8);
for (row=txinfo.wintop-1; row < txinfo.winbottom; row++)
! dosmemput(filler, (txinfo.winright - txinfo.winleft + 1)*2, VIDADDR(row, txinfo.winleft - 1));
gotoxy(1, 1);
}
- Raw text -