[Midnightbsd-cvs] src [11330] trunk/usr.bin/talk: sync talk with freebsd

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Jul 4 20:56:10 EDT 2018


Revision: 11330
          http://svnweb.midnightbsd.org/src/?rev=11330
Author:   laffer1
Date:     2018-07-04 20:56:10 -0400 (Wed, 04 Jul 2018)
Log Message:
-----------
sync talk with freebsd

Modified Paths:
--------------
    trunk/usr.bin/talk/Makefile
    trunk/usr.bin/talk/ctl.c
    trunk/usr.bin/talk/ctl_transact.c
    trunk/usr.bin/talk/display.c
    trunk/usr.bin/talk/get_addrs.c
    trunk/usr.bin/talk/get_iface.c
    trunk/usr.bin/talk/get_names.c
    trunk/usr.bin/talk/init_disp.c
    trunk/usr.bin/talk/invite.c
    trunk/usr.bin/talk/io.c
    trunk/usr.bin/talk/look_up.c
    trunk/usr.bin/talk/msgs.c
    trunk/usr.bin/talk/talk.1
    trunk/usr.bin/talk/talk.c
    trunk/usr.bin/talk/talk.h
    trunk/usr.bin/talk/talk_ctl.h

Property Changed:
----------------
    trunk/usr.bin/talk/talk.1

Modified: trunk/usr.bin/talk/Makefile
===================================================================
--- trunk/usr.bin/talk/Makefile	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/Makefile	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,10 +1,11 @@
+# $MidnightBSD$
 #	From: @(#)Makefile	8.1 (Berkeley) 6/6/93
-# $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/talk/Makefile 273499 2014-10-23 00:43:08Z ngie $
 
 PROG=	talk
 SRCS=	ctl.c ctl_transact.c display.c get_addrs.c get_iface.c get_names.c \
 	init_disp.c invite.c io.c look_up.c msgs.c talk.c
-DPADD=	${LIBCURSES}
-LDADD=	-lcurses
+DPADD=	${LIBNCURSESW}
+LDADD=	-lncursesw
 
 .include <bsd.prog.mk>

Modified: trunk/usr.bin/talk/ctl.c
===================================================================
--- trunk/usr.bin/talk/ctl.c	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/ctl.c	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/talk/ctl.c 227185 2011-11-06 08:17:23Z ed $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)ctl.c	8.1 (Berkeley) 6/6/93";
@@ -47,6 +48,7 @@
 #include <string.h>
 
 #include "talk.h"
+#include "talk_ctl.h"
 
 struct	sockaddr_in daemon_addr = { .sin_len = sizeof(daemon_addr), .sin_family = AF_INET };
 struct	sockaddr_in ctl_addr = { .sin_len = sizeof(ctl_addr), .sin_family = AF_INET };

Modified: trunk/usr.bin/talk/ctl_transact.c
===================================================================
--- trunk/usr.bin/talk/ctl_transact.c	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/ctl_transact.c	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/talk/ctl_transact.c 228992 2011-12-30 11:02:40Z uqs $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)ctl_transact.c	8.1 (Berkeley) 6/6/93";
@@ -46,7 +47,7 @@
 
 /*
  * SOCKDGRAM is unreliable, so we must repeat messages if we have
- * not recieved an acknowledgement within a reasonable amount
+ * not received an acknowledgement within a reasonable amount
  * of time
  */
 void

Modified: trunk/usr.bin/talk/display.c
===================================================================
--- trunk/usr.bin/talk/display.c	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/display.c	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/talk/display.c 273496 2014-10-23 00:39:19Z ngie $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)display.c	8.1 (Berkeley) 6/6/93";
@@ -41,9 +42,14 @@
  */
 #include <ctype.h>
 #include <unistd.h>
+#include <wctype.h>
+#define _XOPEN_SOURCE_EXTENDED
+#include <curses.h>
 
 #include "talk.h"
 
+void	display(xwin_t *, wchar_t *);
+
 xwin_t	my_win;
 xwin_t	his_win;
 WINDOW	*line_win;
@@ -61,25 +67,51 @@
 	return (a > b ? a : b);
 }
 
