=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/talk/init_disp.c,v retrieving revision 1.7 retrieving revision 1.8 diff -c -r1.7 -r1.8 *** src/usr.bin/talk/init_disp.c 1998/12/20 23:54:08 1.7 --- src/usr.bin/talk/init_disp.c 1999/03/03 20:43:30 1.8 *************** *** 1,4 **** ! /* $OpenBSD: init_disp.c,v 1.7 1998/12/20 23:54:08 millert Exp $ */ /* $NetBSD: init_disp.c,v 1.6 1994/12/09 02:14:17 jtc Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: init_disp.c,v 1.8 1999/03/03 20:43:30 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.7 1998/12/20 23:54:08 millert 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.8 1999/03/03 20:43:30 millert Exp $"; #endif /* not lint */ /* *************** *** 121,130 **** ? CWERASE : tty.c_cc[VWERASE]; cc = write(sockt, buf, sizeof(buf)); if (cc != sizeof(buf) ) ! p_error("Lost the connection"); cc = read(sockt, buf, sizeof(buf)); if (cc != sizeof(buf) ) ! p_error("Lost the connection"); his_win.cerase = buf[0]; his_win.kill = buf[1]; his_win.werase = buf[2]; --- 121,130 ---- ? CWERASE : tty.c_cc[VWERASE]; cc = write(sockt, buf, sizeof(buf)); if (cc != sizeof(buf) ) ! quit("Lost the connection", 1); cc = read(sockt, buf, sizeof(buf)); if (cc != sizeof(buf) ) ! quit("Lost the connection", 1); his_win.cerase = buf[0]; his_win.kill = buf[1]; his_win.werase = buf[2]; *************** *** 135,149 **** int dummy; { ! message("Connection closing. Exiting"); ! quit(); } /* * All done talking...hang up the phone and reset terminal thingy's */ void ! quit() { if (curses_initialized) { --- 135,150 ---- int dummy; { ! quit("Connection closing. Exiting", 0); } /* * All done talking...hang up the phone and reset terminal thingy's */ void ! quit(warning, do_perror) ! char *warning; ! int do_perror; { if (curses_initialized) { *************** *** 154,158 **** --- 155,165 ---- } if (invitation_waiting) send_delete(); + if (warning) { + if (do_perror) + warn(warning); + else + warnx(warning); + } exit(0); }