diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-08-15 21:13:53 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-08-15 21:13:53 +0000 |
| commit | 84e01e8053f38e62157c094183fcdfdad3876f80 (patch) | |
| tree | 7c736c68e95d90ef1f1f6ca6385330cc566b0131 /lib/libncurses | |
| parent | 53cd648388f3b804f3a1c5f701cbd18df4c92e86 (diff) | |
Notes
Diffstat (limited to 'lib/libncurses')
| -rw-r--r-- | lib/libncurses/lib_newterm.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/libncurses/lib_newterm.c b/lib/libncurses/lib_newterm.c index d72946e41a5c..24808e06d20d 100644 --- a/lib/libncurses/lib_newterm.c +++ b/lib/libncurses/lib_newterm.c @@ -36,10 +36,10 @@ size_change(int sig) { struct ttysize ws; - if (ioctl(0, TIOCGSIZE, &ws) == -1) - return; - LINES = ws.ts_lines; - COLS = ws.ts_cols; + if (ioctl(0, TIOCGSIZE, &ws) != -1) { + LINES = ws.ts_lines; + COLS = ws.ts_cols; + } } WINDOW *stdscr, *curscr, *newscr; @@ -141,10 +141,7 @@ char *use_it = _ncurses_copyright; act.sa_flags = 0; sigaction(SIGINT, &act, NULL); sigaction(SIGTERM, &act, NULL); - act.sa_handler = size_change; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - sigaction(SIGWINCH, &act, NULL); + signal(SIGWINCH, size_change); #if 0 sigaction(SIGSEGV, &act, NULL); #endif |