+static cchar_t *
+makecchar(wchar_t in)
+{
+	static cchar_t cc;
+	wchar_t wc[2];
+
+	wc[0] = in;
+	wc[1] = L'\0';
+
+	if (setcchar(&cc, wc, A_NORMAL, 0, NULL) != OK)
+		p_error("settchar(3) failure");
+
+	return (&cc);
+}
+
 /*
- * Display some text on somebody's window, processing some control
+ * Display a symbol on somebody's window, processing some control
  * characters while we are at it.
  */
 void
-display(xwin_t *win, char *text, int size)
+display(xwin_t *win, wchar_t *wc)
 {
-	int i;
-	char cch;
 
-	for (i = 0; i < size; i++) {
-		if (*text == '\n' || *text == '\r') {
-			waddch(win->x_win, '\n');
-			getyx(win->x_win, win->x_line, win->x_col);
-			text++;
-			continue;
-		}
-		if (*text == 004 && win == &my_win) {
-			/* control-D clears the screen */
+	/*
+	 * Alas, can't use variables in C switch statement.
+	 * Workaround these 3 cases with goto.
+	 */
+	if (*wc == win->kill)
+		goto kill;
+	else if (*wc == win->cerase)
+		goto cerase;
+	else if (*wc == win->werase)
+		goto werase;
+
+	switch (*wc) {
+	case L'\n':
+	case L'\r':
+		wadd_wch(win->x_win, makecchar(L'\n'));
+		getyx(win->x_win, win->x_line, win->x_col);
+		wrefresh(win->x_win);
+		return;
+
+	case 004:
+		if (win == &my_win) {
+			/* Ctrl-D clears the screen. */
 			werase(my_win.x_win);
 			getyx(my_win.x_win, my_win.x_line, my_win.x_col);
 			wrefresh(my_win.x_win);
@@ -86,86 +118,79 @@
 			werase(his_win.x_win);
 			getyx(his_win.x_win, his_win.x_line, his_win.x_col);
 			wrefresh(his_win.x_win);
-			text++;
-			continue;
 		}
+		return;
 
-		/* erase character */
-		if (   *text == win->cerase
-		    || *text == 010     /* BS */
-		    || *text == 0177    /* DEL */
-		   ) {
-			wmove(win->x_win, win->x_line, max(--win->x_col, 0));
-			getyx(win->x_win, win->x_line, win->x_col);
-			waddch(win->x_win, ' ');
-			wmove(win->x_win, win->x_line, win->x_col);
-			getyx(win->x_win, win->x_line, win->x_col);
-			text++;
-			continue;
-		}
+	/* Erase character. */
+	case 010:	/* BS */
+	case 0177:	/* DEL */
+cerase:
+		wmove(win->x_win, win->x_line, max(--win->x_col, 0));
+		getyx(win->x_win, win->x_line, win->x_col);
+		waddch(win->x_win, ' ');
+		wmove(win->x_win, win->x_line, win->x_col);
+		getyx(win->x_win, win->x_line, win->x_col);
+		wrefresh(win->x_win);
+		return;
+
+	case 027:	/* ^W */
+werase:
+	    {
 		/*
 		 * On word erase search backwards until we find
 		 * the beginning of a word or the beginning of
 		 * the line.
 		 */
-		if (   *text == win->werase
-		    || *text == 027     /* ^W */
-		   ) {
-			int endcol, xcol, ii, c;
+		int endcol, xcol, c;
 
-			endcol = win->x_col;
-			xcol = endcol - 1;
-			while (xcol >= 0) {
-				c = readwin(win->x_win, win->x_line, xcol);
-				if (c != ' ')
-					break;
-				xcol--;
-			}
-			while (xcol >= 0) {
-				c = readwin(win->x_win, win->x_line, xcol);
-				if (c == ' ')
-					break;
-				xcol--;
-			}
-			wmove(win->x_win, win->x_line, xcol + 1);
-			for (ii = xcol + 1; ii < endcol; ii++)
-				waddch(win->x_win, ' ');
-			wmove(win->x_win, win->x_line, xcol + 1);
-			getyx(win->x_win, win->x_line, win->x_col);
-			text++;
-			continue;
+		endcol = win->x_col;
+		xcol = endcol - 1;
+		while (xcol >= 0) {
+			c = readwin(win->x_win, win->x_line, xcol);
+			if (c != ' ')
+				break;
+			xcol--;
 		}
-		/* line kill */
-		if (   *text == win->kill
-		    || *text == 025     /* ^U */
-		   ) {
-			wmove(win->x_win, win->x_line, 0);
-			wclrtoeol(win->x_win);
-			getyx(win->x_win, win->x_line, win->x_col);
-			text++;
-			continue;
+		while (xcol >= 0) {
+			c = readwin(win->x_win, win->x_line, xcol);
+			if (c == ' ')
+				break;
+			xcol--;
 		}
-		if (*text == '\f') {
-			if (win == &my_win)
-				wrefresh(curscr);
-			text++;
-			continue;
-		}
-		if (*text == '\7') {
-			write(STDOUT_FILENO, text, 1);
-			text++;
-			continue;
-		}
-		if (!isprint((unsigned char)*text) && *text != '\t') {
-			waddch(win->x_win, '^');
-			getyx(win->x_win, win->x_line, win->x_col);
-			cch = (*text & 63) + 64;
-			waddch(win->x_win, cch);
-		} else
-			waddch(win->x_win, (unsigned char)*text);
+		wmove(win->x_win, win->x_line, xcol + 1);
+		for (int i = xcol + 1; i < endcol; i++)
+			waddch(win->x_win, ' ');
+		wmove(win->x_win, win->x_line, xcol + 1);
 		getyx(win->x_win, win->x_line, win->x_col);
-		text++;
+		wrefresh(win->x_win);
+		return;
+	    }
+
+	case 025:	/* ^U */
+kill:
+		wmove(win->x_win, win->x_line, 0);
+		wclrtoeol(win->x_win);
+		getyx(win->x_win, win->x_line, win->x_col);
+		wrefresh(win->x_win);
+		return;
+
+	case L'\f':
+		if (win == &my_win)
+			wrefresh(curscr);
+		return;
+
+	case L'\7':
+		write(STDOUT_FILENO, wc, sizeof(*wc));
+		return;
 	}
+
+
+	if (iswprint(*wc) || *wc == L'\t')
+		wadd_wch(win->x_win, makecchar(*wc));
+	else
+		beep();
+
+	getyx(win->x_win, win->x_line, win->x_col);
 	wrefresh(win->x_win);
 }
 

Modified: trunk/usr.bin/talk/get_addrs.c
===================================================================
--- trunk/usr.bin/talk/get_addrs.c	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/get_addrs.c	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/talk/get_addrs.c 216370 2010-12-11 08:32:16Z joel $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)get_addrs.c	8.1 (Berkeley) 6/6/93";

Modified: trunk/usr.bin/talk/get_iface.c
===================================================================
--- trunk/usr.bin/talk/get_iface.c	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/get_iface.c	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright 1994, 1995 Massachusetts Institute of Technology
  *
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/talk/get_iface.c 200418 2009-12-11 23:23:57Z delphij $");
 
 /*
  * From:

Modified: trunk/usr.bin/talk/get_names.c
===================================================================
--- trunk/usr.bin/talk/get_names.c	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/get_names.c	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/talk/get_names.c 229386 2012-01-03 11:13:07Z ed $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)get_names.c	8.1 (Berkeley) 6/6/93";
@@ -80,8 +81,7 @@
 	gethostname(hostname, sizeof (hostname));
 	my_machine_name = hostname;
 	/* check for, and strip out, the machine name of the target */
-	for (cp = argv[1]; *cp && !index("@:!", *cp); cp++)
-		;
+	cp = argv[1] + strcspn(argv[1], "@:!");
 	if (*cp == '\0') {
 		/* this is a local to local talk */
 		his_name = argv[1];

Modified: trunk/usr.bin/talk/init_disp.c
===================================================================
--- trunk/usr.bin/talk/init_disp.c	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/init_disp.c	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/talk/init_disp.c 227185 2011-11-06 08:17:23Z ed $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)init_disp.c	8.2 (Berkeley) 2/16/94";
@@ -50,8 +51,6 @@
 
 #include "talk.h"
 
-extern volatile sig_atomic_t gotwinch;
-
 /*
  * Make sure the callee can write to the screen
  */

Modified: trunk/usr.bin/talk/invite.c
===================================================================
--- trunk/usr.bin/talk/invite.c	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/invite.c	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/talk/invite.c 228992 2011-12-30 11:02:40Z uqs $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)invite.c	8.1 (Berkeley) 6/6/93";
@@ -60,8 +61,8 @@
  * These are used to delete the
  * invitations.
  */
-int	local_id, remote_id;
-jmp_buf invitebuf;
+static int	local_id, remote_id;
+static jmp_buf invitebuf;
 
 void
 invite_remote(void)
@@ -87,7 +88,7 @@
 	announce_invite();
 	/*
 	 * Shut off the automatic messages for a while,
-	 * so we can use the interupt timer to resend the invitation
+	 * so we can use the interrupt timer to resend the invitation
 	 */
 	end_msgs();
 	setitimer(ITIMER_REAL, &itimer, (struct itimerval *)0);
@@ -117,7 +118,7 @@
 }
 
 /*
- * Routine called on interupt to re-invite the callee
+ * Routine called on interrupt to re-invite the callee
  */
 /* ARGSUSED */
 void

Modified: trunk/usr.bin/talk/io.c
===================================================================
--- trunk/usr.bin/talk/io.c	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/io.c	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/talk/io.c 273496 2014-10-23 00:39:19Z ngie $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)io.c	8.1 (Berkeley) 6/6/93";
@@ -46,14 +47,17 @@
 #include <errno.h>
 #include <signal.h>
 #include <netdb.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#define _XOPEN_SOURCE_EXTENDED
