[Midnightbsd-cvs] mports: mports/net: Telnet + zmodem transfer

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue Feb 26 21:01:39 EST 2008


Log Message:
-----------
Telnet + zmodem transfer

Modified Files:
--------------
    mports/net:
        Makefile (r1.57 -> r1.58)

Added Files:
-----------
    mports/net/ztelnet:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
    mports/net/ztelnet/files:
        patch-aa (r1.1)
        patch-ad (r1.1)
        patch-af (r1.1)
        patch-ag (r1.1)
        patch-ah (r1.1)
        patch-ai (r1.1)
        patch-aj (r1.1)
        patch-ak (r1.1)
        patch-al (r1.1)
        patch-am (r1.1)
        patch-an (r1.1)
        patch-ao (r1.1)
        patch-ap (r1.1)
        patch-aq (r1.1)
        patch-ar (r1.1)
        patch-as (r1.1)
        patch-at (r1.1)
        patch-au (r1.1)
        patch-av (r1.1)
        patch-aw (r1.1)
        patch-ax (r1.1)
        patch-ay (r1.1)
        patch-az (r1.1)
        patch-ba (r1.1)

-------------- next part --------------
--- /dev/null
+++ net/ztelnet/pkg-descr
@@ -0,0 +1,11 @@
+ztelnet
+-------
+
+ztelnet is telnet hack(from BSD source) to do zmodem transfer.
+It is useful for zmodem transfer in BBS.  You can upload and download
+file using the Zmodem sz/rz command from within telnet.
+
+By default, the 8-bit transfer option(-8) is implied.
+
+Thanks to Pyun, Yong-Hun <yongari at michell.kotel.co.kr> and
+Carl Mascott <cmascott at world.std.com> for the FreeBSD patches.
--- /dev/null
+++ net/ztelnet/Makefile
@@ -0,0 +1,50 @@
+# New ports collection makefile for:    ztelnet
+# Date created:         15 Mar 1998
+# Whom:                 CHOI Junho <junker at jazz.snu.ac.kr>
+#
+# $MidnightBSD: mports/net/ztelnet/Makefile,v 1.1 2008/02/27 02:01:36 laffer1 Exp $
+# $FreeBSD: ports/net/ztelnet/Makefile,v 1.22 2007/10/01 06:16:12 linimon Exp $
+#
+
+PORTNAME=	ztelnet
+PORTVERSION=	1.0.p3
+CATEGORIES=	net
+MASTER_SITES=	http://www.exit.com/Archives/FreeBSD/
+DISTFILES=	ztelnet-linux.tar.gz ztelnet-patch.tar.gz \
+		ztelnet-patch-cmascott.tar.gz
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Telnet program with zmodem transfer
+LICENSE=	restricted
+
+RESTRICTED=	"zmodem code has restrictive copyright"
+
+NO_WRKSUBDIR=	yes
+PATCH_STRIP=	-p1
+MAN1=		ztelnet.1
+PLIST_FILES=	bin/ztelnet
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+	# we can ignore warnings
+	@( cd ${WRKSRC}/ztelnet && \
+	${PATCH} -s -p1 < ${WRKSRC}/ztelnet.patch || \
+	${TRUE} ) > /dev/null 2>&1
+	# but it is not
+	@cd ${WRKSRC}/ztelnet && \
+	${PATCH} -s -p1 < ${WRKSRC}/rz.patch && \
+	${PATCH} -s -p1 < ${WRKSRC}/sz.patch
+
+do-build:
+	@cd ${WRKSRC}/ztelnet && \
+	${MAKE} clean && \
+	${MAKE} 4.4bsd
+
+do-install:
+	@cd ${WRKSRC}/ztelnet; \
+	${MKDIR} ${PREFIX}/bin; \
+	${INSTALL_PROGRAM} telnet/telnet ${PREFIX}/bin/ztelnet
+	${INSTALL_MAN} ${WRKSRC}/ztelnet.1 ${PREFIX}/man/man1/ztelnet.1
+
+.include <bsd.port.post.mk>
--- /dev/null
+++ net/ztelnet/distinfo
@@ -0,0 +1,9 @@
+MD5 (ztelnet-linux.tar.gz) = 01a24b1b70f8e26e6f4c4fe2aabcc055
+SHA256 (ztelnet-linux.tar.gz) = d07958ae72ed0fc701ec473ed268642c9f120ab3d0a1bc83a3433d3dff824013
+SIZE (ztelnet-linux.tar.gz) = 211628
+MD5 (ztelnet-patch.tar.gz) = d9bab9d4ffaa09db5eaa099af854cd77
+SHA256 (ztelnet-patch.tar.gz) = 1561c10371740b5d094f99a6216b8041e1ae1080108954761ffab53ceb368a3f
+SIZE (ztelnet-patch.tar.gz) = 2591
+MD5 (ztelnet-patch-cmascott.tar.gz) = abb288bcce6a739eb3ddbc4613ceadab
+SHA256 (ztelnet-patch-cmascott.tar.gz) = 8c68403b4bcf0b555cd91dc01ab28e4dbbb65faae95d258b401ca3c4d6725812
+SIZE (ztelnet-patch-cmascott.tar.gz) = 9593
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/net/Makefile,v
retrieving revision 1.57
retrieving revision 1.58
diff -L net/Makefile -L net/Makefile -u -r1.57 -r1.58
--- net/Makefile
+++ net/Makefile
@@ -68,5 +68,6 @@
     SUBDIR += xmlrpc-epi
     SUBDIR += yaz
     SUBDIR += zillion
+    SUBDIR += ztelnet
 
 .include <bsd.port.subdir.mk>
