diff -ruN infocom-4.01pl2.orig/README infocom-4.01pl2/README
--- infocom-4.01pl2.orig/README	Sat Dec 19 18:06:17 1992
+++ infocom-4.01pl2/README	Thu Oct 12 20:42:22 1995
@@ -1,11 +1,3 @@
-InfoTaskForce Infocom Interpreter Version 4.01 - pl2
-I've applied the two patches supplied by the InfoTaskForce people
-(referred throughout as patch level 1 and patch level 2) to the source.
--Mike Kienenberberger (mlk)
- FXMLK@acad3.alaska.edu
-
-------Here's the original README----------
-
 The InfoTaskForce Infocom Interpreter Version 4.01 Announcement
 ===============================================================
 Copyright (c) 1992 InfoTaskForce
diff -ruN infocom-4.01pl2.orig/debian.Changelog infocom-4.01pl2/debian.Changelog
--- infocom-4.01pl2.orig/debian.Changelog	Wed Dec 31 19:00:00 1969
+++ infocom-4.01pl2/debian.Changelog	Thu Oct 12 21:06:52 1995
@@ -0,0 +1,5 @@
+infocom (4.01pl2-4); priority=LOW
+
+* Initial release.
+
+ -- Brian White  <bcwhite@bnr.ca>  Thu Oct 12 21:06:52 EDT 1995
diff -ruN infocom-4.01pl2.orig/debian.README infocom-4.01pl2/debian.README
--- infocom-4.01pl2.orig/debian.README	Wed Dec 31 19:00:00 1969
+++ infocom-4.01pl2/debian.README	Thu Oct 12 20:51:57 1995
@@ -0,0 +1,34 @@
+The InfoTaskForce Infocom Interpreter Version 4.01
+==================================================
+Copyright (c) 1992 InfoTaskForce
+
+
+( Debian package by Brian White <bcwhite@bnr.ca> )
+
+
+The InfoTaskForce Infocom Interpreter is available for anonymous ftp from:
+         ftp.cse.unsw.edu.au [149.171.16.16]
+
+Look in the /pub/infocom directory.
+
+Two versions are available:
+        itf-src.tar	C source code and documentation
+        itf-exe.zoo	MS-DOS executable and documentation
+
+Send bug reports to peril@extro.ucc.su.oz.au
+
+
+Legal Stuff
+===========
+
+We have developed the InfoTaskForce interpreter for use with legally purchased
+Infocom datafiles. We do not supply any datafiles - they must be purchased
+and the Software Licence agreement for their use must be observed. Most
+datafiles are available in the Lost Treasures of Infocom collections and are
+quite inexpensive.
+
+This program is provided "as is", without any warranty of any kind. The entire
+risk as to its quality and performance is with you.  In no event will
+InfoTaskForce be liable for damages arising from the use of this program.
+
+If you distribute this program, please distribute all packages.
diff -ruN infocom-4.01pl2.orig/debian.control infocom-4.01pl2/debian.control
--- infocom-4.01pl2.orig/debian.control	Wed Dec 31 19:00:00 1969
+++ infocom-4.01pl2/debian.control	Thu Oct 12 23:13:00 1995
@@ -0,0 +1,19 @@
+Package: infocom
+Version: =
+Package_Revision: =
+Priority: optional
+Section: games
+Maintainer: Brian White <bcwhite@bnr.ca>
+Description: A freely distributable parser for Infocom data files.
+ Now you can play all of the famous Infocom-interactive fiction
+ adventure games under Linux.  All that is needed is the machine-independent
+ data file from the original package or multi-game sets like the
+ "Lost Treasures of Infocom" (I and II).  Three of Infocom's
+ sampler packages (sampler1_R55.z3, sampler2.z3, & minizork.z3)
+ are available by anonymous FTP from ftp.gmd.de under the
+ /if-archive/infocom/demos directory.  Put them in the local
+ directory /usr/lib/games/infocom.
+ 
+ Two executables are included in this package: one that runs under
+ standard termcap ("infocom") and one that uses ansi codes to do color
+ ("infocoma").  Both will run on the Linux console.
diff -ruN infocom-4.01pl2.orig/debian.rules infocom-4.01pl2/debian.rules
--- infocom-4.01pl2.orig/debian.rules	Wed Dec 31 19:00:00 1969
+++ infocom-4.01pl2/debian.rules	Thu Oct 12 23:02:00 1995
@@ -0,0 +1,79 @@
+#!/usr/bin/make -f
+# Sample debian.rules file - for GNU Hello (1.3).
+# Copyright 1994,1995 by Ian Jackson.
+# I hereby give you perpetual unlimited permission to copy,
+# modify and relicense this file, provided that you do not remove
+# my name from the file itself.  (I assert my moral right of
+# paternity under the Copyright, Designs and Patents Act 1988.)
+
+package=infocom
+version=4.01pl2
+debian=1
+
+# The next section may have to be extensively modified
+
+build:
+	$(checkdir)
+	-rm -f *.o
+	$(MAKE) bsd_ansic CFLAGS=-O2 LDFLAGS=-s
+	mv infocom infocoma
+	-rm -f *.o
+	$(MAKE) bsd CFLAGS=-O2 LDFLAGS=-s
+	strip infocom infocoma
+	$(MAKE) .infocomrc
+	touch build
+
+clean:
+	$(checkdir)
+	-rm -f build infocom infocoma
+	-$(MAKE) -i clean
+	-rm -rf debian-tmp *~
+
+binary:		checkroot build
+	-rm -rf debian-tmp
+	mkdir -p debian-tmp/DEBIAN
+	sed -e '2s/=/$(version)/; 3s/=/$(debian)/' \
+		debian.control > debian-tmp/DEBIAN/control
+	mkdir -p debian-tmp/usr/games
+	install -m755 infocom infocoma debian-tmp/usr/games
+	mkdir -p debian-tmp/usr/doc/copyright
+	install -m444 debian.README debian-tmp/usr/doc/copyright/$(package)
+	mkdir -p debian-tmp/usr/doc
+	install -m444 README debian-tmp/usr/doc/$(package)
+	mkdir -p debian-tmp/usr/lib/games/infocom
+	install -m444 .infocomrc debian-tmp/usr/lib/games/infocom/user.infocomrc
+	-chmod 444 *.z?
+	-cp *.z? debian-tmp/usr/lib/games/infocom
+	chown -R root.root debian-tmp
+	chmod -R g-ws debian-tmp
+	dpkg --build debian-tmp
+	mv debian-tmp.deb ../$(package)-$(version)-$(debian).deb
+	rm -rf debian-tmp
+
+define checkdir
+	test -f $(package).c
+endef
+
+# Below here is fairly generic really
+
+source:		clean
+	-mv *.z? /tmp
+	chmod +x debian.rules
+	cd .. && \
+	tar cf $(package)-$(version)-$(debian).tar $(package)-$(version) && \
+	gzip -9vf $(package)-$(version)-$(debian).tar
+	-mv /tmp/*.z? .
+ 
+diff:		clean
+	-mv *.z? /tmp
+	cd .. && \
+	(diff -ruN $(package)-$(version).orig $(package)-$(version) \
+	 >$(package)-$(version)-$(debian).diff; [ $$? = 1 ]) && \
+	gzip -9vf $(package)-$(version)-$(debian).diff
+	-mv /tmp/*.z? .
+
+checkroot:
+	$(checkdir)
+	test root = "`whoami`"
+
+.PHONY: binary source diff clean checkroot
diff -ruN infocom-4.01pl2.orig/io.c infocom-4.01pl2/io.c
--- infocom-4.01pl2.orig/io.c	Tue Jul 28 10:01:57 1992
+++ infocom-4.01pl2/io.c	Thu Sep 28 20:46:36 1995
@@ -429,7 +429,15 @@
 			ch = (char)in ;
 		if ( ch == '\r' )
 			ch = '\n' ;
-		PUT_CHAR ( ch ) ;
+		if (ch == '\b') {
+			putchar('\b'); putchar(' '); putchar('\b');
+		} else if (ch == '\x7F') {
+			putchar('\b'); putchar(' '); putchar('\b');
+			ch = '\b';
+		}
+		if (isprint(ch) || ch == '\n') {
+			PUT_CHAR ( ch ) ;
+		}
 	}
 	else
 	{
@@ -1939,6 +1947,7 @@
 #endif	/* SYS_V */
 
 #ifdef	BSD
