--- Makefile
+++ Makefile	1994/01/18 02:25:16
@@ -0,0 +1,17 @@
+CFLAGS = -O2 -fomit-frame-pointer '-DISSUE_FILE="/etc/issue.net"' \
+	-include /usr/include/bsd/bsd.h -I /usr/include/bsd \
+	-DTERMCAP -DUSE_TERMIO -DKLUDGELINEMODE -DDIAGNOSTICS \
+	-DAUTHENTICATE -I..
+LDLIBS = -lbsd -ltermcap -ltelnet -L ../libtelnet
+LDFLAGS = -s
+
+telnet: authenc.o commands.o main.o network.o ring.o sys_bsd.o telnet.o \
+		terminal.o tn3270.o utilities.o
+
+install: telnet
+	install telnet /usr/bin
+	install -m644 telnet.1 /usr/man/man1
+
+clean:
+	rm -f *.o telnet
+
--- commands.c
+++ commands.c	1994/01/18 02:33:23
@@ -70,12 +70,10 @@
 #include "types.h"
 
 #ifndef CRAY
-#include <netinet/in_systm.h>
 # if (defined(vax) || defined(tahoe) || defined(hp300)) && !defined(ultrix)
 # include <machine/endian.h>
 # endif /* vax */
 #endif /* CRAY */
-#include <netinet/ip.h>
 
 
 #ifndef       MAXHOSTNAMELEN
@@ -706,7 +704,7 @@
 		&localchars,
 		    "recognize certain control characters" },
     { " ", "", 0 },		/* empty line */
-#if	defined(unix) && defined(TN3270)
+#if	defined(unix) && defined(TN3270) && !defined(__linux__)
     { "apitrace",
 	"(debugging) toggle tracing of API transactions",
 	    0,
@@ -840,7 +838,7 @@
  */
 
 #ifdef	USE_TERMIO
-struct termio new_tc = { 0 };
+struct termios new_tc = { 0 };
 #endif
 
 struct setlist {
@@ -1841,7 +1839,8 @@
 extern int
 	auth_enable P((int)),
 	auth_disable P((int)),
-	auth_status P((void)),
+	auth_status P((void));
+static int
 	auth_help P((void));
 
 struct authlist AuthList[] = {
@@ -2421,8 +2420,6 @@
 	{ "z",		zhelp,		suspend,	0 },
 #endif	/* defined(unix) */
 #if	defined(TN3270)
-	{ "!",		shellhelp,	shell,		1 },
-#else
 	{ "!",		shellhelp,	shell,		0 },
 #endif
 	{ "environ",	envhelp,	env_cmd,	0 },
--- externs.h
+++ externs.h	1994/01/18 02:30:58
@@ -56,6 +56,7 @@
 #  else
 #   include <sys/termios.h>
 #   define termio termios
+#   error "This doesn't work for Linux..."
 #  endif
 # endif
 #endif
@@ -123,7 +124,6 @@
 #if	defined(unix)
 #if	defined(TN3270)
     cursesdata,		/* Print out curses data flow */
-    apitrace,		/* Trace API transactions */
 #endif	/* defined(TN3270) */
     termdata,		/* Print out terminal data flow */
 #endif	/* defined(unix) */
@@ -326,7 +326,7 @@
 
 # else
 
-extern struct	termio new_tc;
+extern struct	termios new_tc;
 
 # define termEofChar		new_tc.c_cc[VEOF]
 # define termEraseChar		new_tc.c_cc[VERASE]
--- sys_bsd.c
+++ sys_bsd.c	1994/01/18 02:29:24
@@ -79,8 +79,8 @@
 # define old_tc ottyb
 
 #else	/* USE_TERMIO */
-struct	termio old_tc = { 0 };
-extern struct termio new_tc;
+struct	termios old_tc = { 0 };
+extern struct termios new_tc;
 
 # ifndef	TCSANOW
 #  ifdef TCSETS
@@ -391,7 +391,7 @@
     struct sgttyb sb;
     int lmode;
 #else	/* USE_TERMIO */
-    struct termio tmp_tc;
+    struct termios tmp_tc;
 #endif	/* USE_TERMIO */
     int onoff;
     int old;
@@ -457,10 +457,8 @@
 #else
 	tmp_tc.c_lflag &= ~ECHO;
 	tmp_tc.c_oflag &= ~ONLCR;
-# ifdef notdef
 	if (crlf)
 		tmp_tc.c_iflag &= ~ICRNL;
-# endif
 #endif
     }
 
@@ -657,7 +655,7 @@
 #endif	SIGINFO
 #ifdef	SIGTSTP
 	(void) signal(SIGTSTP, SIG_DFL);
-	(void) sigsetmask(sigblock(0) & ~(1<<(SIGTSTP-1)));
+/*	(void) sigsetmask(sigblock(0) & ~(1<<(SIGTSTP-1))); */
 #endif	/* SIGTSTP */
 #ifndef USE_TERMIO
 	ltc = oltc;
@@ -690,7 +688,7 @@
 
 }
 
-#if defined(USE_TERMIO) && !defined(SYSV_TERMIO)
+#if defined(USE_TERMIO) && !defined(SYSV_TERMIO) && !defined(__linux__)
     void
 TerminalSpeeds(ispeed, ospeed)
     long *ispeed;
--- telnet.c
+++ telnet.c	1994/01/18 02:23:34
@@ -47,6 +47,7 @@
 #endif	/* defined(unix) */
 
 #include <arpa/telnet.h>
+#include <sgtty.h>
 
 #include <ctype.h>
 
--- tn3270.c
+++ tn3270.c	1994/01/18 02:23:34
@@ -48,11 +48,11 @@
 
 #if	defined(TN3270)
 
-#include "../ctlr/screen.h"
-#include "../general/globals.h"
+#include "../tn3270/ctlr/screen.h"
+#include "../tn3270/general/globals.h"
 
-#include "../telextrn.h"
-#include "../ctlr/externs.h"
+#include "../tn3270/telextrn.h"
+#include "../tn3270/ctlr/externs.h"
 
 #if	defined(unix)
 int
@@ -385,7 +385,7 @@
 }
 
 #if	defined(unix)
-	void
+	int
 settranscom(argc, argv)
 	int argc;
 	char *argv[];