+#include <curses.h>
 
 #include "talk.h"
 #include "talk_ctl.h"
 
-#define A_LONG_TIME 10000000
+extern void	display(xwin_t *, wchar_t *);
 
 volatile sig_atomic_t gotwinch = 0;
 
@@ -65,9 +69,10 @@
 {
 	struct hostent *hp, *hp2;
 	int nb;
-	fd_set read_set, read_template;
-	char buf[BUFSIZ], **addr, *his_machine_name;
-	struct timeval wait;
+	fd_set read_set;
+	wchar_t buf[BUFSIZ];
+	char **addr, *his_machine_name;
+	FILE *sockfp;
 
 	his_machine_name = NULL;
 	hp = gethostbyaddr((const char *)&his_machine_addr.s_addr,
@@ -85,64 +90,58 @@
 	}
 	if (his_machine_name == NULL)
 		his_machine_name = strdup(inet_ntoa(his_machine_addr));
-	snprintf(buf, sizeof(buf), "Connection established with %s@%s.",
+	snprintf((char *)buf, sizeof(buf), "Connection established with %s@%s.",
 	    msg.r_name, his_machine_name);
 	free(his_machine_name);
-	message(buf);
+	message((char *)buf);
 	write(STDOUT_FILENO, "\007\007\007", 3);
 	
 	current_line = 0;
 
+	if ((sockfp = fdopen(sockt, "w+")) == NULL)
+		p_error("fdopen");
+
+	setvbuf(sockfp, NULL, _IONBF, 0);
+	setvbuf(stdin, NULL, _IONBF, 0);
+
 	/*
-	 * Wait on both the other process (sockt_mask) and
-	 * standard input ( STDIN_MASK )
+	 * Wait on both the other process (sockt) and standard input.
 	 */
-	FD_ZERO(&read_template);
-	FD_SET(sockt, &read_template);
-	FD_SET(fileno(stdin), &read_template);
 	for (;;) {
-		read_set = read_template;
-		wait.tv_sec = A_LONG_TIME;
-		wait.tv_usec = 0;
-		nb = select(32, &read_set, 0, 0, &wait);
+		FD_ZERO(&read_set);
+		FD_SET(sockt, &read_set);
+		FD_SET(fileno(stdin), &read_set);
+		nb = select(32, &read_set, 0, 0, NULL);
 		if (gotwinch) {
 			resize_display();
 			gotwinch = 0;
 		}
 		if (nb <= 0) {
-			if (errno == EINTR) {
-				read_set = read_template;
+			if (errno == EINTR)
 				continue;
-			}
-			/* panic, we don't know what happened */
+			/* Panic, we don't know what happened. */
 			p_error("Unexpected error from select");
 			quit();
 		}
 		if (FD_ISSET(sockt, &read_set)) {
-			/* There is data on sockt */
-			nb = read(sockt, buf, sizeof buf);
-			if (nb <= 0) {
+			wint_t w;
+
+			/* There is data on sockt. */
+			w = fgetwc(sockfp);
+			if (w == WEOF) {
 				message("Connection closed. Exiting");
 				quit();
 			}
-			display(&his_win, buf, nb);
+			display(&his_win, &w);
 		}
 		if (FD_ISSET(fileno(stdin), &read_set)) {
-			/*
-			 * We can't make the tty non_blocking, because
-			 * curses's output routines would screw up
-			 */
-			int i;
-			ioctl(0, FIONREAD, (void *) &nb);
-			if (nb > (ssize_t)(sizeof buf))
-				nb = sizeof buf;
-			nb = read(STDIN_FILENO, buf, nb);
-			display(&my_win, buf, nb);
-			/* might lose data here because sockt is non-blocking */
-			for (i = 0; i < nb; ++i)
-				if (buf[i] == '\r')
-					buf[i] = '\n';
-			write(sockt, buf, nb);
+			wint_t w;
+
+			if ((w = getwchar()) != WEOF) {
+				display(&my_win, &w);
+				(void )fputwc(w, sockfp);
+				(void )fflush(sockfp);
+			}
 		}
 	}
 }

Modified: trunk/usr.bin/talk/look_up.c
===================================================================
--- trunk/usr.bin/talk/look_up.c	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/look_up.c	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/talk/look_up.c 216370 2010-12-11 08:32:16Z joel $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)look_up.c	8.1 (Berkeley) 6/6/93";

Modified: trunk/usr.bin/talk/msgs.c
===================================================================
--- trunk/usr.bin/talk/msgs.c	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/msgs.c	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/talk/msgs.c 216370 2010-12-11 08:32:16Z joel $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)msgs.c	8.1 (Berkeley) 6/6/93";

