]> sourceware.org Git - newlib-cygwin.git/commitdiff
* fhandler_console.cc: New member variable `dwBufferSize' for `info'.
authorChristopher Faylor <me@cgf.cx>
Fri, 17 Nov 2000 03:01:14 +0000 (03:01 +0000)
committerChristopher Faylor <me@cgf.cx>
Fri, 17 Nov 2000 03:01:14 +0000 (03:01 +0000)
(fillin_info): Set `dwBufferSize' to the size of the console buffer.
(clear_screen): Use width of console buffer to calculate how many spaces to
clear.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_console.cc

index 4209488a3750bc3e99c7f8b585efc5add4d8c51c..f8e224cbef4f5eca3b92bfd50620c859240e257e 100644 (file)
@@ -1,3 +1,10 @@
+Thu Nov 16 15:59:58 2000 Bradley A. Town <townba@pobox.com>
+
+       * fhandler_console.cc: New member variable `dwBufferSize' for `info'.
+       (fillin_info): Set `dwBufferSize' to the size of the console buffer.
+       (clear_screen): Use width of console buffer to calculate how many
+       spaces to clear.
+
 Thu Nov 16 15:24:45 2000  Christopher Faylor <cgf@cygnus.com>
 
        * Makefile.in: Make import library creation 'make -j2' friendly.
index fcb55c2a8e278b06d623bafc6f1551b71868fa05..3e49e14803a2ef16f77c1a49c9c1bee405734daa 100644 (file)
@@ -264,6 +264,7 @@ static struct
     SHORT winTop;
     SHORT winBottom;
     COORD dwWinSize;
+    COORD dwBufferSize;
     COORD dwCursorPosition;
     WORD wAttributes;
   } info;
@@ -280,6 +281,7 @@ fhandler_console::fillin_info (void)
       info.winBottom = linfo.srWindow.Bottom;
       info.dwWinSize.Y = 1 + linfo.srWindow.Bottom - linfo.srWindow.Top;
       info.dwWinSize.X = 1 + linfo.srWindow.Right - linfo.srWindow.Left;
+      info.dwBufferSize = linfo.dwSize;
       info.dwCursorPosition = linfo.dwCursorPosition;
       info.wAttributes = linfo.wAttributes;
     }
@@ -648,9 +650,9 @@ fhandler_console::clear_screen (int x1, int y1, int x2, int y2)
   if (y2 < 0)
     y2 = info.winBottom;
 
-  num = abs (y1 - y2) * info.dwWinSize.X + abs (x1 - x2) + 1;
+  num = abs (y1 - y2) * info.dwBufferSize.X + abs (x1 - x2) + 1;
 
-  if ((y2 * info.dwWinSize.X + x2) > (y1 * info.dwWinSize.X + x1))
+  if ((y2 * info.dwBufferSize.X + x2) > (y1 * info.dwBufferSize.X + x1))
     {
       tlc.X = x1;
       tlc.Y = y1;
This page took 0.037572 seconds and 5 git commands to generate.