diff options
author | Christopher Faylor <me@cgf.cx> | 2000-11-17 03:01:14 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-11-17 03:01:14 +0000 |
commit | 5758fdf31d8cee2c3f75abf08b2f1bd54f2f25c7 (patch) | |
tree | fe127fb1ae658269ec1efdd5c99c83ea6d50474c /winsup/cygwin | |
parent | c302181722bd781bb8d1e2e22688bf0e0dc732e0 (diff) | |
download | cygnal-5758fdf31d8cee2c3f75abf08b2f1bd54f2f25c7.tar.gz cygnal-5758fdf31d8cee2c3f75abf08b2f1bd54f2f25c7.tar.bz2 cygnal-5758fdf31d8cee2c3f75abf08b2f1bd54f2f25c7.zip |
* 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.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_console.cc | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 4209488a3..f8e224cbe 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -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. diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index fcb55c2a8..3e49e1480 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -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; |