Modified: trunk/usr.bin/talk/talk.1
===================================================================
--- trunk/usr.bin/talk/talk.1	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/talk.1	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1983, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -26,7 +27,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)talk.1	8.1 (Berkeley) 6/6/93
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.bin/talk/talk.1 240506 2012-09-14 17:50:42Z eadler $
 .\"
 .Dd January 21, 2010
 .Dt TALK 1


Property changes on: trunk/usr.bin/talk/talk.1
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.bin/talk/talk.c
===================================================================
--- trunk/usr.bin/talk/talk.c	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/talk.c	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/talk/talk.c 216370 2010-12-11 08:32:16Z joel $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)talk.c	8.1 (Berkeley) 6/6/93";

Modified: trunk/usr.bin/talk/talk.h
===================================================================
--- trunk/usr.bin/talk/talk.h	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/talk.h	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -27,7 +28,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)talk.h	8.1 (Berkeley) 6/6/93
- * $MidnightBSD$
+ * $FreeBSD: stable/10/usr.bin/talk/talk.h 273496 2014-10-23 00:39:19Z ngie $
  */
 
 #include <sys/cdefs.h>
@@ -38,6 +39,7 @@
 #include <arpa/inet.h>
 #include <protocols/talkd.h>
 #include <curses.h>
+#include <signal.h>
 
 extern	int sockt;
 extern	int curses_initialized;
