This commit is contained in:
joey 1997-11-17 15:29:55 +00:00
parent 36b5df795d
commit 075e5758bf
7 changed files with 477 additions and 0 deletions

21
net/ytalk/Makefile Normal file
View File

@ -0,0 +1,21 @@
# OpenBSD makefile for: ytalk
# Version required: 3.0pl2
# Date created: 17 Nov 1997
# Whom: ejovi
#
# $OpenBSD: Makefile,v 1.1.1.1 1997/11/17 15:29:55 joey Exp $
#
DISTNAME= ytalk-v3pl2
PKGNAME= ytalk-3.0.2
CATEGORIES= net
MASTER_SITES= ftp://knot.queensu.ca/pub/unix/software/
MAINTAINER= ejovi@OpenBSD.ORG
WRKSRC= ${WRKDIR}/ytalk-3.2
USE_IMAKE= yes
# otherwise pkg_create will think it went to /usr/X11R6
PREFIX= ${LOCALBASE}
.include <bsd.port.mk>

1
net/ytalk/files/md5 Normal file
View File

@ -0,0 +1 @@
MD5 (ytalk-v3pl2.tar.gz) = 50adeddda5950f8b2eef3c8ddcdbb05d

287
net/ytalk/patches/patch-aa Normal file
View File

@ -0,0 +1,287 @@
--- ./Imakefile.org Sat Aug 28 19:21:40 1993
+++ ./Imakefile Thu Mar 23 22:37:37 1995
@@ -1,64 +1,64 @@
-#### Imakefile for YTalk version 3.0 ####
-#
-# NOTICE
-#
-# Copyright (c) 1990,1992,1993 Britt Yenne. All rights reserved.
-#
-# This software is provided AS-IS. The author gives no warranty,
-# real or assumed, and takes no responsibility whatsoever for any
-# use or misuse of this software, or any damage created by its use
-# or misuse.
-#
-# This software may be freely copied and distributed provided that
-# no part of this NOTICE is deleted or edited in any manner.
-#
-
-###################################
-## CONFIGURATION (The Fun Part) ##
-###################################
-#
-# If your machine does not support TERMIOS (example: any NeXT running
-# NeXTStep up to and including version 3.1), then uncomment the following
-# line.
+XCOMM ### Imakefile for YTalk version 3.0 ####
+XCOMM
+XCOMM NOTICE
+XCOMM
+XCOMM Copyright (c) 1990,1992,1993 Britt Yenne. All rights reserved.
+XCOMM
+XCOMM This software is provided AS-IS. The author gives no warranty,
+XCOMM real or assumed, and takes no responsibility whatsoever for any
+XCOMM use or misuse of this software, or any damage created by its use
+XCOMM or misuse.
+XCOMM
+XCOMM This software may be freely copied and distributed provided that
+XCOMM no part of this NOTICE is deleted or edited in any manner.
+XCOMM
+
+XCOMM ##################################
+XCOMM # CONFIGURATION (The Fun Part) ##
+XCOMM ##################################
+XCOMM
+XCOMM If your machine does not support TERMIOS (example: any NeXT running
+XCOMM NeXTStep up to and including version 3.1), then uncomment the following
+XCOMM line.
-#TDEFS = -DUSE_SGTTY
+XCOMM TDEFS = -DUSE_SGTTY
-#
-# If you are running an older Sun OS using YP (now known as NIS), you might
-# need to uncomment the next line if ytalk asks you "Who are you?"
+XCOMM
+XCOMM If you are running an older Sun OS using YP (now known as NIS), you might
+XCOMM need to uncomment the next line if ytalk asks you "Who are you?"
-#SLIBS = -lsun
+XCOMM SLIBS = -lsun
-#
-# If you are on a sun running solaris 2.* you might need to uncomment the
-# following line.
+XCOMM
+XCOMM If you are on a sun running solaris 2.* you might need to uncomment the
+XCOMM following line.
-#SLIBS = -lnsl -lsocket
+XCOMM SLIBS = -lnsl -lsocket
-#
-# If your machine has a 64-bit architecture or uses 64-bit 'long's, then you
-# will need to uncomment the following line.
+XCOMM
+XCOMM If your machine has a 64-bit architecture or uses 64-bit 'long's, then you
+XCOMM will need to uncomment the following line.
-#BDEFS = -DY64BIT
+XCOMM BDEFS = -DY64BIT
-#
-# If you have (or want) a system-wide .ytalkrc file, uncomment the next
-# line and set it to the correct pathname. The backslashes must remain
-# before each double-quote.
+XCOMM
+XCOMM If you have (or want) a system-wide .ytalkrc file, uncomment the next
+XCOMM line and set it to the correct pathname. The backslashes must remain
+XCOMM before each double-quote.
-#RCDEF = -DSYSTEM_YTALKRC=\"/usr/local/etc/ytalkrc\"
+XCOMM RCDEF = -DSYSTEM_YTALKRC=\"/usr/local/etc/ytalkrc\"
-#
-# If you plan to install ytalk on your system, you may want to modify
-# the following lines. Y_BINDIR is where the binary will be placed.
-# Y_MANDIR is where the manpage will be placed.
+XCOMM
+XCOMM If you plan to install ytalk on your system, you may want to modify
+XCOMM the following lines. Y_BINDIR is where the binary will be placed.
+XCOMM Y_MANDIR is where the manpage will be placed.
Y_BINDIR = /usr/local/bin
Y_MANDIR = /usr/local/man/man1
-############################################################
-## Past this point, you shouldn't need to modify anything ##
-############################################################
+XCOMM ###########################################################
+XCOMM # Past this point, you shouldn't need to modify anything ##
+XCOMM ###########################################################
LIB = -lcurses -ltermcap $(SLIBS) $(XLIB)
DEFINES = -DUSE_X11 -I/usr/local/include $(TDEFS) $(BDEFS) $(RCDEF)
LDFLAGS = $(LDOPTIONS)
@@ -66,7 +66,7 @@
xwin.o
PRG = ytalk
-all: $(PRG) ytalk.cat
+all:: $(PRG) ytalk.cat
$(PRG): $(OBJ)
$(CC) $(LDFLAGS) -o $(PRG) $(OBJ) $(LIB)
@@ -86,7 +86,10 @@
install:: $(PRG)
/bin/cp ytalk $(Y_BINDIR)
+ /usr/bin/strip $(Y_BINDIR)/ytalk
/bin/cp ytalk.1 $(Y_MANDIR)
+ /bin/chmod 644 $(Y_MANDIR)/ytalk.1
+ gzip -9nf $(Y_MANDIR)/ytalk.1
@echo "Ytalk installation complete."
$(OBJ): header.h
--- ./socket.c.org Sun Nov 21 08:32:18 1993
+++ ./socket.c Thu Mar 23 22:35:09 1995
@@ -54,6 +54,9 @@
int fd, socklen;
sock->sin_family = AF_INET;
+#ifdef OS386BSD
+ sock->sin_len = 0;
+#endif
IN_ADDR(*sock) = INADDR_ANY;
IN_PORT(*sock) = 0;
if((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
@@ -157,6 +160,9 @@
int socklen;
autosock.sin_family = AF_INET;
+#ifdef OS386BSD
+ autosock.sin_len = 0;
+#endif
IN_ADDR(autosock) = INADDR_ANY;
IN_PORT(autosock) = 0;
if((autofd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
@@ -212,7 +218,12 @@
}
if(r == NULL)
IN_ADDR(*sock) = me->host_addr;
+#ifndef OS386BSD
sock->sin_family = htons(AF_INET);
+#else
+ sock->sin_family = AF_INET;
+ sock->sin_len = 0;
+#endif
}
/* sendit() sends the completed message to the talk daemon at the given
@@ -261,6 +272,9 @@
/* set up a sockaddr_in for the daemon we're sending to */
daemon.sin_family = AF_INET;
+#ifdef OS386BSD
+ daemon.sin_len = 0;
+#endif
IN_ADDR(daemon) = addr;
IN_PORT(daemon) = talkd[d].port;
@@ -358,6 +372,9 @@
for(; c >= (char *)&orsp.id_num; c--)
*c = *(c-2);
}
+#ifdef OS386BSD
+ orsp.addr.sin_len = 0;
+#endif
}
/* Fill in the new talk response structure if we just read an
@@ -398,6 +415,9 @@
return h->dtype;
daemon.sin_family = AF_INET;
+#ifdef OS386BSD
+ daemon.sin_len = 0;
+#endif
IN_ADDR(daemon) = addr;
m1 = omsg;
@@ -411,7 +431,12 @@
m1.r_tty[0] = m2.r_tty[0] = '\0';
strcpy(m1.r_name, "ytalk");
strcpy(m2.r_name, "ytalk");
+#ifndef OS386BSD
m1.addr.sin_family = m2.addr.sin_family = htons(AF_INET);
+#else
+ m1.addr.sin_family = m2.addr.sin_family = AF_INET;
+ m1.addr.sin_len = m2.addr.sin_len = 0;
+#endif
out = 0;
for(i = 0; i < 5; i++)
@@ -651,7 +676,12 @@
strncpy(nmsg.r_tty, user->tty_name, TTY_SIZE);
}
nmsg.addr = user->sock;
+#ifndef OS386BSD
nmsg.addr.sin_family = htons(AF_INET);
+#else
+ nmsg.addr.sin_family = AF_INET;
+ nmsg.addr.sin_len = 0;
+#endif
if(sendit(addr, d) != 0)
{
if(type == AUTO_LOOK_UP || type == AUTO_DELETE)
@@ -693,7 +723,12 @@
strcpy(nmsg.r_name, "+AUTO");
nmsg.r_tty[0] = '\0';
nmsg.addr = autosock;
+#ifndef OS386BSD
nmsg.addr.sin_family = htons(AF_INET);
+#else
+ nmsg.addr.sin_family = AF_INET;
+ nmsg.addr.sin_len = 0;
+#endif
rc = 0;
dtype = find_daemon(me->host_addr);
@@ -737,6 +772,9 @@
int socklen, fd;
user->sock.sin_family = AF_INET;
+#ifdef OS386BSD
+ user->sock.sin_len = 0;
+#endif
IN_ADDR(user->sock) = INADDR_ANY;
IN_PORT(user->sock) = 0;
if((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
@@ -782,7 +820,9 @@
orig_sock = *(struct sockaddr_in *)&nrsp.addr;
orig_sock.sin_family = AF_INET;
-
+#ifdef OS386BSD
+ orig_sock.sin_len = 0;
+#endif
/* it could be one of mine... */
for(u = user_list; u; u = u->unext)
if(SOCK_EQUAL(orig_sock, u->orig_sock))
--- ./header.h.org Sun Nov 21 08:32:16 1993
+++ ./header.h Thu Mar 23 22:35:09 1995
@@ -16,6 +16,15 @@
/* Mail comments or questions to ytalk@austin.eds.com */
+/* ---- Sze-Yao Ni: compatibility for NetBSD and FreeBSD,
+ from jeli@csie.nctu.edu.tw ---- */
+#ifdef __NetBSD__
+# define OS386BSD
+#endif
+#ifdef __FreeBSD__
+# define OS386BSD
+#endif
+
#include <sys/types.h>
#ifdef LINUX
# include <linux/param.h>
@@ -223,7 +232,9 @@
/* ---- global variables ---- */
+#ifndef OS386BSD
extern char *sys_errlist[]; /* system errors */
+#endif
extern yuser *me; /* just lil' ol' me */
extern yuser *user_list; /* full list of invited/connected users */

