Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-12-27 06:54:59 +0300
committerChristopher Faylor <me@cgf.cx>2002-12-27 06:54:59 +0300
commit3bfed277d69246e7ae67caec77969180d9e51538 (patch)
treed49c2c500f59cb9391138774d99f9910ba880f34
parent740c81ed4e501cfe00e46449016f5f720ea35883 (diff)
* fhandler_tty.cc (fhandler_tty_master::init): Set initial size of tty to that
of console in which tty is operating. (process_input): Semi-revert previous change. Need to just use current terminfo settings since this function is running in a thread, blocked when the terminfo changes.
-rw-r--r--ChangeLog8
-rw-r--r--winsup/cygwin/fhandler_tty.cc6
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0f3da1861..a226b2e96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-12-26 Christopher Faylor <cgf@redhat.com>
+
+ * fhandler_tty.cc (fhandler_tty_master::init): Set initial size of tty
+ to that of console in which tty is operating.
+ (process_input): Semi-revert previous change. Need to just use current
+ terminfo settings since this function is running in a thread, blocked
+ when the terminfo changes.
+
2002-12-24 Andreas Schwab <schwab@suse.de>
* Makefile.tpl (multilib.out): Fix missing space.
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 45afbcab1..fd0789b60 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -54,6 +54,9 @@ fhandler_tty_master::init (int ntty)
termios ti;
memset (&ti, 0, sizeof (ti));
console->tcsetattr (0, &ti);
+ winsize w;
+ console->ioctl (TIOCGWINSZ, &w);
+ this->ioctl (TIOCSWINSZ, &w);
ttynum = ntty;
@@ -198,9 +201,8 @@ process_input (void *)
while (1)
{
size_t nraw = INP_BUFFER_SIZE;
- termios ti = tty_master->get_ttyp ()->ti;
tty_master->console->read ((void *) rawbuf, nraw);
- (void) tty_master->line_edit (rawbuf, nraw, ti);
+ (void) tty_master->line_edit (rawbuf, nraw, tty_master->get_ttyp ()->ti);
}
}