@@ -46,6 +48,8 @@
 extern	const char *current_state;
 extern	int current_line;
 
+extern volatile sig_atomic_t gotwinch;
+
 typedef struct xwin {
 	WINDOW	*x_win;
 	int	x_nlines;
@@ -66,7 +70,6 @@
 extern	void	check_writeable(void);
 extern	void	ctl_transact(struct in_addr,CTL_MSG,int,CTL_RESPONSE *);
 extern	void	disp_msg(int);
-extern	void	display(xwin_t *, char *, int);
 extern	void	end_msgs(void);
 extern	void	get_addrs(const char *, const char *);
 extern	int	get_iface(struct in_addr *, struct in_addr *);

Modified: trunk/usr.bin/talk/talk_ctl.h
===================================================================
--- trunk/usr.bin/talk/talk_ctl.h	2018-07-05 00:55:31 UTC (rev 11329)
+++ trunk/usr.bin/talk/talk_ctl.h	2018-07-05 00:56:10 UTC (rev 11330)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -26,7 +27,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $MidnightBSD$
+ * $FreeBSD: stable/10/usr.bin/talk/talk_ctl.h 216370 2010-12-11 08:32:16Z joel $
  *
  *	@(#)talk_ctl.h	8.1 (Berkeley) 6/6/93
  */



More information about the Midnightbsd-cvs mailing list