From 84e01e8053f38e62157c094183fcdfdad3876f80 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Thu, 15 Aug 1996 21:13:53 +0000 Subject: Switch from using sigaction to signal. --- lib/libncurses/lib_newterm.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'lib/libncurses') diff --git a/lib/libncurses/lib_newterm.c b/lib/libncurses/lib_newterm.c index d72946e41a5c8..24808e06d20d8 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 -- cgit v1.3