--- /dev/null
+++ net/ztelnet/files/patch-as
@@ -0,0 +1,13 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/zmodem/rbsb.c work/ztelnet/zmodem/rbsb.c
+--- work.old/ztelnet/zmodem/rbsb.c	Mon Apr 24 23:09:14 1995
++++ work/ztelnet/zmodem/rbsb.c	Tue Jun 20 22:58:32 2000
+@@ -7,6 +7,9 @@
+ 
+ STATIC char *Copyr = "Copyright 1993 Omen Technology Inc All Rights Reserved";
+ 
++#undef V7
++#define POSIX
++
+ #ifdef V7
+ #include <sys/types.h>
+ #include <sys/stat.h>
--- /dev/null
+++ net/ztelnet/files/patch-ai
@@ -0,0 +1,41 @@
+--- work.old/ztelnet/libtelnet/Makefile.generic.orig	Wed Sep 20 12:52:44 1995
++++ work/ztelnet/libtelnet/Makefile.generic	Thu Jun  6 23:23:00 2002
+@@ -19,32 +19,24 @@
+ #	@(#)Makefile.generic	5.5 (Berkeley) 3/1/91
+ #
+ 
+-LIB=	libtelnet.a
+-SRCS=	auth.c encrypt.c genget.c \
++LIB=    libtelnet.a
++SRCS=   auth.c encrypt.c genget.c \
+ 	misc.c enc_des.c \
+ 	setenv.c getent.c strdup.c strcasecmp.c \
+ 	strchr.c strrchr.c strftime.c strerror.c \
+ 	${LIB_SRC}
+ 
+-OBJS=	auth.o encrypt.o genget.o \
++OBJS=   auth.o encrypt.o genget.o \
+ 	misc.o enc_des.o \
+ 	${LIB_OBJ}
+ 
+-ifeq (linux,${LINUX})
+-TELNET_H=	../arpa/tel-lnx.h
+-CFLAGS=	${LCCFLAGS} ${INCLUDES} ${DEFINES}
+-else
+-TELNET_H=	../arpa/telnet.h
+-CFLAGS=	-O ${DEFINES} ${INCLUDES}
+-endif
++TELNET_H= ../arpa/telnet.h
++
++CFLAGS+= ${DEFINES} ${INCLUDES}
+ 
+ ${LIB}: ${OBJS}
+ 	rm -f ${LIB}
+-ifeq (linux,${LINUX})
+-	${AR} ${ARFLAGS} ${LIB} ${OBJS}
+-else
+ 	${AR} ${ARFLAGS} ${LIB} `lorder ${OBJS} | tsort`
+-endif
+ 	@if [ ${RANLIB} != NONE ]; \
+ 		then echo ${RANLIB} ${LIB}; ${RANLIB} ${LIB}; fi
+ 
--- /dev/null
+++ net/ztelnet/files/patch-ap
@@ -0,0 +1,440 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/telnet/telnet.1 work/ztelnet/telnet/telnet.1
+--- work.old/ztelnet/telnet/telnet.1	Tue Mar 26 07:14:28 1991
++++ work/ztelnet/telnet/telnet.1	Tue Jun 20 22:58:33 2000
+@@ -18,15 +18,15 @@
+ .\"     @(#)telnet.1	6.13 (Berkeley) 7/28/90
+ .\"
+ .Dd July 28, 1990
+-.Dt TELNET 1
++.Dt ZTELNET 1
+ .Os BSD 4.2
+ .Sh NAME
+-.Nm telnet
++.Nm ztelnet
+ .Nd User interface to the 
+ .Li TELNET
+-protocol
++protocol, with support for Zmodem file transfers.
+ .Sh SYNOPSIS
+-.Nm telnet
++.Nm ztelnet
+ .Op Fl 8
+ .Op Fl E
+ .Op Fl K
+@@ -47,23 +47,32 @@
+ .Oe
+ .Sh DESCRIPTION
+ The
+-.Nm telnet
++.Nm ztelnet
+ command
+ is used to communicate with another host using the 
+ .Li TELNET
+ protocol.
+ If
+-.Nm telnet
++.Nm ztelnet
+ is invoked without the
+ .Ar host
+ argument, it enters command mode,
+ indicated by its prompt
+-.Pq Nm telnet\&> .
++.Pq Nm ztelnet\&> .
+ In this mode, it accepts and executes the commands listed below.
+ If it is invoked with arguments, it performs an
+ .Ic open
+ command with those arguments.
+ .Pp
++To perform Zmodem file transfers, issue the appropriate Zmodem command on
++the remote host.  Then hit the
++.Nm
++command line escape key (^]) and issue the appropriate Zmodem command for
++the local host.  Typically these commands would be
++.Nm sz
++and 
++.Nm rz .
++.Pp
+ Options:
+ .Tw Fl
+ .Tp Fl 8
+@@ -116,7 +125,7 @@
+ .Cx
+ Sets the initial
+ .Nm
+-.B telnet
++.B ztelnet
+ escape character to
+ .Ar escape char.
+ If
+@@ -130,7 +139,7 @@
+ If Kerberos authentication is being used, the
+ .Fl k
+ option requests that
+-.Nm telnet
++.Nm ztelnet
+ obtain tickets for the remote host in realm
+ .Ar realm
+ instead of the remote host's
+@@ -175,13 +184,13 @@
+ .Tp Ar port
+ Indicates a port number (address of an application) or name.  If a number is
+ not specified, the default
+-.Nm telnet
++.Nm ztelnet
+ port is used.
+ Port names are mapped to port numbers via the
+ /etc/services
+ file.
+ Normally when a port number is specified,
+-.Nm telnet
++.Nm ztelnet
+ will not send out any initial
+ .Li TELNET
+ option negotiation.
+@@ -199,19 +208,19 @@
+ .Nm
+ escape character.
+ Similarly, the line ``~^Z'' will suspend the
+-.Nm telnet
++.Nm ztelnet
+ session.
+ The line ``~^]'' will escape to the normal
+-.Nm telnet
++.Nm ztelnet
+ escape prompt.
+ .Pp
+ Once a connection has been opened,
+-.Nm telnet
++.Nm ztelnet
+ will attempt to enable the
+ .Li TELNET LINEMODE
+ option.
+ If this fails, then
+-.Nm telnet
++.Nm ztelnet
+ will revert to one of two input modes:
+ either \*(Lqcharacter at a time\*(Rq
+ or \*(Lqold line by line\*(Rq
+@@ -281,15 +290,15 @@
+ .Ic intr  ) .
+ .Pp
+ While connected to a remote host,
+-.Nm telnet
++.Nm ztelnet
+ command mode may be entered by typing the
+-.Nm telnet
++.Nm ztelnet
+ \*(Lqescape character\*(Rq (initially \*(Lq^
+ \*(Rq).
+ When in command mode, the normal terminal editing conventions are available.
+ .Pp
+ The following
+-.Nm telnet
++.Nm ztelnet
+ commands are available.
+ Only enough of each command to uniquely identify it need be typed
+ (this is also true for most of the arguments to the
+@@ -659,7 +668,7 @@
+ Open a connection to the named host.
+ If no port number
+ is specified,
+-.Nm telnet
++.Nm ztelnet
+ will attempt to contact a
+ .Li TELNET
+ server at the default port.
+@@ -674,7 +683,7 @@
+ .Li ENVIRON
+ option.
+ When connecting to a non-standard port,
+-.Nm telnet
++.Nm ztelnet
+ omits any automatic initiation of
+ .Li TELNET
+ options.  When the port number is preceded by a minus sign,
+@@ -696,10 +705,10 @@
+ first thing on the line is the name of the machine that is
+ being connected to.  The rest of the line, and successive
+ lines that begin with whitespace are assumed to be
+-.Nm telnet
++.Nm ztelnet
+ commands and are processed as if they had been typed
+ in manually to the
+-.Nm telnet
++.Nm ztelnet
+ command prompt.
+ The special machine name
+ .Ic DEFAULT
+@@ -714,7 +723,7 @@
+ Close any open
+ .Li TELNET
+ session and exit
+-.Nm telnet  .
++.Nm ztelnet  .
+ An end of file (in command mode) will also close a session and exit.
+ .\" ######## END the "quit" command
+ .\"
+@@ -776,7 +785,7 @@
+ sequence.
+ .Tp Ic escape
+ Sends the current
+-.Nm telnet
++.Nm ztelnet
+ escape character (initially \*(Lq^\*(Rq).
+ .Tp Ic ga
+ Sends the
+@@ -833,7 +842,7 @@
+ The
+ .Ic set
+ command will set any one of a number of
+-.Nm telnet
++.Nm ztelnet
+ variables to a specific value or to TRUE.
+ The special value
+ .Ic off
+@@ -859,7 +868,7 @@
+ .Tw Fl
+ .Tp Ic ayt
+ If
+-.Nm telnet
++.Nm ztelnet
+ is in
+ .Ic localchars
+ mode, or
+@@ -884,7 +893,7 @@
+ echoing of entered characters (for entering, say, a password).
+ .Tp Ic eof
+ If
+-.Nm telnet
++.Nm ztelnet
+ is operating in
+ .Li LINEMODE
+ or \*(Lqold line by line\*(Rq mode, entering this character
+@@ -895,7 +904,7 @@
+ character.
+ .Tp Ic erase
+ If
+-.Nm telnet
++.Nm ztelnet
+ is in
+ .Ic localchars
+ mode (see
+@@ -904,7 +913,7 @@
+ below),
+ .Sy and
+ if
+-.Nm telnet
++.Nm ztelnet
+ is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
+ character is typed, a
+ .Li TELNET EC
+@@ -919,14 +928,14 @@
+ character.
+ .Tp Ic escape
+ This is the
+-.Nm telnet
++.Nm ztelnet
+ escape character (initially \*(Lq^[\*(Rq) which causes entry
+ into
+-.Nm telnet
++.Nm ztelnet
+ command mode (when connected to a remote system).
+ .Tp Ic flushoutput
+ If
+-.Nm telnet
++.Nm ztelnet
+ is in
+ .Ic localchars
+ mode (see
+@@ -949,7 +958,7 @@
+ .Tp Ic forw1
+ .Tp Ic forw2
+ If
+-.Nm telnet
++.Nm ztelnet
+ is operating in
+ .Li LINEMODE,
+ these are the characters that, when typed,
+@@ -962,7 +971,7 @@
+ characters.
+ .Tp Ic interrupt
+ If
+-.Nm telnet
++.Nm ztelnet
+ is in
+ .Ic localchars
+ mode (see
+@@ -984,7 +993,7 @@
+ character.
+ .Tp Ic kill
+ If
+-.Nm telnet
++.Nm ztelnet
+ is in
+ .Ic localchars
+ mode (see
+@@ -993,7 +1002,7 @@
+ below),
+ .Ic and
+ if
+-.Nm telnet
++.Nm ztelnet
+ is operating in \*(Lqcharacter at a time\*(Rq mode, then when this
+ character is typed, a
+ .Li TELNET EL
+@@ -1008,7 +1017,7 @@
+ character.
+ .Tp Ic lnext
+ If
+-.Nm telnet
++.Nm ztelnet
+ is operating in
+ .Li LINEMODE
+ or \*(Lqold line by line\*(Lq mode, then this character is taken to
+@@ -1021,7 +1030,7 @@
+ character.
+ .Tp Ic quit
+ If
+-.Nm telnet
++.Nm ztelnet
+ is in
+ .Ic localchars
+ mode (see
+@@ -1043,7 +1052,7 @@
+ character.
+ .Tp Ic reprint
+ If
+-.Nm telnet
++.Nm ztelnet
+ is operating in
+ .Li LINEMODE
+ or \*(Lqold line by line\*(Lq mode, then this character is taken to
+@@ -1057,14 +1066,14 @@
+ .Tp Ic rlogin
+ This is the rlogin escape character.
+ If set, the normal
+-.Nm telnet
++.Nm ztelnet
+ .Ic escape
+ character will be ignored unless it is preceded by this character
+ at the beginning of a line.
+ This character, at the beginning of a line, followed by a ``.''
+ will close the connection; when followed by a ``^Z'' it will
+ suspend the
+-.Nm telnet
++.Nm ztelnet
+ command.
+ The initial state is to have the
+ .Ic rlogin
+@@ -1095,7 +1104,7 @@
+ character.
+ .Tp Ic susp
+ If
+-.Nm telnet
++.Nm ztelnet
+ is in
+ .Ic localchars
+ mode, or
+@@ -1124,7 +1133,7 @@
+ then tracing information will be written to standard output (the default).
+ .Tp Ic worderase
+ If
+-.Nm telnet
++.Nm ztelnet
+ is operating in
+ .Li LINEMODE
+ or \*(Lqold line by line\*(Lq mode, then this character is taken to
+@@ -1172,7 +1181,7 @@
+ Switch to the local defaults for the special characters.  The
+ local default characters are those of the local terminal at
+ the time when
+-.Nm telnet
++.Nm ztelnet
+ was started.
+ .Tp Ic import
+ Switch to the remote defaults for the special characters.
+@@ -1195,7 +1204,7 @@
+ .\" ######## BEGIN the "status" command
+ .Tp Ic status
+ Show the current status of
+-.Nm telnet  .
++.Nm ztelnet  .
+ This includes the peer one is connected to, as well
+ as the current mode.
+ .\" ######## END the "status" command
+@@ -1210,7 +1219,7 @@
+ and
+ FALSE)
+ various flags that control how
+-.Nm telnet
++.Nm ztelnet
+ responds to events.
+ These flags may be set explicitly to TRUE or FALSE
+ using the
+@@ -1242,7 +1251,7 @@
+ sequences; see
+ .Ic set
+ above for details),
+-.Nm telnet
++.Nm ztelnet
+ refuses to display any data on the user's terminal
+ until the remote system acknowledges (via a
+ .Li TELNET TIMING MARK
+@@ -1269,7 +1278,7 @@
+ If the
+ .Li TELNET AUTHENTICATION
+ option is supported by the remote side, then
+-.Nm telnet
++.Nm ztelnet
+ will attempt to use it to perform automatic authentication.
+ If the
+ .Li AUTHENTICATION
+@@ -1395,7 +1404,7 @@
+ The initial value for this toggle is FALSE.
+ .Tp Ic options
+ Toggles the display of some internal
+-.Nm telnet
++.Nm ztelnet
+ protocol processing (having to do with
+ .Li TELNET
+ options).
+@@ -1421,7 +1430,7 @@
+ .Ic skiprc
+ toggle
+ is TRUE, then
+-.Nm telnet
++.Nm ztelnet
+ will skip the reading of the
+ .Pa \&.telnetrc
+ file in the users home directory
+@@ -1434,7 +1443,7 @@
+ When the
+ .Ic verbose_encrypt
+ toggle is TRUE, then
+-.Nm telnet
++.Nm ztelnet
+ will print out a message each time encryption is
+ enabled or disabled.
+ The initial value for this toggle is FALSE.
+@@ -1448,7 +1457,7 @@
+ .\" ######## BEGIN the "z" command
+ .Tp Ic z
+ Suspend
+-.Nm telnet  .
++.Nm ztelnet  .
+ This command only works when the user is using the
+ .Xr csh  1  .
+ .\" ######## END the "z" command
+@@ -1471,10 +1480,10 @@
+ .Op Ar command
+ .Cx
+ Get help.  With no arguments,
+-.Nm telnet
++.Nm ztelnet
+ prints a help summary.
+ If a command is specified,
+-.Nm telnet
++.Nm ztelnet
+ will print the help information for just that command.
+ .\" ######## END the "!" command
+ .Sh ENVIRONMENT
--- /dev/null
+++ net/ztelnet/files/patch-ag
@@ -0,0 +1,57 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/README.ks work/ztelnet/README.ks
+--- work.old/ztelnet/README.ks	Sun Feb 12 23:44:25 1995
++++ work/ztelnet/README.ks	Tue Jun 20 22:58:31 2000
+@@ -7,19 +7,23 @@
+ > Install¹æ¹ý
+ 1. tar xvf ztelnet.tar
+ 2. cd ztelnet
+-3. make sun4.1 (´Ù¸¥ machineÀÏ °æ¿ì¿¡´Â ±×¿¡ ÇØ´çÇÏ´Â targetÀ» ÁöÁ¤
+-		target¾øÀÌ makeÇÏ¸é °¡´ÉÇÑ targetÀ» ¾Ë ¼ö ÀÖ´Ù.) 
+-4. ztelnet/telnet/telnet ÀÌ »õ·Î »ý±â´Â ½ÇÇà È­ÀÏ
++3. cd zmodem
++4. make bsd (´Ù¸¥ machineÀÏ °æ¿ì¿¡´Â ±×¿¡ ÇØ´çÇÏ´Â targetÀ» ÁöÁ¤
++		- target¾øÀÌ makeÇÏ¸é °¡´ÉÇÑ targetÀ» ¾Ë ¼ö ÀÖ´Ù.) 
++5. cd ..
++6. make sun4.1 (´Ù¸¥ machineÀÏ °æ¿ì¿¡´Â ±×¿¡ ÇØ´çÇÏ´Â targetÀ» ÁöÁ¤
++		- target¾øÀÌ makeÇÏ¸é °¡´ÉÇÑ targetÀ» ¾Ë ¼ö ÀÖ´Ù.) 
++7. ztelnet/telnet/telnet ÀÌ »õ·Î »ý±â´Â ½ÇÇà È­ÀÏ
+ 
+ > Down/Up¹æ¹ý
+ telnetÀ¸·Î BBS(õ¸®¾È ÇÏÀÌÅÚ ³ª¿ìÄÞµî)¿¡ Á¢¼ÓÇѵÚ
+-down/upÁغñ¸¦ ÇÑµÚ escape ¹®ÀÚ ( default´Â Ctrl-'[' )¸¦ 
++down/upÁغñ¸¦ ÇÑµÚ escape ¹®ÀÚ ( default´Â Ctrl-']' )¸¦ 
+ ÀÔ·ÂÇÏ¿© telnet command ¸í·ÉÀ¸·Î ºüÁ® ³ª¿Â´Ù.
+ binary»óÅ°¡ ¾Æ´Ï¸é "set bin" ÇÑ´Ù.
+ "rz" ȤÀº "sz" ÇÑ´Ù.
+ 
+ ÇöÀç sun°è¿­ÀÇ ÄÄÇ»ÅÍ¿¡¼­¸¸ test¸¦ Çغ¸¾Ò½À´Ï´Ù.
+-±×¸®°í ¸î°³ÀÇ Áß°£ ³ëµå¸¦ °ÅÃÄ Á¢¼ÓÇصµ ¿Ïº®ÇÏ°Ô
++±×¸®°í ¸î°³ÀÇ Áß°£ ³ëµå¸¦ °ÅÃÄ Á¢¼ÓÇصµ 
+ up/downÀÌ µË´Ï´Ù.
+ 
+ ¹®Á¦Á¡Àº ´Ù¿î Áß°£¿¡ NiceÇÏ°Ô °­Á¦·Î ³¡³»´Â °ÍÀÌ 
+@@ -30,15 +34,16 @@
+ 	1995. 2. 12
+ ¤Ô	ÇãÁØÇõ jhheo at dangun.kaist.ac.kr
+ --
+-                    ________
+-   ////|\\\\       / Nice   \
+-    | . . |       /  To      \
+-   O|  ^  |O   oO \ Meet you!/
+-    |  V  |  .'    \________/
+-    \_____/
++                  ________        ///|\\\\
++  ////|\\\\      / Nice   \ Oo   ////|\\\\\
++   | . . |      /  To      \  `.///_. ._\\\\ 
++  O|  ^  |O  oO \ Meet you!/   ///   ^   \\\\ 
++   |  V  | .'    \________/   ////| /O\ |\\\\\
++   \_____/                   //// \_____/ \\\\\
++            ---------------> \\\\         /////
+ 
+-If you ask me "what are you living for ?"
+-I will just smile......
++the good time's gone!
++ remember coming soon!
+ 
+        CSD KAIST 
+        the E-mail address 
--- /dev/null
+++ net/ztelnet/files/patch-an
@@ -0,0 +1,19 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/telnet/main.c work/ztelnet/telnet/main.c
+--- work.old/ztelnet/telnet/main.c	Wed Sep 20 05:54:56 1995
++++ work/ztelnet/telnet/main.c	Tue Jun 20 22:58:32 2000
+@@ -132,7 +132,6 @@
+ 		case 'S':
+ 		    {
+ #ifdef	HAS_GETTOS
+-#ifndef BYPMS
+ 			extern int tos;
+ 
+ 			if ((tos = parsetos(optarg, "tcp")) < 0)
+@@ -140,7 +139,6 @@
+ 					prompt, ": Bad TOS argument '",
+ 					optarg,
+ 					"; will try to use default TOS");
+-#endif /* PMS */
+ #else
+ 			fprintf(stderr,
+ 			   "%s: Warning: -S ignored, no parsetos() support.\n",
--- /dev/null
+++ net/ztelnet/files/patch-av
@@ -0,0 +1,130 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/zmodem/sz.c work/ztelnet/zmodem/sz.c
+--- work.old/ztelnet/zmodem/sz.c	Mon Apr 24 23:28:58 1995
++++ work/ztelnet/zmodem/sz.c	Tue Jun 20 22:58:34 2000
+@@ -1,3 +1,8 @@
++/*-----Apended by yongari -----*/
++#define MD	2
++#define V7
++#define strchr index
++/*----------------------------*/
+ #define STATIC  static
+ #define VERSION "3.25 2-11-95"
+ #define PUBDIR "/usr/spool/uucppublic"
+@@ -57,7 +62,10 @@
+ 
+ STATIC char *Copyrsz = "Copyright 1993 Omen Technology Inc All Rights Reserved";
+ 
+-STATIC char *substr(), *getenv();
++/* Removed by yongari */
++/* STATIC char *substr(), *getenv(); */
++STATIC char *substr();
++char *getenv(const char *name);
+ 
+ #define LOGFILE "/tmp/szlog"
+ #define LOGFILE2 "szlog"
+@@ -95,6 +103,26 @@
+ 
+ #define HOWMANY 250
+ 
++/*------Appended by yongari to shut up compiler------*/
++STATIC wcsend();
++STATIC wcs();
++STATIC wctxpn();
++STATIC getnak();
++STATIC wctx();
++STATIC wcputsec();
++STATIC filbuf();
++STATIC usage();
++STATIC getzrxinit();
++STATIC sendzsinit();
++STATIC zsendfile();
++STATIC zsendfdata();
++STATIC getinsync();
++STATIC zsendcmd();
++STATIC chkinvok();
++STATIC countem();
++STATIC init_sz();
++/*-----------------------------------------------------*/
++
+ STATIC int Zmodem=0;		/* ZMODEM protocol requested by receiver */
+ unsigned Baudrate = 19200;		/* Default, set by first mode() call */
+ STATIC unsigned Effbaud = 19200;
+@@ -108,8 +136,7 @@
+ #include "rbsb.c"	/* most of the system dependent stuff here */
+ 
+ #include "crctab.c"
+-/* PMS */
+-#include "sz.h"
++
+ STATIC int Filesleft;
+ STATIC unsigned long Totalleft;
+ 
+@@ -176,7 +203,9 @@
+ STATIC unsigned long Lastsync;	/* Last offset to which we got a ZRPOS */
+ STATIC int Beenhereb4;		/* How many times we've been ZRPOS'd here */
+ STATIC int Ksendstr;		/* 1= Send esc-?-3-4-l to remote kermit */
+-STATIC char *ksendbuf = "\033[?34l";
++/*-----Modified by yongri-----------*/
++/* STATIC char *ksendbuf = "\033[?34l"; */
++STATIC char ksendbuf[80];
+ 
+ /*STATIC jmp_buf tohere;	/* For the interrupt on RX timeout */
+ STATIC jmp_buf intrjmp;	/* For the interrupt on RX CAN */
+@@ -225,6 +254,7 @@
+ 
+ #include "zm.c"
+ #include "zmr.c"
++
+ sz(argc, argv)
+ char *argv[];
+ {
+@@ -243,7 +273,6 @@
+ 		Znulls = atoi(cp);
+ 	if ((cp=getenv("SHELL")) && (substr(cp, "rsh") || substr(cp, "rksh")))
+ 		Restricted=TRUE;
+-
+ 	chkinvok(argv[0]);
+ 
+ 	Rxtimeout = 600;
+@@ -428,17 +457,20 @@
+ 	if(errcnt || Exitcode)
+ 		Exit(1);
+ 
++#define sleep(x) 
+ #ifndef REGISTERED
+ 	/* Removing or disabling this code without registering is theft */
+ 	if (!Usevhdrs)  {
+ 		printf("\n\n\nPlease read the License Agreement in sz.doc\n");
+ 		fflush(stdout);
++		/* sleep(10); */
+ 		sleep(10);
+ 	}
+ #endif
+ 	Exit(0);
+ 	/*NOTREACHED*/
+ }
++#undef sleep
+ 
+ /* Say "bibi" to the receiver, try to do it cleanly */
+ STATIC void
+@@ -949,8 +981,7 @@
+ 	fprintf(stderr,"\nCopyright 1993 Omen Technology INC All Rights Reserved\n");
+ 	fprintf(stderr,
+ 	 "See sz.doc for option descriptions and licensing information.\n\n");
+-	fprintf(stderr,"Ported into telnet by Heo, Junhyeok, 1994.3.28\n");
+-	fprintf(stderr,"Linux porting by Park Myeong Seok,   1995.4.23\n");
++	fprintf(stderr,"\nPorted into telnet by Heo, junhyeok 1994.3.28\n");
+ 	Exit(3);
+ }
+ 
+@@ -1608,9 +1639,7 @@
+     Lastsync=0;
+     Beenhereb4=0;
+     Ksendstr=0;
+-/* By PMS
+-    strcpy(ksendbuf,"\033[?34l");
+-*/
++    strcpy(ksendbuf,"\033[?341l");
+     Zctlesc=0;
+     Nozmodem=0;
+     Zrwindow=1400;
--- /dev/null
+++ net/ztelnet/files/patch-au
@@ -0,0 +1,31 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/zmodem/rz.h work/ztelnet/zmodem/rz.h
+--- work.old/ztelnet/zmodem/rz.h	Mon Apr 24 23:21:57 1995
++++ work/ztelnet/zmodem/rz.h	Thu Jan  1 09:00:00 1970
+@@ -1,27 +0,0 @@
+-#ifndef STATIC
+-#define STATIC static
+-#endif
+-
+-STATIC void bibi(int n);
+-int rz(int argc, char *argv[]);
+-STATIC usage(void);
+-STATIC wcreceive(int argc, char **argp);
+-STATIC wcrxpn(char *rpn);
+-STATIC wcrx(void);
+-STATIC wcgetsec(char *rxbuf, int maxtime);
+-STATIC procheader(char *name);
+-STATIC openit(char *name, char *openmode);
+-STATIC make_dirs(register char *pathname);
+-STATIC putsec(char *buf, register n);
+-STATIC char *substr(register char *s, register char *t);
+-STATIC chkinvok(char *s);
+-STATIC checkpath(char *name);
+-STATIC void ackbibi(void);
+-STATIC tryz(void);
+-STATIC rzfiles(void);
+-STATIC rzfile(void);
+-STATIC closeit(void);
+-STATIC sys2(register char *s);
+-STATIC exec2(register char *s);
+-STATIC init_rz(void);
+-
--- /dev/null
+++ net/ztelnet/files/patch-ba
@@ -0,0 +1,17 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/zmodem/zmr.c work/ztelnet/zmodem/zmr.c
+--- work.old/ztelnet/zmodem/zmr.c	Mon Apr 24 23:07:17 1995
++++ work/ztelnet/zmodem/zmr.c	Tue Jun 20 22:58:33 2000
+@@ -38,9 +38,10 @@
+  *
+  *	ZMODEM RLE compression and decompression functions
+  */
+-/*PMS*/
+-static zsdar32(char*, int, int);
+-static zrdatr32(register char *buf, int length);
++/*--- Appended by yongari yo shut up compiler -----*/
++STATIC zsdar32();
++STATIC zrdatr32();
++/*-------------------------------------------------*/
+ 
+ /* Send data subpacket RLE encoded with 32 bit FCS */
+ STATIC zsdar32(buf, length, frameend)
--- /dev/null
+++ net/ztelnet/files/patch-at
@@ -0,0 +1,80 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/zmodem/rz.c work/ztelnet/zmodem/rz.c
+--- work.old/ztelnet/zmodem/rz.c	Mon Apr 24 23:28:22 1995
++++ work/ztelnet/zmodem/rz.c	Tue Jun 20 22:58:33 2000
+@@ -1,5 +1,8 @@
+-#define STATIC  static 
+-
++/*------Appended by yongari------*/
++#define V7
++#define NFGVMIN
++/*-------------------------------*/
++#define STATIC  static
+ #define VERSION "3.25 2-11-95"
+ #define PUBDIR "/usr/spool/uucppublic"
+ 
+@@ -82,6 +85,27 @@
+ #include <errno.h>
+ extern int errno;
+ 
++/*-----Appended by yongari to shut up compiler------*/
++STATIC usage();
++STATIC wcreceive();
++STATIC wcrxpn();
++STATIC wcrx();
++STATIC wcgetsec();
++STATIC procheader();
++STATIC openit();
++STATIC make_dirs();
++STATIC putsec();
++STATIC chkinvok();
++STATIC checkpath();
++STATIC tryz();
++STATIC rzfiles();
++STATIC rzfile();
++STATIC closeit();
++STATIC sys2();
++STATIC exec2();
++STATIC init_rz();
++/*--------------------------------------------------*/
++
+ #define OK 0
+ #define FALSE 0
+ #define TRUE 1
+@@ -195,10 +219,8 @@
+ 
+ #include "zm.c"
+ #include "zmr.c"
+-STATIC int tryzhdrtype=ZRINIT;	/* Header type to send corresponding to Last rx close */
+ 
+-/* PMS */
+-#include "rz.h"
++STATIC int tryzhdrtype=ZRINIT;	/* Header type to send corresponding to Last rx close */
+ 
+ /* called by signal interrupt or terminate to clean things up */
+ STATIC void
+@@ -308,6 +330,7 @@
+ 	fflush(stdout);
+ 	if(exitcode)
+ 		return(exitcode);
++#define sleep(x) 
+ #ifndef REGISTERED
+ 	/* Removing or disabling this code without registering is theft */
+ 	if (!Usevhdrs)  {
+@@ -316,6 +339,7 @@
+ 		sleep(10);
+ 	}
+ #endif
++#undef sleep
+ 	return(0);
+ }
+ 
+@@ -339,8 +363,7 @@
+ 	fprintf(stderr,"Copyright 1993 Omen Technology INC All Rights Reserved\n");
+ 	fprintf(stderr,
+ 	"See rz.doc for option descriptions and licensing information.\n\n");
+-	fprintf(stderr,"Ported into telnet by Heo, Junhyeok, 1994.3.28\n");
+-	fprintf(stderr,"Linux porting by Park Myeong Seok,   1995.4.23\n");
++	fprintf(stderr,"Ported into telnet by Heo, Junhyeok 1994.3.28\n");
+ 	Exit(2);
+ }
+ 
--- /dev/null
+++ net/ztelnet/files/patch-ao
@@ -0,0 +1,72 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/telnet/sys_bsd.c work/ztelnet/telnet/sys_bsd.c
+--- work.old/ztelnet/telnet/sys_bsd.c	Wed Sep 20 08:35:50 1995
++++ work/ztelnet/telnet/sys_bsd.c	Tue Jun 20 22:58:32 2000
+@@ -43,13 +43,16 @@
+ #include "externs.h"
+ #include "types.h"
+ 
+-/* PMS: BYPMS is added */
+-#if	defined(CRAY) || (defined(USE_TERMIO) && !defined(SYSV_TERMIO)) || defined(BYPMS)
++#if	defined(CRAY) || (defined(USE_TERMIO) && !defined(SYSV_TERMIO))
+ #define	SIG_FUNC_RET	void
+ #else
+ #define	SIG_FUNC_RET	int
+ #endif
+ 
++#ifdef  SIGINFO
++extern SIG_FUNC_RET ayt_status();
++#endif
++
+ int
+ 	tout,			/* Output file descriptor */
+ 	tin,			/* Input file descriptor */
+@@ -65,16 +68,9 @@
+ # define old_tc ottyb
+ 
+ #else	/* USE_TERMIO */
+-
+-#ifdef BYPMS
+-struct	termios old_tc = { 0 };
+-extern struct termios new_tc;
+-#else
+ struct	termio old_tc = { 0 };
+ extern struct termio new_tc;
+-#endif /* PMS */
+ 
+-#ifndef BYPMS
+ # ifndef	TCSANOW
+ #  ifdef TCSETS
+ #   define	TCSANOW		TCSETS
+@@ -100,7 +96,6 @@
+ #  endif
+ # endif /* TCSANOW */
+ #endif	/* USE_TERMIO */
+-#endif /* PMS */
+ 
+ static fd_set ibits, obits, xbits;
+ 
+@@ -166,11 +161,11 @@
+  *	1	Do add this character
+  */
+ 
++void xmitAO(), xmitEL(), xmitEC(), intp(), sendbrk();
+     int
+ TerminalSpecialChars(c)
+     int	c;
+ {
+-    void xmitAO(), xmitEL(), xmitEC(), intp(), sendbrk();
+ 
+     if (c == termIntChar) {
+ 	intp();
+@@ -382,11 +377,7 @@
+     struct sgttyb sb;
+     int lmode;
+ #else	/* USE_TERMIO */
+-#ifdef BYPMS
+-    struct termios tmp_tc;
+-#else
+     struct termio tmp_tc;
+-#endif /* PMS */
+ #endif	/* USE_TERMIO */
+     int onoff;
+     int old;
--- /dev/null
+++ net/ztelnet/files/patch-af
@@ -0,0 +1,78 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/README.LINUX.ks work/ztelnet/README.LINUX.ks
+--- work.old/ztelnet/README.LINUX.ks	Thu Sep 21 06:41:15 1995
++++ work/ztelnet/README.LINUX.ks	Thu Jan  1 09:00:00 1970
+@@ -1,74 +0,0 @@
+-=================================
+- ztel-lnx.tgz: ztelnet for Linux
+-=================================
+-
+-* ¼³Ä¡¹ý
+---------
+-1. make linux
+-2. mv ./telnet/telnet ~/bin/ztelnet
+-
+-* »ç¿ë»ó ÁÖÀÇ»çÇ×
+------------------
+-1. È£½ºÆ® Á¢¼ÓÈÄ escape ¹®ÀÚ´Â ^] (CTRL+])ÀÔ´Ï´Ù.
+-2. escape ÈÄ¿¡ set binÀ» ÇØÁà¾ßÁö ÆÄÀÏ Àü¼Û½Ã ¿¡·¯°¡ ¾È³³´Ï´Ù. 
+-3. ´Ù½Ã remote È£½ºÆ®·Î µ¹¾Æ°¡·Á¸é ±×³É enter¸¦ Ä¡¼¼¿ä.
+-4. set binÀ» Çؼ­ È­¸éÀÌ ±úÁö´Â °æ¿ì¿¡´Â ¾Æ¿¹ ztelnet -8 <host>
+-   Çؼ­ Á¢¼ÓÇØ º¸¼¼¿ä..
+-5. ÇÑ±Û ÀÔÃâ·ÂÀÌ µÇ¸é set binÀÌ ÀÌ¹Ì ¼³Á¤µÈ°ÍÀÔ´Ï´Ù.
+-6. ±âŸÀÇ »ç¿ë¹ýÀº escape ÈÄÀÇ ztelnet> ¸ðµå¿¡¼­ help¸¦ Ãĺ¸¼¼¿ä.
+-
+-* Ãʺ¸ÀÚ¸¦ À§ÇÑ »ç¿ë¿¹
+-----------------------
+-myhost: telnet -8 nowcom.co.kr                     # -8 ¿É¼ÇÀº set bin
+-nowcom: ... (ÀÚ·á½Ç·Î À̵¿) ...     
+-nowcom: dn <ÀÚ·á¹øÈ£>                              # ÀÚ·á º¸³»±â
+-nowcom: ... (zmodem protocolÀ» ½á¼­ ÀÚ·á Àü¼Û) ...
+-nowcom: ^]                                         # escape
+-ztelnet> rz                                        # ÀÚ·á ¹Þ±â
+-ztelnet> help                                      # ±âŸ µµ¿ò¸»
+-ztelnet> <¸®ÅÏ>                                    # ´Ù½Ã ³ª¿ìÄÞ
+-nowcom: 
+-
+-* °³¹ßÀÚ¸¦ À§ÇÑ À¯ÀÇ »çÇ×
+--------------------------
+-1. Config.generic ÆÄÀÏÀ» º¸½Ã¸é ¿©·¯°¡ÁöÀÇ DEFINEÀÌ ÀÖ½À´Ï´Ù. Á¦°¡ UNIX 
+-   ȯ°æÀ» Àß ¸ð¸£´Ù º¸´Ï Á¦´ë·Î DEFINEÀ» ÇÑ°ÍÀÎÁö Àß ¸ð¸£°Ú½À´Ï´Ù. ¸ø 
+-   ¹Ì´õ¿ì½Å ºÐµéÀº Config.generic¿¡¼­ linux: ºÎºÐÀÇ DEFINEÀ» ´õÇϰųª »©½Ã¸é 
+-   µË´Ï´Ù.
+-2. ÇãÁØÇõ´ÔÀÇ ¼Ò½º¸¦ ¼Õ»ó½ÃÅ°Áö ¾Ê±âÀ§ÇØ BYPMS¶ó´Â DEFINEÀ» ¸¸µé¾ú½À´Ï´Ù.
+-   BYPMS°¡ ¸¾¿¡ ¾ÈµéÁö¸¸ À̸¦ Á¤ÀÇÇÑ °ÍÀº µÎ°¡Áö ÀÌÀ¯¶§¹®ÀÔ´Ï´Ù.
+-   * ¸®´ª½º gccÀÇ ÄÄÆÄÀÏ ¿¡·¯¸¦ ¾ø¾Ö±â À§ÇØ :)
+-   * ¹Ì·¡ÀÇ ´©±º°¡°¡ ¸®´ª½º»Ó¸¸ ¾Æ´Ï¶ó ´Ù¸¥ ½Ã½ºÅÛ¿¡ ½±°Ô porting¶Ç´Â
+-     upgrade°¡ °¡´ÉÇÏ°Ô ÇÏ·Á°í ;<   
+-3. Linux¿Í ´Ù¸¥ UNIXÀÇ makefile°ú ccµîÀÌ ´Þ¶ó¼­ ±×·±Áö SUN 4.1.?¿¡¼­ 
+-   ÄÄÆÄÀÏ Çغôõ´Ï ¿¡·¯ Åõ¼ºÀ̳׿ä.. ¿¡°í Linux°¡ ¾Æ´Ñ ºÐµéÀº ÇãÁØÇõ´ÔÀÇ
+-   ¿ø·¡ ¼Ò½º¸¦ ¹Þ¾Æ´Ù°¡ ¼³Ä¡ÇϽñ⸦..
+-   ¾Æ¸¶ gcc¿Í GNU make°¡ ¼³Ä¡µÇ¾î ÀÖ´Ù¸é ¿¡·¯°¡ ¾È³¯Áöµµ..
+-4. ½Ã°£ÀÌ ¾ø¾î¼­ °íÄ£ ºÎºÐÀ» ¸í½ÃÇÏÁö´Â ¸øÇÏÁö¸¸ Á¦°¡ °íÄ£ ºÎºÐÀº
+-		grep PMS ~ztelnet/* | less
+-   ·Î È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.
+-5. ÀÌÀü¿¡´Â Config.localÀ» »ç¿ëÇß¾ú´Âµ¥ ¾Æ¿¹ Config.generic¿¡ linux ºÎºÐÀ»
+-   ³Ö¾î¹ö·È½À´Ï´Ù. ¾î´ÀÁ¤µµ ¸®´ª½º ȯ°æÀÌ °í·ÁµÇ¾ú´Ù°í ¹Ï±â ¶§¹®ÀÔ´Ï´Ù.
+-
+-Âü°í »çÇ×
+----------
+-1. ÀÌ ÇÁ·Î±×·¥Àº °øÂ¥Áö¸¸ ÀúÀÚµéÀÇ Çã¶ô¾øÀÌ´Â »ó¾÷ÀûÀÎ ¿ëµµ·Î ÀÌ¿ëµÉ ¼ö
+-   ¾ø½À´Ï´Ù.
+-2. ztelnetÀÇ ¿øÀúÀÚ´Â ÇãÁØÇõ´ÔÀÔ´Ï´Ù. ±× ¼Ò½º´Â
+-   ftp://dangun.kaist.ac.kr/???/ztelnet.tar.gz
+-   ÀÔ´Ï´Ù.
+-3. Linux¿ë ztelnetÀº ¾ÆÁ÷ ´Ù¸¥ ½Ã½ºÅÛ°ú ȣȯÀÌ ¾ÈµÇ±â ¶§¹®¿¡ À̸§ÀÌ ´Ù¸¨´Ï´Ù.
+-   ftp://romance.kaist.ac.kr/pub/linux/network/ztel-lnx.tgz
+-   °¡ ±× ¼Ò½º ÆÄÀÏÀÔ´Ï´Ù.
+-4. ¿¡°í ¿ì¸®³ª¶ó¿¡¼­µµ °øÂ¥·Î Á» ÁÁÀº ÇÁ·Î±×·¥ ¸¸µé¾î¼­ ¹èÆ÷ÇØÁÖ´Â
+-   »ç¶÷ÀÌ ¸¹ÀÌ »ý°åÀ¸¸é ÁÁ°Ú±º¿ä.. 
+-
+-* ztelnetÀ» ¸¸µå½Å ÇãÁØÇõ´Ô²² °¨»çµå¸³´Ï´Ù..
+-* Linux porting:  1995. 4. 23.
+-* Minor revision: 1995. 9. 20.
+-________________________________________________________________
+-  Park Myeong Seok, Dept. of Chem. Eng., KAIST, 305-701, Korea 
+-  BioProcess Lab. (Tel. +82-42-869-3967)                      
+-  E-mail: pms at romance.kaist.ac.kr/mspark at chiak.kaist.ac.kr     
+-================================================================
+-
--- /dev/null
+++ net/ztelnet/files/patch-ar
@@ -0,0 +1,159 @@
+--- work.old/ztelnet/zmodem/Makefile.orig	Tue Sep 19 17:20:41 1995
++++ work/ztelnet/zmodem/Makefile	Thu Jun  6 23:23:16 2002
+@@ -1,142 +1,19 @@
+-# Makefile for Unix/Xenix rz and sz programs
+-# the makefile is not too well tested yet
+-CFLAGS= -c -O
+-OBJS=sz.o rz.o
+-SRCS= rbsb.c minirb.c zm.c zmr.c crctab.c crc.c zmodem.h
+-ARCFILES= README rbsb.c gz *.t minirb.c zmodem.h \
+-	zm.c zmr.c crctab.c sz.c rz.c mailer.rz crc.c
++LIB=    librzsz.a
++SRCS=  rz.c sz.c
+ 
+-nothing:
+-	@echo
+-	@echo "Please study the #ifdef's in crctab.c, rbsb.c, rz.c and sz.c,"
+-	@echo "make any necessary hacks for oddball or merged SYSV/BSD systems,"
+-	@echo "then type 'make SYSTEM' where SYSTEM is one of:"
+-	@echo
+-	@echo "	posix	POSIX compliant systems"
+-	@echo "	linux	LINUX systems"
+-	@echo "	odt	SCO Open Desktop"
+-	@echo "	sysvr4	SYSTEM 5.4 Unix, SCO Open Desktop"
+-	@echo "	sysvr3	SYSTEM 5.3 Unix with mkdir(2)"
+-	@echo "	sysv	SYSTEM 3/5 Unix"
+-	@echo "	xenix	Xenix"
+-	@echo "	x386	386 Xenix"
+-	@echo "	bsd	Berkeley 4.x BSD, Ultrix, V7"
+-	@echo "	tandy	Tandy 6000 Xenix"
+-	@echo "	dnix	DIAB Dnix 5.2"
+-	@echo "	dnix5r3	DIAB Dnix 5.3"
+-	@echo "	amiga	3000UX running SVR4"
+-	@echo "	POSIX	POSIX compliant systems (SCO Open Desktop, strict)"
+-	@echo
+-	@echo "	doc	Format the man pages with nroff"
+-	@echo
++OBJS=  rz.o sz.o \
++	${LIB_OBJ}
+ 
+-usenet:doc
+-	shar -c -a -n rzsz -o /tmp/rzsz -l64 \
+-	  README Makefile zmodem.h zm.c rz.c rbsb.c \
+-	 crc.c crctab.c minirb.c mailer.rz zmr.c *.doc gz sz.c *.t 
++CFLAGS+= ${DEFINES} ${INCLUDES}
+ 
+-shar:doc
+-	shar -c README Makefile zmodem.h zm.c \
+-	 zmr.c sz.c rz.c crctab.c \
+-	 mailer.rz crc.c rbsb.c minirb.c *.doc gz *.t >/tmp/rzsz 
++${LIB}: ${OBJS}
++	rm -f ${LIB}
++	${AR} ${ARFLAGS} ${LIB} `lorder ${OBJS} | tsort`
++	@if [ ${RANLIB} != NONE ]; \
++		then echo ${RANLIB} ${LIB}; ${RANLIB} ${LIB}; fi
+ 
+-unixforum: shar
+-	compress /tmp/rzsz.sh
++clean cleandir:
++	rm -f *.o ${LIB} core a.out
+ 
+-unix:
+-	undos $(ARCFILES)
+-
+-dos:
+-	todos $(ARCFILES)
+-
+-doc:rz.doc sz.doc crc.doc minirb.doc
+-
+-minirb.doc:minirb.1
+-	nroff -man minirb.1 | col  >minirb.doc
+-
+-rz.doc:rz.1
+-	nroff -man rz.1 | col  >rz.doc
+-
+-sz.doc:sz.1
+-	nroff -man sz.1 | col  >sz.doc
+-
+-crc.doc:crc.1
+-	nroff -man crc.1 | col  >crc.doc
+-
+-zoo: doc
+-	-rm -f /tmp/rzsz.zoo
+-	zoo ah /tmp/rzsz README Makefile zmodem.h zm.c sz.c rz.c \
+-	 mailer.rz crctab.c rbsb.c *.doc \
+-	 zmr.c crc.c gz *.t minirb.c
+-	touch /tmp/rzsz.zoo
+-	chmod og-w /tmp/rzsz.zoo
+-	mv /tmp/rzsz.zoo /u/t/yam
+-	-rm -f rzsz.zip
+-	zip rzsz readme mailer.rz makefile zmodem.h zm.c sz.c rz.c
+-	zip rzsz crctab.c rbsb.c *.doc
+-	zip rzsz zmr.c crc.c gz *.t minirb.c
+-	mv rzsz.zip /u/t/yam
+-
+-tar:doc
+-	tar cvf /tmp/rzsz.tar README Makefile zmodem.h zm.c sz.c rz.c \
+-	 mailer.rz crctab.c rbsb.c \
+-	 zmr.c crc.c *.1 *.doc gz *.t minirb.c
+-
+-tags:
+-	ctags sz.c rz.c zm.c zmr.c rbsb.c
+-
+-clean:
+-	rm -f *.o
+-
+-xenix: 
+-	$(CC) $(CFLAGS) -M0 -K -i -DUSG -DNFGVMIN -DREADCHECK sz.c
+-	$(CC) $(CFLAGS) -M0 -K -i -DUSG -DMD rz.c
+-
+-x386:
+-	$(CC) $(CFLAGS) -DUSG -DMD sz.c 
+-	$(CC) $(CFLAGS) -DUSG -DNFGVMIN -DREADCHECK rz.c
+-
+-sysv:
+-	$(CC) $(CFLAGS) -DUSG -DMD sz.c
+-	$(CC) $(CFLAGS) -DUSG -DSV -DNFGVMIN rz.c
+-
+-sysvr3 ultrix3.1:
+-	$(CC) $(CFLAGS) -DUSG -DMD=2 sz.c
+-	$(CC) $(CFLAGS) -DSV -DUSG -DNFGVMIN rz.c
+-
+-sysvr4 ultrix4.0:
+-	$(CC) $(CFLAGS) -DUSG -DMD=2 sz.c
+-	$(CC) $(CFLAGS) -DSV -DUSG rz.c
+-
+-odt:
+-	$(CC) $(CFLAGS) -strict -W2 -n -DUSG -DMD=2 sz.c
+-	$(CC) $(CFLAGS) -strict -W2 -n -DUSG -DREADCHECK rz.c
+-
+-linux posix:
+-	$(CC) $(CFLAGS) -DPOSIX -DMD=2 sz.c
+-	$(CC) $(CFLAGS) -DPOSIX rz.c
+-
+-POSIX:
+-	@echo "Well, stricter, as in *safer sex* ..."
+-	$(CC) $(CFLAGS) -posix -W2 -DPOSIX -DMD=2 sz.c
+-	$(CC) $(CFLAGS) -posix -W2 -DPOSIX rz.c
+-
+-bsd 4.4bsd 4.3reno 4.3tahoe 4.3bsd sun3.5 sun4.0 sun4.0.3c sun4.1:
+-	$(CC) $(CFLAGS) -DMD=2 -Dstrchr=index -DV7 sz.c
+-	$(CC) $(CFLAGS) -DV7 -DNFGVMIN rz.c
+-
+-tandy:
+-	$(CC) $(CFLAGS) -n -DUSG -DMD -DT6K sz.c
+-	$(CC) $(CFLAGS) -n -DUSG -DMD -DT6K rz.c
+-
+-dnix:
+-	$(CC) $(CFLAGS) -DUSG -DMD sz.c
+-	$(CC) $(CFLAGS) -DSV -DUSG -DNFGVMIN -DREADCHECK rz.c
+-
+-dnix5r3:
+-	$(CC) $(CFLAGS) -DUSG -DMD=2 sz.c
+-	$(CC) $(CFLAGS) -DUSG -DSV -DNFGVMIN -DREADCHECK rz.c
+-
+-amiga:
+-	$(CC) $(CFLAGS) -DUSG -DNFGVMIN -g sz.c
+-	$(CC) $(CFLAGS) -DUSG -DSV -DNFGVMIN -g rz.c
++rz.o : zmodem.h
++sz.o : zmodem.h
--- /dev/null
+++ net/ztelnet/files/patch-ad
@@ -0,0 +1,71 @@
+--- work/ztelnet/Config.generic.orig	Wed Sep 20 21:53:28 1995
++++ work/ztelnet/Config.generic	Sun May 30 01:40:50 2004
+@@ -183,23 +183,22 @@
+ 	@echo " dynix3.0.12 dynix3.0.17"
+ 	@echo " ultrix3.1 ultrix4.0"
+ 	@echo " next1.0"
+-	@echo " linux"
+ 
+ 4.4bsd 4.3reno:
+ 	make -f Makefile.generic ${WHAT} \
+-		LIBS="-lutil -ltermcap ../libtelnet/libtelnet.a" \
+-		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
++		LIBS="-lutil -lcurses -lncurses ../libtelnet/libtelnet.a ../zmodem/librzsz.a" \
++		LIBPATH="/usr/lib/libc.a /usr/lib/libtermcap.a \
+ 				../libtelnet/libtelnet.a" \
+ 		DEST=${DESTDIR}/usr/bin \
+-		DEFINES="-DLINEMODE -DTERMCAP -DKLUDGELINEMODE \
+-			-DUSE_TERMIO -DDIAGNOSTICS" \
++		DEFINES="-DLINEMODE -DKLUDGELINEMODE \
++			-DUSE_TERMIO -DDIAGNOSTICS -DHANGUL" \
+ 		INCLUDES="-I.." \
+-		LIB_OBJ="gettytab.o" \
+-		LIB_SRC="gettytab.c" \
++#		LIB_OBJ="gettytab.o" \
++#		LIB_SRC="gettytab.c" \
+ 		AR=ar ARFLAGS=cq RANLIB=ranlib \
+-		VPATH=/usr/src/libexec/getty \
++#		VPATH=/usr/src/libexec/getty \
+ 		LIBEXEC=${DESTDIR}/usr/libexec \
+-		CC="${CC}" LCCFLAGS="-O"
++		CC="${CC}" LCCFLAGS="-O2"
+ 
+ 4.3tahoe:
+ 	@echo $@ is untested... it may or may not work..."
+@@ -360,7 +359,6 @@
+ 		DEST=${DESTDIR}/usr/ucb \
+ 		DEFINES="-DFILIO_H -DTERMCAP -DUSE_TERMIO \
+ 			-DKLUDGELINEMODE -DSTREAMS \
+-			-DAUTHENTICATE -DENCRYPT \
+ 			-DDIAGNOSTICS " \
+ 		INCLUDES="-I.." \
+ 		LIB_OBJ="getent.o strerror.o setenv.o herror.o" \
+@@ -486,28 +484,3 @@
+ 
+ clean cleandir:
+ 	make -f Makefile.generic $@
+-
+-#
+-# The DEFINE, BYPMS is added by Myeong Seok Park, which is for preventing
+-# from annoying Linux-gcc compile errors! The DEFINE is also used to solve
+-# portability problem with other operating systems!
+-# In a sense to mentioned previously, these source files are compatible
+-# to possible UNIX systems(I have not tested to other OSes yet ;<).
+-# If you want to know modified parts of the source files by me, use grep 
+-# command (eg. 'grep PMS ~ztelnet/* | less' ). I have no time to write 
+-# notes for the modified parts...
+-#
+-
+-linux:
+-	make -f Makefile.generic WHAT=$@ LINUX=linux\
+-		LIBS="-lncurses ../libtelnet/libtelnet.a" \
+-		LIBPATH="/usr/lib/libc.a /usr/lib/libncurses.a \
+-			../libtelnet/libtelnet.a" \
+-		DEST=${DESTDIR}/usr/local \
+-		DEFINES="-DSYSV_TERMIO -DHAS_GETTOS -DHAVE_fd_set \
+-			-DMUST_ALIGN -DBYPMS -Dunix -DHAS_GETTOS \
+-			-DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS"\
+-		INCLUDES="-I.." \
+-		AR=ar ARFLAGS=ru RANLIB=ranlib \
+-		LIBEXEC=${DEST}/bin \
+-		CC="${CC}" LCCFLAGS="-O -traditional -fno-strict-prototype"
--- /dev/null
+++ net/ztelnet/files/patch-ah
@@ -0,0 +1,8 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/arpa/tel-lnx.h work/ztelnet/arpa/tel-lnx.h
+--- work.old/ztelnet/arpa/tel-lnx.h	Sun Apr 23 02:17:21 1995
++++ work/ztelnet/arpa/tel-lnx.h	Thu Jan  1 09:00:00 1970
+@@ -1,4 +0,0 @@
+-#include "/usr/include/arpa/telnet.h"
+-#define TELOPT_ENVIRON  36      /* Environment variables */
+-#define    ENV_VALUE       0
+-#define    ENV_VAR       1
--- /dev/null
+++ net/ztelnet/files/patch-aa
@@ -0,0 +1,17 @@
+--- ../ztelnet/Makefile	Tue Sep 19 13:02:01 1995
++++ ./Makefile	Thu Jun  6 23:22:18 2002
+@@ -1,10 +1,11 @@
+-CC=cc
++CC?=gcc
+ all:
+-	cd zmodem; make CC="${CC}"
+ 	cd libtelnet; make CC="${CC}"
++	cd zmodem; make CC="${CC}"
+ 	cd telnet; make CC="${CC}"
+ 
+ .DEFAULT:
+-	cd zmodem; make $@ WHAT=${WHAT} CC="${CC}"
+ 	cd libtelnet; make $@ WHAT=${WHAT} CC="${CC}"
++	#cd zmodem; make $@ WHAT=${WHAT} CC="${CC}"
++	cd zmodem; make CC="${CC}"
+ 	cd telnet; make $@ WHAT=${WHAT} CC="${CC}"
--- /dev/null
+++ net/ztelnet/files/patch-aj
@@ -0,0 +1,11 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/libtelnet/strdup.c work/ztelnet/libtelnet/strdup.c
+--- work.old/ztelnet/libtelnet/strdup.c	Tue Mar 26 07:14:21 1991
++++ work/ztelnet/libtelnet/strdup.c	Tue Jun 20 22:58:31 2000
+@@ -28,7 +28,6 @@
+ #include <string.h>
+ #endif
+ 
+-
+ char *
+ strdup(str)
+ 	char *str;
--- /dev/null
+++ net/ztelnet/files/patch-ay
@@ -0,0 +1,30 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/zmodem/zm.h work/ztelnet/zmodem/zm.h
+--- work.old/ztelnet/zmodem/zm.h	Mon Apr 24 23:27:16 1995
++++ work/ztelnet/zmodem/zm.h	Thu Jan  1 09:00:00 1970
+@@ -1,26 +0,0 @@
+-#ifndef STATIC
+-#define STATIC static
+-#endif
+-
+-STATIC zsbhdr(int len, int type, register char *hdr);
+-STATIC zsbh32(int len, register char *hdr, int type, int flavour);
+-STATIC zshhdr(int len, int type, register char *hdr);
+-STATIC zsdata(register char *buf, int length, int frameend);
+-STATIC zsda32(register char *buf, int length, int frameend);
+-STATIC zrdata(register char *buf, int length);
+-STATIC zrdat32(register char *buf, int length);
+-STATIC garbitch(void);
+-STATIC zgethdr(char* hdr, int eflag);
+-STATIC zrbhdr(register char *hdr);
+-STATIC zrbhd32(register char *hdr);
+-STATIC zrhhdr(char *hdr);
+-STATIC zputhex(register int c);
+-STATIC zsendline(int c);
+-STATIC zgethex(void);
+-STATIC zgeth1(void);
+-STATIC zdlread(void);
+-STATIC noxrd7(void);
+-STATIC stohdr(unsigned long pos);
+-STATIC unsigned long rclhdr(register char *hdr);
+-STATIC init_zm(void);
+-
--- /dev/null
+++ net/ztelnet/files/patch-al
@@ -0,0 +1,173 @@
+--- work/ztelnet/telnet/commands.c.orig	Wed Sep 20 02:03:45 1995
++++ work/ztelnet/telnet/commands.c	Sun May 30 01:37:06 2004
+@@ -40,7 +40,7 @@
+ #include <netdb.h>
+ #include <ctype.h>
+ #include <pwd.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include <errno.h>
+ 
+ #include <arpa/telnet.h>
+@@ -79,8 +79,6 @@
+ extern char **genget();
+ extern int Ambiguous();
+ 
+-static call();
+-
+ typedef struct {
+ 	char	*name;		/* command name */
+ 	char	*help;		/* help string (NULL for no help) */
+@@ -93,6 +91,12 @@
+ static int margc;
+ static char *margv[20];
+ 
++    void send_wont();
++    void send_dont();
++    void send_will();
++    void send_do();
++    typedef int (*intrtn_t)();
++    static call(intrtn_t routine, ...);
+     static void
+ makeargv()
+ {
+@@ -230,10 +232,8 @@
+     int		nbyte;		/* Number of bytes to send this command */
+     int		what;		/* Character to be sent (<0 ==> special) */
+ };
++
+ 
+-/* PMS
+-extern int
+-*/
+ static int
+ 	send_esc P((void)),
+ 	send_help P((void)),
+@@ -370,7 +370,6 @@
+ send_docmd(name)
+     char *name;
+ {
+-    void send_do();
+     return(send_tncmd(send_do, "do", name));
+ }
+ 
+@@ -378,21 +377,18 @@
+ send_dontcmd(name)
+     char *name;
+ {
+-    void send_dont();
+     return(send_tncmd(send_dont, "dont", name));
+ }
+     static int
+ send_willcmd(name)
+     char *name;
+ {
+-    void send_will();
+     return(send_tncmd(send_will, "will", name));
+ }
+     static int
+ send_wontcmd(name)
+     char *name;
+ {
+-    void send_wont();
+     return(send_tncmd(send_wont, "wont", name));
+ }
+ 
+@@ -590,11 +586,8 @@
+     return 1;
+ }
+ 
+-/* PMS
+-extern int togglehelp P((void));
+-*/
+-static int togglehelp P((void));
+ 
++static int togglehelp P((void));
+ #if	defined(AUTHENTICATE)
+ extern int auth_togdebug P((int));
+ #endif
+@@ -828,12 +821,8 @@
+  */
+ 
+ #ifdef	USE_TERMIO
+-#ifdef BYPMS
+-struct termios new_tc = { 0 };
+-#else
+ struct termio new_tc = { 0 };
+ #endif
+-#endif
+ 
+ struct setlist {
+     char *name;				/* name */
+@@ -1559,9 +1548,6 @@
+ 	int	arg;
+ };
+ 
+-/* PMS
+-extern void slc_help();
+-*/
+ static void slc_help();
+ 
+ struct slclist SlcList[] = {
+@@ -1640,15 +1626,13 @@
+ 
+ extern struct env_lst *
+ 	env_define P((unsigned char *, unsigned char *));
+-extern void
++static void
+ 	env_undefine P((unsigned char *)),
+ 	env_export P((unsigned char *)),
+ 	env_unexport P((unsigned char *)),
+ 	env_send P((unsigned char *)),
+-	env_list P((void));
+-
+-/* PMS: extern is replaced by static */
+-static	void env_help P((void));
++	env_list P((void)),
++	env_help P((void));
+ 
+ struct envlist EnvList[] = {
+     { "define",	"Define an environment variable",
+@@ -2232,7 +2216,7 @@
+     register struct hostent *host = 0;
+     struct sockaddr_in sin;
+     struct servent *sp = 0;
+-    unsigned long temp, inet_addr();
++    unsigned long temp;/*, inet_addr();*/
+     extern char *inet_ntoa();
+ #if	defined(IP_OPTIONS) && defined(IPPROTO_IP)
+     char *srp = 0, *strrchr();
+@@ -2489,11 +2473,7 @@
+ 	envhelp[] =	"change environment variables ('environ ?' for more)",
+ 	modestring[] = "try to enter line or character mode ('mode ?' for more)";
+ 
+-/* PMS
+-extern int	help();
+-*/
+-
+-static int help();
++static int	help();
+ 
+ static Command cmdtab[] = {
+ 	{ "close",	closehelp,	bye,		1 },
+@@ -2548,18 +2528,13 @@
+  */
+ 
+     /*VARARGS1*/
+-    static
+-call(va_alist)
+-    va_dcl
++static call(intrtn_t routine, ...)
+ {
+     va_list ap;
+-    typedef int (*intrtn_t)();
+-    intrtn_t routine;
+     char *args[100];
+     int argno = 0;
+ 
+-    va_start(ap);
+-    routine = (va_arg(ap, intrtn_t));
++    va_start(ap, routine);
+     while ((args[argno++] = va_arg(ap, char *)) != 0) {
+ 	;
+     }
--- /dev/null
+++ net/ztelnet/files/patch-am
@@ -0,0 +1,34 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/telnet/externs.h work/ztelnet/telnet/externs.h
+--- work.old/ztelnet/telnet/externs.h	Wed Sep 20 07:52:29 1995
++++ work/ztelnet/telnet/externs.h	Tue Jun 20 22:58:32 2000
+@@ -35,18 +35,14 @@
+ #include <sys/filio.h>
+ #endif
+ #ifdef	USE_TERMIO
+-#ifndef BYPMS
+ # ifndef	VINTR
+-#endif /* PMS */
+ #  ifdef SYSV_TERMIO
+ #   include <sys/termio.h>
+ #  else
+ #   include <sys/termios.h>
+ #   define termio termios
+ #  endif
+-#ifndef BYPMS
+ # endif
+-#endif /* PMS */
+ #endif
+ #if defined(NO_CC_T) || !defined(USE_TERMIO)
+ # if !defined(USE_TERMIO)
+@@ -315,11 +311,7 @@
+ 
+ # else
+ 
+-#ifdef BYPMS
+-extern struct	termios new_tc;
+-#else
+ extern struct	termio new_tc;
+-#endif /* PMS */
+ 
+ # define termEofChar		new_tc.c_cc[VEOF]
+ # define termEraseChar		new_tc.c_cc[VERASE]
--- /dev/null
+++ net/ztelnet/files/patch-aw
@@ -0,0 +1,32 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/zmodem/sz.h work/ztelnet/zmodem/sz.h
+--- work.old/ztelnet/zmodem/sz.h	Mon Apr 24 22:37:47 1995
++++ work/ztelnet/zmodem/sz.h	Thu Jan  1 09:00:00 1970
+@@ -1,28 +0,0 @@
+-#ifndef STATIC
+-#define STATIC static
+-#endif
+-
+-STATIC void bibi(int);
+-STATIC void onintr(int);
+-int sz(int argc, char *argv[]);
+-STATIC void saybibi(void);
+-STATIC wcsend(int argc, char *argp[]);
+-STATIC wcs(char* oname);
+-STATIC wctxpn(char *name);
+-STATIC getnak(void);
+-STATIC wctx(unsigned long flen);
+-STATIC wcputsec(char* buf, int sectnum, int cseclen);
+-STATIC filbuf(register char *buf, int count);
+-STATIC zfilbuf(void);
+-STATIC fooseek(FILE *fptr, unsigned long pos, int whence);
+-STATIC char *substr(register char *s, register char *t);
+-STATIC usage(void);
+-STATIC getzrxinit(void);
+-STATIC sendzsinit(void);
+-STATIC zsendfile(char *buf, int blen);
+-STATIC zsendfdata(void);
+-STATIC getinsync(int flag);
+-STATIC zsendcmd(char *buf, int blen);
+-STATIC chkinvok(char *s);
+-STATIC countem(int argc, register char **argv);
+-STATIC init_sz(void);
--- /dev/null
+++ net/ztelnet/files/patch-az
@@ -0,0 +1,16 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/zmodem/zmodem.h work/ztelnet/zmodem/zmodem.h
+--- work.old/ztelnet/zmodem/zmodem.h	Mon Apr 24 23:34:19 1995
++++ work/ztelnet/zmodem/zmodem.h	Tue Jun 20 22:58:33 2000
+@@ -117,9 +117,9 @@
+ /* Parameters for ZCOMMAND frame ZF0 (otherwise 0) */
+ #define ZCACK1	1	/* Acknowledge, then do command */
+ 
+-/* PMS
+-unsigned long rclhdr();
+-*/
++/*-----Modified by yongari to shut up compiler------*/
++/* unsigned long rclhdr(); */
++STATIC unsigned long rclhdr();
+ 
+ /* Globals used by ZMODEM functions */
+ extern Rxframeind;	/* ZBIN ZBIN32, or ZHEX type of frame */
--- /dev/null
+++ net/ztelnet/files/patch-ak
@@ -0,0 +1,47 @@
+--- work.old/ztelnet/telnet/Makefile.generic.orig	Wed Sep 20 12:42:39 1995
++++ work/ztelnet/telnet/Makefile.generic	Thu Jun  6 23:23:29 2002
+@@ -19,28 +19,22 @@
+ #	@(#)Makefile.generic	5.5 (Berkeley) 3/1/91
+ #
+ 
+-INCLUDES=	-I..
+-
+-ifeq (linux,${LINUX})
+-ARPA_TELNET=	../arpa/tel-lnx.h
+-CFLAGS=	${LCCFLAGS} ${INCLUDES} ${DEFINES}
+-else
+-ARPA_TELNET=	../arpa/telnet.h
+-CFLAGS=	-O ${INCLUDES} ${DEFINES}
+-endif
++INCLUDES= -I..
++ARPA_TELNET= ../arpa/telnet.h
+ 
+ SRCS=	commands.c main.c network.c ring.c \
+ 	sys_bsd.c telnet.c terminal.c \
+ 	utilities.c ${GETOPT_SRC}
+ 
++CFLAGS+=	${INCLUDES} ${DEFINES}
+ 
+ ALLHC=	${SRCS} \
+ 	defines.h externs.h fdset.h general.h \
+ 	ring.h types.h
+ 
+ OBJS=	authenc.o commands.o main.o network.o ring.o sys_bsd.o \
+-	telnet.o terminal.o utilities.o ${GETOPT_OBJ} \
+-	../zmodem/rz.o ../zmodem/sz.o
++	telnet.o terminal.o utilities.o ${GETOPT_OBJ}
++
+ MAN=	telnet.0
+ 
+ #
+@@ -73,8 +67,8 @@
+ 	mkdep ${CFLAGS} `make clist`
+ 
+ install: ${MAN} FRC
+-	install -s -o bin -g bin -m 755 telnet ${LIBEXEC}
+-	install -c -o bin -g bin -m 444 telnet.0 ${DEST}/man/cat1
++	install -s -o bin -g bin -m 755 telnet ${DEST}
++	install -c -o bin -g bin -m 444 telnet.0 ${DESTDIR}/usr/man/cat1
+ 
+ lint: FRC ${SRCS}
+ 	lint ${CFLAGS} `make clist`
--- /dev/null
+++ net/ztelnet/files/patch-aq
@@ -0,0 +1,69 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/telnet/utilities.c work/ztelnet/telnet/utilities.c
+--- work.old/ztelnet/telnet/utilities.c	Wed Sep 20 06:41:41 1995
++++ work/ztelnet/telnet/utilities.c	Tue Jun 20 22:58:32 2000
+@@ -40,6 +40,15 @@
+ 
+ #include "externs.h"
+ 
++#ifdef SLC_NAME_OK
++#undef SLC_NAME_OK
++#define SLC_NAME_OK(x)  ( (x) < NSLC )
++#endif
++#ifdef TELOPT_OK
++#undef TELOPT_OK
++#define TELOPT_OK(x) ((x) <= TELOPT_LAST)
++#endif
++
+ FILE	*NetTrace = 0;		/* Not in bss, since needs to stay */
+ int	prettydump;
+ 
+@@ -282,9 +291,6 @@
+     register int i;
+     char buf[512];
+     extern int want_status_response;
+-#ifdef BYPMS
+-	unsigned int bypms;
+-#endif /* PMS */
+ 
+     if (showoptions || direction == 0 ||
+ 	(want_status_response && (pointer[0] == TELOPT_STATUS))) {
+@@ -578,12 +584,7 @@
+ 	    case LM_SLC:
+ 		fprintf(NetTrace, "SLC");
+ 		for (i = 2; i < length - 2; i += 3) {
+-#ifdef BYPMS
+-			bypms = (unsigned int) pointer[i+SLC_FUNC];
+-		    if (SLC_NAME_OK(bypms))
+-#else
+ 		    if (SLC_NAME_OK(pointer[i+SLC_FUNC]))
+-#endif /* PMS */
+ 			fprintf(NetTrace, " %s", SLC_NAME(pointer[i+SLC_FUNC]));
+ 		    else
+ 			fprintf(NetTrace, " %d", pointer[i+SLC_FUNC]);
+@@ -672,12 +673,7 @@
+ 		    case WONT:	cp = "WONT"; goto common2;
+ 		    common2:
+ 			i++;
+-#ifdef BYPMS
+-			bypms = (unsigned int) pointer[i];
+-			if (TELOPT_OK(bypms))
+-#else
+ 			if (TELOPT_OK((int)pointer[i]))
+-#endif /* PMS */
+ 			    fprintf(NetTrace, " %s %s", cp, TELOPT(pointer[i]));
+ 			else
+ 			    fprintf(NetTrace, " %s %d", cp, pointer[i]);
+@@ -799,12 +795,7 @@
+ 	    break;
+ 
+ 	default:
+-#ifdef BYPMS
+-		bypms = (unsigned int) pointer[0];
+- 		if (TELOPT_OK(bypms))
+-#else	   
+- 		if (TELOPT_OK(pointer[0]))
+-#endif /* PMS */
++	    if (TELOPT_OK(pointer[0]))
+ 		fprintf(NetTrace, "%s (unknown)", TELOPT(pointer[0]));
+ 	    else
+ 		fprintf(NetTrace, "%d (unknown)", pointer[i]);
--- /dev/null
+++ net/ztelnet/files/patch-ax
@@ -0,0 +1,49 @@
+diff -uNr --exclude=*.orig work.old/ztelnet/zmodem/zm.c work/ztelnet/zmodem/zm.c
+--- work.old/ztelnet/zmodem/zm.c	Mon Apr 24 23:31:24 1995
++++ work/ztelnet/zmodem/zm.c	Tue Jun 20 22:58:33 2000
+@@ -72,10 +72,7 @@
+ STATIC char Attn[ZATTNLEN+1];	/* Attention string rx sends to tx on err */
+ STATIC char *Altcan;		/* Alternate canit string */
+ 
+-STATIC int lastsent;	/* Last char we sent */
+-
+-/* PMS */
+-#include "zm.h"
++STATIC lastsent;	/* Last char we sent */
+ 
+ STATIC char *frametypes[] = {
+ 	"No Response to Error Correction Request",	/* -4 */
+@@ -110,6 +107,23 @@
+ 
+ STATIC char badcrc[] = "Bad CRC";
+ 
++/*---- Appended by yongari to shutu up compiler -----*/
++STATIC zsbh32();
++STATIC zsda32();
++STATIC zrdat32();
++STATIC garbitch();
++STATIC zrbhdr();
++STATIC zrbhd32();
++STATIC zrhhdr();
++STATIC zputhex();
++STATIC zsendline();
++STATIC zgethex();
++STATIC zgeth1();
++STATIC zdlread();
++STATIC noxrd7();
++/* STATIC unsigned long rclhdr();*/
++/*----------------------------------------------------*/
++
+ /* Send ZMODEM binary header hdr of type type */
+ STATIC zsbhdr(len, type, hdr)
+ register char *hdr;
+@@ -885,8 +899,7 @@
+ }
+ 
+ /* Recover a unsigned long integer from a header */
+-STATIC unsigned long
+-rclhdr(hdr)
++STATIC unsigned long rclhdr(hdr)
+ register char *hdr;
+ {
+ 	register unsigned long l;


More information about the Midnightbsd-cvs mailing list