157
net/ytalk/patches/patch-ab Normal file
View File

@ -0,0 +1,157 @@
*** comm.c.old Sun Nov 21 19:32:17 1993
--- comm.c Sun Mar 26 22:05:51 1995
***************
*** 20,25 ****
--- 20,26 ----
#include "socket.h"
#include "menu.h"
#include <sys/uio.h>
+ #include <ctype.h>
ychar *io_ptr; /* user input pointer */
int io_len = 0; /* user input count */
***************
*** 1157,1163 ****
}
for(; len > 0; len--, buf++)
{
! if(*buf >= ' ' && *buf <= '~')
{
if(user->x + 1 >= user->cols)
{
--- 1158,1164 ----
}
for(; len > 0; len--, buf++)
{
! if(isprint(*buf))
{
if(user->x + 1 >= user->cols)
{
*** menu.c.old Sun Aug 29 06:22:27 1993
--- menu.c Sun Mar 26 22:03:00 1995
***************
*** 18,23 ****
--- 18,24 ----
#include "header.h"
#include <fcntl.h>
+ #include <ctype.h>
#include "menu.h"
/* This particular file was written real early one night (morning?)
***************
*** 321,327 ****
{
ic = *(io_ptr++);
! if(ic > ' ' && ic <= '~')
{
if(text_pos >= menu_long)
putc(7, stderr);
--- 322,328 ----
{
ic = *(io_ptr++);
! if(isgraph(ic))
{
if(text_pos >= menu_long)
putc(7, stderr);
***************
*** 411,417 ****
if(i < menu_line)
menu_line = i;
}
! else if(ic > ' ' && ic <= '~')
{
for(i = 0; i < menu_len; i++)
if(menu_ptr[i].key == ic && menu_ptr[i].func != NULL)
--- 412,418 ----
if(i < menu_line)
menu_line = i;
}
! else if(isgraph(ic))
{
for(i = 0; i < menu_len; i++)
if(menu_ptr[i].key == ic && menu_ptr[i].func != NULL)
***************
*** 575,581 ****
{
if((j = strlen(menu[i].item)) > menu_long)
menu_long = j;
! if(menu[i].key < ' ' || menu[i].key >= '~')
{
show_error("show_menu: invalid key");
return -1;
--- 576,582 ----
{
if((j = strlen(menu[i].item)) > menu_long)
menu_long = j;
! if(!isprint(menu[i].key))
{
show_error("show_menu: invalid key");
return -1;
*** term.c.old Sun Nov 21 19:32:19 1993
--- term.c Sun Mar 26 22:06:38 1995
***************
*** 18,23 ****
--- 18,24 ----
#include "header.h"
#include <sys/ioctl.h>
+ #include <ctype.h>
#ifdef USE_SGTTY
# ifdef hpux
# include <sys/bsdtty.h>
***************
*** 279,285 ****
register yuser *user;
register ychar c;
{
! if(c >= ' ' && c <= '~')
{
_addch_term(user, c);
user->scr[user->y][user->x] = c;
--- 280,286 ----
register yuser *user;
register ychar c;
{
! if(isprint(c))
{
_addch_term(user, c);
user->scr[user->y][user->x] = c;
***************
*** 1163,1169 ****
{
if(*c == '\0')
c = str;
! if(*c < ' ' || *c > '~')
return;
_addch_term(user, *c);
}
--- 1164,1170 ----
{
if(*c == '\0')
c = str;
! if(!isprint(*c))
return;
_addch_term(user, *c);
}
*** header.h.bak Sun Mar 26 22:11:27 1995
--- header.h Sun Mar 26 22:25:35 1995
***************
*** 158,164 ****
#define KILL edit[1]
#define WORD edit[2]
#define CLR edit[3]
! #define RUBDEF 0xfe
/* ---- Ytalk version 3.* out-of-band data ---- */
--- 158,164 ----
#define KILL edit[1]
#define WORD edit[2]
#define CLR edit[3]
! #define RUBDEF 0x7f
/* ---- Ytalk version 3.* out-of-band data ---- */

1
net/ytalk/pkg/COMMENT Normal file
View File

@ -0,0 +1 @@
A new "talk" that can talk to multiple parties at once

8
net/ytalk/pkg/DESCR Normal file
View File

@ -0,0 +1,8 @@
This is ytalk-3.0 patchlevel 2.
YTalk is in essence a multi-user chat program. It works almost
exactly like the UNIX talk program and even communicates with the same
talk daemon(s), but YTalk allows for multiple connections.
- Satoshi
asami@cs.berkeley.edu

2
net/ytalk/pkg/PLIST Normal file
View File

@ -0,0 +1,2 @@
bin/ytalk
man/man1/ytalk.1.gz