+#include <bsd/sgtty.h>
 static struct sgttyb	s ;
 #endif	/* BSD */
 
diff -ruN infocom-4.01pl2.orig/makefile infocom-4.01pl2/makefile
--- infocom-4.01pl2.orig/makefile	Tue Jul 28 10:01:59 1992
+++ infocom-4.01pl2/makefile	Thu Oct 12 22:54:06 1995
@@ -80,14 +80,22 @@
 	@echo # f_black, f_red, f_green, f_yellow, f_blue, f_magenta, f_cyan, f_white >> $@
 	@echo # b_black, b_red, b_green, b_yellow, b_blue, b_magenta, b_cyan, b_white >> $@
 	@echo # Not all attributes may be supported >> $@
-	@echo attr b_blue f_white >> $@
-	@echo attr b_white f_blue >> $@
-	@echo attr b_blue f_white high >> $@
-	@echo attr b_white f_white high >> $@
-	@echo attr b_blue f_red blink >> $@
-	@echo attr b_white f_red >> $@
-	@echo attr b_blue f_red high >> $@
-	@echo attr b_white f_red high >> $@
+	@echo attr b_black f_white >> $@
+	@echo attr b_white f_black >> $@
+	@echo attr b_black f_white high >> $@
+	@echo attr b_white f_black high >> $@
+	@echo attr b_black f_green >> $@
+	@echo attr b_green f_black >> $@
+	@echo attr b_black f_green high >> $@
+	@echo attr b_green f_black high >> $@
+#	@echo attr b_blue f_white >> $@
+#	@echo attr b_white f_blue >> $@
+#	@echo attr b_blue f_white high >> $@
+#	@echo attr b_white f_white high >> $@
+#	@echo attr b_blue f_red blink >> $@
+#	@echo attr b_white f_red >> $@
+#	@echo attr b_blue f_red high >> $@
+#	@echo attr b_white f_red high >> $@
 
 .infocomrc:		makefile
 	@echo '# Default initialization file for UNIX machines' > $@
@@ -140,8 +148,8 @@
 _msdos: $(OBJECTS) infocom.rc
 	link $(OBJECTS),infocom.exe,,$(LIBS);
 
-CC=gcc
-OPTFLAG=-O
+CC=gcc -I/usr/include/bsd
+OPTFLAG=-O3
 
 bsd_ansi:
 	make CFLAGS='$(OPTFLAG) -DBSD -DANSI_ESCAPE' unix
@@ -174,12 +182,12 @@
 	make CFLAGS='$(OPTFLAG) -DSYS_V -DTERMINFO' LDFLAGS='-lcurses' unix
 
 unix: $(OBJECTS)
-	$(CC) $(OPTFLAG) -o infocom $(OBJECTS) $(LDFLAGS)
+	$(CC) $(OPTFLAG) -o infocom $(OBJECTS) $(LDFLAGS) -lbsd
 
 $(OBJECTS): infocom.h machine.h makefile
 
 clean:
-		-rm *.o
-		-rm .infocomrc
-		-rm infocom.rc
-		-rm infocom
+		-rm -f *.o
+		-rm -f .infocomrc
+		-rm -f infocom.rc
+		-rm -f infocom
