diff options
author | jkh <jkh@FreeBSD.org> | 1996-08-15 21:13:53 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-08-15 21:13:53 +0000 |
commit | 50dd1004f24bac5f2c277fd3a1dbf78d757767e9 (patch) | |
tree | 7c736c68e95d90ef1f1f6ca6385330cc566b0131 /lib/libncurses | |
parent | 0b26c0eb71eea13c2c1f36d51238e41ffba6d540 (diff) | |
download | FreeBSD-src-50dd1004f24bac5f2c277fd3a1dbf78d757767e9.zip FreeBSD-src-50dd1004f24bac5f2c277fd3a1dbf78d757767e9.tar.gz |
Switch from using sigaction to signal.
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 d72946e..24808e0 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 |