Get the terminal size at startup with ioctl() and use it. Fixes at least

NetBSD.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2616 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-03-14 23:46:48 +00:00 committed by cras
commit 6a89217d6a
3 changed files with 37 additions and 22 deletions

View file

@ -77,7 +77,8 @@ static int redraw_timeout(void)
int term_init(void)
{
struct sigaction act;
struct sigaction act;
int width, height;
last_fg = last_bg = -1;
last_attrs = 0;
@ -89,6 +90,11 @@ int term_init(void)
if (current_term == NULL)
return FALSE;
if (term_get_size(&width, &height)) {
current_term->width = width;
current_term->height = height;
}
/* grab CONT signal */
sigemptyset(&act.sa_mask);
act.sa_flags = 0;