=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/talk/init_disp.c,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** src/usr.bin/talk/init_disp.c 1998/04/28 22:13:26 1.4 --- src/usr.bin/talk/init_disp.c 1998/08/18 04:02:14 1.5 *************** *** 1,4 **** ! /* $OpenBSD: init_disp.c,v 1.4 1998/04/28 22:13:26 pjanzen Exp $ */ /* $NetBSD: init_disp.c,v 1.6 1994/12/09 02:14:17 jtc Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: init_disp.c,v 1.5 1998/08/18 04:02:14 millert Exp $ */ /* $NetBSD: init_disp.c,v 1.6 1994/12/09 02:14:17 jtc Exp $ */ /* *************** *** 38,44 **** #if 0 static char sccsid[] = "@(#)init_disp.c 8.2 (Berkeley) 2/16/94"; #endif ! static char rcsid[] = "$OpenBSD: init_disp.c,v 1.4 1998/04/28 22:13:26 pjanzen Exp $"; #endif /* not lint */ /* --- 38,44 ---- #if 0 static char sccsid[] = "@(#)init_disp.c 8.2 (Berkeley) 2/16/94"; #endif ! static char rcsid[] = "$OpenBSD: init_disp.c,v 1.5 1998/08/18 04:02:14 millert Exp $"; #endif /* not lint */ /* *************** *** 54,73 **** #include #include ! /* * Set up curses, catch the appropriate signals, * and build the various windows. */ void init_display() { ! struct sigvec sigv; if (initscr() == NULL) errx(1, "Terminal type unset or lacking necessary features."); ! (void) sigvec(SIGTSTP, (struct sigvec *)0, &sigv); ! sigv.sv_mask |= sigmask(SIGALRM); ! (void) sigvec(SIGTSTP, &sigv, (struct sigvec *)0); curses_initialized = 1; clear(); refresh(); --- 54,73 ---- #include #include ! /* * Set up curses, catch the appropriate signals, * and build the various windows. */ void init_display() { ! struct sigaction sa; if (initscr() == NULL) errx(1, "Terminal type unset or lacking necessary features."); ! (void) sigaction(SIGTSTP, NULL, &sa); ! sigaddset(&sa.sa_mask, SIGALRM); ! (void) sigaction(SIGTSTP, &sa, NULL); curses_initialized = 1; clear(); refresh(); *************** *** 90,96 **** wclear(his_win.x_win); line_win = newwin(1, COLS, my_win.x_nlines, 0); ! #ifdef NCURSES_VERSION whline(line_win, '-', COLS); #else box(line_win, '-', '-'); --- 90,96 ---- wclear(his_win.x_win); line_win = newwin(1, COLS, my_win.x_nlines, 0); ! #if defined(NCURSES_VERSION) || defined(whline) whline(line_win, '-', COLS); #else box(line_win, '-', '-'); *************** *** 113,127 **** struct termios tty; tcgetattr(0, &tty); ! my_win.cerase = tty.c_cc[VERASE]; ! my_win.kill = tty.c_cc[VKILL]; ! if (tty.c_cc[VWERASE] == (unsigned char) -1) ! my_win.werase = '\027'; /* control W */ ! else ! my_win.werase = tty.c_cc[VWERASE]; ! buf[0] = my_win.cerase; ! buf[1] = my_win.kill; ! buf[2] = my_win.werase; cc = write(sockt, buf, sizeof(buf)); if (cc != sizeof(buf) ) p_error("Lost the connection"); --- 113,124 ---- struct termios tty; tcgetattr(0, &tty); ! buf[0] = my_win.cerase = tty.c_cc[VERASE] == (u_char)_POSIX_VDISABLE ! ? CERASE : tty.c_cc[VERASE]; ! buf[1] = my_win.kill = tty.c_cc[VKILL] == (u_char)_POSIX_VDISABLE ! ? CKILL : tty.c_cc[CKILL]; ! buf[2] = my_win.werase = tty.c_cc[VWERASE] == (u_char)_POSIX_VDISABLE ! ? CWERASE : tty.c_cc[VWERASE]; cc = write(sockt, buf, sizeof(buf)); if (cc != sizeof(buf) ) p_error("Lost the connection");