--- ae-962.orig/display.c
+++ ae-962/display.c
@@ -20,6 +20,12 @@
 #endif
 
 /*
+ * Consider "printable" any iso-8859-1 character.
+ */
+
+#define my_isprint(ch) (isprint((ch)) || 160 <= (ch) && (ch) <= 255)
+
+/*
  * Reverse scan for start of logical line containing offset.
  * 
  *	offset <= 0	return	0
@@ -344,7 +350,7 @@
 {
 	int i;
 
-	if (isprint(ch) || ch == '\t' || ch == '\n') {
+	if (my_isprint(ch) || ch == '\t' || ch == '\n') {
 		i = ch == '\t' ? 8 - (col & 7) : 1;
 		col += i;
 
@@ -426,7 +432,7 @@
 		return (mapping[0]);
 	if (0 <= ch && ch < 32)
 		return (mapping[ch+1]);
-	if (isprint(ch)) {
+	if (my_isprint(ch)) {
 		buf[0] = ch;
 		buf[1] = '\0';
 	} else {
@@ -434,3 +440,4 @@
 	}
 	return (buf);
 }
+
--- ae-962.orig/main.c
+++ ae-962/main.c
@@ -214,6 +214,26 @@
 {
 	int error;
 	struct termios term;
+/*
+** the following #ifdef DEBIAN block was added because of problems
+** which the original code had with ncurses-1.9.9e.
+** the original code worked OK with ncurses-1.9.8a and earlier versions
+*/
+#ifdef DEBIAN
+	if (bf)
+		error = noraw();
+	else
+		error = raw();
+		if (!error)
+		{
+			error = tcgetattr(fileno(stdin), &term) < 0;
+			if (!error)
+			{
+				term.c_iflag |= ICRNL;
+				error = tcsetattr(fileno(stdin), TCSANOW, &term) < 0;
+			}
+		}
+#else
 	error = tcgetattr(fileno(stdin), &term) < 0;
 	if (!error) {
 		if (bf)
@@ -222,6 +242,7 @@
 			term.c_lflag &= ~(ISIG | ICANON);
 		error = tcsetattr(fileno(stdin), TCSANOW, &term) < 0;
 	}
+#endif
 	/* Fall back on CURSES functions that do almost what we need if
 	 * either tcgetattr() or tcsetattr() fail.
 	 */
@@ -542,8 +563,14 @@
 			return (fp);
 	}
 
+#ifdef DEBIAN
+	if ((ptr = getenv("ETCDIR")) == NULL)
+            ptr="/etc"; 
+	if ((buf = pathname(ptr, fn)) != NULL) {
+#else
 	if ((ptr = getenv("ETCDIR")) != NULL 
 	&& (buf = pathname(ptr, fn)) != NULL) {
+#endif
 		fp = fopen(buf, "r");
 #ifdef EITHER_SLASH
 		if (fp == NULL)
--- ae-962.orig/header.h
+++ ae-962/header.h
@@ -68,6 +68,7 @@
 #include <curses.h>
 #include "key.h"
 
+#ifndef DEBIAN
 #ifdef BADCURSES
 #ifndef erasechar
 #define erasechar()	'\b'
@@ -77,6 +78,7 @@
 #endif
 #ifndef idlok
 #define idlok(w,f)	OK
+#endif
 #endif
 
 extern int my_addch _((int));
--- ae-962.orig/rules.tmp
+++ ae-962/rules.tmp
@@ -0,0 +1,80 @@
+#! /usr/bin/make -f
+#
+# Invoke each target with `./debian/rules <target>'.  All targets should be
+# invoked with the package root as the current directory.
+#
+# The `binary' target must be run as root, as it needs to install files with
+# specific ownership.
+
+CC = gcc
+CFLAGS = -O2 -DDEBIAN -DTERMIOS -DBADCURSES # ncurses terminfo
+# CFLAGS = -g -DDEBIAN -DTERMIOS -DBADCURSES # debugging ncurses terminfo
+# CFLAGS = -O2 -DDEBIAN -DTERMCAP -DBADCURSES # termcap
+# CFLAGS = -g -DDEBIAN -DTERMCAP # debugging termcap
+LDFLAGS = -N -s
+# LDFLAGS = # debugging
+prefix=/usr
+# LIBS = -lcurses -ltermcap # termcap
+LIBS = -lncurses # terminfo
+
+package=ae
+
+build:
+        $(checkdir)
+# Builds the binary package.
+	make CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)"
+	touch build
+
+clean:
+# Undoes the effect of `make -f debian/rules build'.
+	$(checkdir)
+	rm -f build
+	rm -f *.o ae core
+	rm -rf *~ debian/tmp
+
+binary-indep:
+# None--
+        @echo >&2 'No architecture independant portions'; false
+
+binary binary-arch:	checkroot build
+	rm -rf debian/tmp
+	install -d debian/tmp debian/tmp/DEBIAN
+	install -d debian/tmp/usr/doc/$(package)
+	cp debian/copyright debian/tmp/usr/doc/$(package)
+	install -d debian/preinst debian/tmp/DEBIAN/preinst
+	install -d debian/tmp/bin
+	install -g ae debian/tmp/bin/ae
+	install -d debian/tmp/etc
+	install -g debian.modeless.ti debian/tmp/etc/ae.rc
+	install -d debian/tmp/usr/man/man1
+	install -g debian.ae.1 debian/tmp/usr/man/man1/ae.1
+	install -d debian/tmp/usr/doc/ae
+	install -g ae.man debian/tmp/usr/doc/ae/ae.man
+	install -g debian.modeless.ti debian/tmp/usr/doc/ae/debian.modeless.ti
+	install -g mode.rc debian/tmp/usr/doc/ae/mode.rc
+	install -g modeless.pc debian/tmp/usr/doc/ae/modeless.pc
+	install -g modeless.rc debian/tmp/usr/doc/ae/modeless.rc
+	install -g modeless.tc debian/tmp/usr/doc/ae/modeless.tc
+	install -g modeless.ti debian/tmp/usr/doc/ae/modeless.ti
+	gzip -9f debian/tmp/usr/doc/ae/*
+	gzip -9v debian/tmp/usr/man/man1/*
+	dpkg-shlibdeps $(package)
+	dpkg-gencontrol -sa
+	chown -R root.root debian/tmp
+	chmod -R g-ws debian/tmp
+	dpkg --build debian/tmp ..
+
+define checkdir:
+        test -f $(package).man -a -f debian/rules
+endef
+
+# Static--
+
+source diff:
+        @echo >&2 'source and diff are obsolete, try dpkg-source -b'; false
+
+checkroot:
+       $(checkdir)
+       test root = "`whoami`"
+
+.PHONY: binary binary-arch binary-indep clean checkroot
--- ae-962.orig/debian.ae.1
+++ ae-962/debian.ae.1
@@ -0,0 +1,38 @@
+.\" Author:  Bill Mitchell
+.\" 
+.\" Revision 1.2:  added -c and -C options
+.\" Revision 1.3:
+.\"     Put options in alphabetical order.
+.\"     Added the -s option.
+.\" Revision 1.4:
+.\"     added CHANGES FILE FORMAT section
+.\"     Changed BUGS section
+.\" Revision 1.5:
+.\"     use different CHANGES FILE FORMAT example
+.\"     change: extended description allowed for all fields
+.\" Revision 1.6:
+.\"     Added Description field and -e option
+.\"
+.TH AE 1 "Editors"
+.SH NAME
+ae \- tiny full-screen text editor
+.SH SYNOPSIS
+\fBae\fR
+[-f config_file ] [ file ]
+.SH DESCRIPTION
+\fBae\fR is a tiny full-screen text editor with both modual (vi-like)
+and modeless (emacs-like) editing modes, determined by an ae.rc
+config file.
+Keybindings are configurable in the config file.
+The default config file is located in /etc/ae.rc.
+If an ae.rc file exists in current working directory or in the user's
+home directory, that file is used instead of the default file.
+.LP
+A users manual and sample config files may be found in /usr/doc/ae.
+.SS FILES
+.nf
+/etc/ae.rc
+/usr/doc/ae/ae.man
+/usr/doc/ae/mode.rc
+/usr/doc/ae/modeless.rc
+.fi
--- ae-962.orig/debian.modeless.tc
+++ ae-962/debian.modeless.tc
@@ -0,0 +1,126 @@
+Sample Configuration File 
+Modeless Interface with TERMCAP Function Keys
+Anthony's Editor Oct 95
+Copyright 1993, 1995 by Anthony Howe.  All rights reserved.  No warranty.
+This file by Bill Mitchell.  Any errors are mine, not Anthony's.
+
+1:\
+File read and write\t\F3 F4\t\tLeft, down, up, right\tarrow keys\n\
+Version, exit, quit\t\SF1 F10 SF10\tWord left and right\t\F5 F6\n\
+Macros\t\t\tSF2\t\tPage down and up\tPgDn PgUp\n\
+Help on and off\t\tF1\t\tFront and end of line\t\SF5 SF6\n\
+Redraw\t\t\t\F8\t\tTop and bottom of file\t\Home End\n\
+Insert \t\t\ttyped keys\tDelete left and right\tBACKSPACE DEL\n\
+Literal escape\t\t\INS\t\tBlock, cut, paste\tF2 SF3 SF4\n\
+Undo\t\t\t\F9\t\tInvert case\t\tF7\n
+
+# generate an error
+.check this file before using it. It hasn't been carefully verified.
+#.help_off
+.literal	$(kI)
+.cursor_up	$(ku)
+.cursor_down	$(kd)
+.cursor_left	$(kl)
+.cursor_right	$(kr)
+.page_up	$(kP)
+.page_up	$(K3)
+.page_down	$(kN)
+.page_down	$(K5)
+.word_left	$(k5)
+.word_right	$(k6)
+.line_left	$(F5)
+.line_right	$(F6)
+.file_top	$(kh)
+.file_top	$(K1)
+.file_bottom	$(ke)
+.file_bottom	$(K4)
+.delete_left	$(kb)
+.delete_left	^H
+.delete_left	^?
+.delete_right	$(kD)
+.help		$(k1)
+.block		$(k2)
+.cut		$(F3)
+.paste		$(F4)
+.flip_case	$(k7)
+.undo		$(k9)
+.file_read	$(k3)
+.file_write	$(k4)
+.redraw		$(k8)
+.quit_ask	$(k;)
+.quit_ask	$(kA)
+.quit		$(FA)
+.show_version	$(F1)
+.macro		$(F2)
+# Include these keydefs for /etc/termcap files with incomplete linux keydefs
+.literal	^[[2~
+.cursor_up	^[[A
+.cursor_down	^[[B
+.cursor_left	^[[D
+.cursor_right	^[[C
+.page_up	^[[5~
+.page_down	^[[6~
+.word_left	^[[[E
+.word_right	^[[17~
+.line_left	^[[28~
+.line_right	^[[29~
+.file_top	^[[1~
+.file_bottom	^[[4~
+.delete_left	^?
+.delete_right	^[[3~
+.help		^[[[A
+.block		^[[[B
+.cut		^[[25~
+.paste		^[[26~
+.flip_case	^[[18~
+.undo		^[[20~
+.file_read	^[[[C
+.file_write	^[[[D
+.redraw		^[[19~
+.quit_ask	^[[21~
+.quit		^[[34~
+.show_version	^[[23~
+.macro		^[[24~
+.macro_define
+.macro_define
+.macro_define
+.macro_define
+.macro_define
+
+2:%s: Terminated successfully.\n
+3:%s: Unspecified error.\n
+4:usage: %s [-f <config>] [file]\n
+5:%s: Failed to initialize the screen.\n
+6:%s: Problem with configuration file.\n
+7:%s: Failed to allocate required memory.\n
+8:Ok.
+9:An error occured.
+10:No more memory available.
+11:File \"%s\" is too big to load.
+12:Scrap is empty.  Nothing to paste.
+13:Failed to find file \"%s\".
+14:Failed to open file \"%s\".
+15:Failed to close file \"%s\".
+16:Failed to read file \"%s\".
+17:Failed to write file \"%s\".
+18:Not a portable POSIX file name.
+19:File \"%s\" %ld bytes.
+20:File \"%s\" %ld bytes saved.
+21:File \"%s\" %ld bytes read.
+22:File \"%s\" modified.
+23:Invalid control character or \\number not 0..255.
+24:No such macro defined.
+25:No more macro space.
+26:Interrupt.
+27:<< EOF >>
+28:Macro :
+29:File not saved.  Quit (y/n) ?
+30:[ Press a key to continue. ]
+31:Read file :
+32:Write file :
+33:Write block :
+34:\smore\s
+35:\sy\b
+36:\sn\b
+37:\sq\b
+38:Nothing to undo.
--- ae-962.orig/debian.modeless.ti
+++ ae-962/debian.modeless.ti
@@ -0,0 +1,97 @@
+Debian Configuration File 
+Modeless Interface with TERMINFO Function Keys
+Anthony's Editor Feb 96
+Copyright 1993, 1996 by Anthony Howe.  All rights reserved.  No warranty.
+This file by Bill Mitchell.  Any errors are mine, not Anthony's.
+
+1:\
+File read and write\t\SF3,^R SF4,^W\tLeft, down, up, right\tarrow keys\n\
+exit and abort\t\t\F10,^C SF10\tWord left and right\t\F5 F6\n\
+Macros\t\t\tSF2\t\tPage down and up\tPgDn PgUp\n\
+Help on and off\t\tF1\t\tFront and end of line\t\SF5 SF6\n\
+Version Redraw\t\t\SF1 F8\t\tTop and bottom of file\t\Home End\n\
+Insert \t\t\ttyped keys\tDelete left and right\tBACKSPACE DEL\n\
+Literal escape\t\t\INS\t\tBlock, cut, and paste\tF2  F3  F4\n\
+Undo\t\t\t\F9\t\tInvert case\t\tF7\n
+
+#.help_off
+.literal	$(kich1)
+.cursor_up	$(kcuu1)
+.cursor_down	$(kcud1)
+.cursor_left	$(kcub1)
+.cursor_right	$(kcuf1)
+.page_up	$(kpp)
+.page_down	$(knp)
+.word_left	$(kf5)
+.word_right	$(kf6)
+.line_left	$(kf15)
+.line_right	$(kf16)
+.file_top	$(khome)
+.file_bottom	$(kend)
+.delete_left	$(kbs)
+.delete_right	$(kdch1)
+.help		$(kf1)
+.block		$(kf2)
+.cut		$(kf3)
+.paste		$(kf4)
+.flip_case	$(kf7)
+.undo		$(kf9)
+.file_read	$(kf13)
+.file_write	$(kf14)
+.redraw		$(kf8)
+.quit_ask	$(kf10)
+.quit		$(kf20)
+.show_version	$(kf11)
+.macro		$(kf12)
+.macro_define
+.macro_define
+.macro_define
+.macro_define
+.macro_define
+# key aliases for terminals without function keys
+.file_read	^r
+.file_write	^w
+.quit_ask	^c
+# these are from emacs
+.cursor_up	^p
+.cursor_down	^n
+.cursor_left	^b
+.cursor_right	^f
+
+2:Terminated successfully.\n
+3:Unspecified error.\n
+4:usage: %s [-f <config>] [file]\n
+5:Failed to initialize the screen.\n
+6:Problem with configuration file, line %lu.\n
+7:Failed to allocate required memory.\n
+8:Ok.
+9:An error occured.
+10:No more memory available.
+11:File \"%s\" is too big to load.
+12:Scrap is empty.  Nothing to paste.
+13:Failed to find file \"%s\".
+14:Failed to open file \"%s\".
+15:Failed to close file \"%s\".
+16:Failed to read file \"%s\".
+17:Failed to write file \"%s\".
+18:Not a portable POSIX file name.
+19:File \"%s\" %ld bytes.
+20:File \"%s\" %ld bytes saved.
+21:File \"%s\" %ld bytes read.
+22:File \"%s\" modified.
+23:Invalid control character or \\number not 0..255.
+24:No such macro defined.
+25:No more macro space.
+26:Interrupt.
+27:<< EOF >>
+28:Macro :
+29:File not saved.  Quit (y/n) ?
+30:[ Press a key to continue. ]
+31:Read file :
+32:Write file :
+33:Write block :
+34:\smore\s
+35:\sy\b
+36:\sn\b
+37:\sq\b
+38:Nothing to undo.
--- ae-962.orig/debian/copyright
+++ ae-962/debian/copyright
@@ -0,0 +1,114 @@
+
+Copyright 1993, 1993 by Anthony Howe.  All rights reserved.  No warranty.
+
+The Author, Anthony Howe, has placed all versions prior to April
+1993 of Anthony's Editor, hereon refered to as AE, into the Public
+Domain.  All subsequent releases of AE, starting from April 1993, 
+to the present date, will be subject to Copyright and this License
+Agreement.
+
+This License Agreement is similar, but not identical, to the GNU Public
+Licence Agreement.
+
+
+COPYING POLICES
+
+   1.	You may use, copy, and distribute verbatim copies of AE source
+	code as you received it, in any medium, provided that you:
+
+	   a)   retain in each file of the distribution and the
+		generated executables, a valid Copyright notice
+		"Copyright 1993, 1993 by Anthony Howe.  All rights
+		reserved." (or whatever years are appropriate); and
+
+	   b)   a notice stating the presence or lack of any warranty 
+		should also appear following the Copyright; and
+
+	   c)   provide any other recipients of this software a copy
+		of this notice that explains the software's status; and
+
+	   d)   may charge a distribution fee for the physical act of
+		transferring a copy.
+
+   2.   You may modify your copy or copies of AE source code or any
+	portion of it, and copy and distribute such modifications
+	under the terms of Paragraph 1 above, provided that you also
+	do the following:
+
+	   a)   cause the modified files to carry prominent notices
+		stating that you changed the files and the date of any
+		change; and
+
+	   b)   cause the whole of any work that you distribute or
+		publish, that in whole or in part contains or is a
+		derivative of AE or any part thereof, to be licensed
+		at no charge to all third parties on terms identical
+		to those contained in this License Agreement; and
+
+	   c)	you may at your option offer warranty protection in
+		exchange for a fee.
+
+   3.   You may use, copy, and distribute AE in object or executable
+	form under the terms of Paragraphs 1 and 2 above provided that
+	you also do one of the following:
+
+	   a)   accompany it with the complete corresponding machine-
+		readable source code, which must be distributed under
+		the terms of Paragraphs 1 and 2 above; or
+
+	   b)	accompany it with a written offer, valid for at least
+		three (3) years, to give any third party free (except
+		for nominal shipping charge) a complete machine-readable
+		copy of the corresponding source to be distributed under
+                the terms of Paragraphs 1 and 2 above; or
+
+	   c)   accompany it with the information you received as to
+		where the corresponding source code may be obtained.
+		(This alternative is allowed only for noncommercial
+		distribution and only if you received the program in
+		object code or executable form alone.)
+
+   4.   You may not copy, sublicense, distribute, or transfer AE
+	except as expressly provided under this License Agreement.
+	Any attempt otherwise to copy, sublicense, distribute, or
+	transfer AE is void and your rights to use AE under this
+	License Agreement shall be automatically terminated.  However,
+	parties who have received computer software programs from you
+	with this License Agreement will not have their licenses
+	terminated so long as such parties remain in full compliance.
+
+   5.   You may incorporate parts of AE into other programs whose
+	distribution conditions are different provided both source
+	code and documentation acknowledge the contributions made by
+	the Author with a notice "Portions of this code derivied from
+	Anthony's Editor.  Copyright 1993, 1993 by Anthony Howe." (or
+	whatever years are appropriate).
+
+   6.   Mere aggregation of other unrelated programs with this program
+	(or its derivative) on a volume of a storage or distribution
+	medium (such as archive collections) does not bring the other
+	programs under the scope of these terms.
+
+
+NO WARRANTY
+
+Because AE is licensed free of charge, we provide absolutely no
+warranty, to the extent permitted by applicable state law.  Except
+when otherwise stated in writing, the Author and/or other parties
+provide AE "as is" without warranty of any kind, either expressed or
+implied, including, but not limited to, the implied warranties of
+merchantability and fitness for a particular purpose.  The entire risk
+as to the quality and performance of the program is with you.  Should
+the AE program prove defective, you assume the cost of all necessary
+servicing, repair, or correction.
+
+In no event unless required by applicable law will the Author and/or
+any other party who may modify and redistribute AE as permitted above,
+be liable to you for damages, including any lost profits, lost monies,
+or other special, incidental or consequential damages arising out of
+the use or inability to use (including but not limited to loss of data
+or data being rendered inaccurate or losses sustained by third parties
+or a failure of the program to operate with programs not distributed
+by the Author) the program, even if you have been advised of the
+possibility of such damages, or for any claim by any other party.
+
--- ae-962.orig/debian/rules~
+++ ae-962/debian/rules~
@@ -0,0 +1,81 @@
+#! /usr/bin/make -f
+#
+# Invoke each target with `./debian/rules <target>'.  All targets should be
+# invoked with the package root as the current directory.
+#
+# The `binary' target must be run as root, as it needs to install files with
+# specific ownership.
+
+CC = gcc
+CFLAGS = -O2 -DDEBIAN -DTERMIOS -DBADCURSES # ncurses terminfo
+# CFLAGS = -g -DDEBIAN -DTERMIOS -DBADCURSES # debugging ncurses terminfo
+# CFLAGS = -O2 -DDEBIAN -DTERMCAP -DBADCURSES # termcap
+# CFLAGS = -g -DDEBIAN -DTERMCAP # debugging termcap
+LDFLAGS = -N -s
+# LDFLAGS = # debugging
+prefix=/usr
+# LIBS = -lcurses -ltermcap # termcap
+LIBS = -lncurses # terminfo
+
+package=ae
+
+build:
+	$(checkdir)
+# Builds the binary package.
+	make CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)"
+	touch build
+
+clean:
+# Undoes the effect of `make -f debian/rules build'.
+	$(checkdir)
+	rm -f build
+	rm -f *.o ae core
+	rm -rf *~ debian/tmp
+
+binary-indep:
+# None--
+	@echo >&2 'No architecture independant portions'; false
+
+binary binary-arch:	checkroot build
+	rm -rf debian/tmp
+	install -d debian/tmp debian/tmp/DEBIAN
+	install -d debian/tmp/usr/doc/$(package)
+	cp debian/copyright debian/tmp/usr/doc/$(package)
+	cp debian/preinst debian/tmp/DEBIAN/.
+	chmod +x debian/tmp/DEBIAN/preinst
+	install -d debian/tmp/bin
+	install -s ./ae debian/tmp/bin/.
+	install -d debian/tmp/etc
+	install debian.modeless.ti debian/tmp/etc/ae.rc
+	install -d debian/tmp/usr/man/man1
+	install debian.ae.1 debian/tmp/usr/man/man1/ae.1
+	install -d debian/tmp/usr/doc/ae
+	install ae.man debian/tmp/usr/doc/ae/ae.man
+	install debian.modeless.ti debian/tmp/usr/doc/ae/debian.modeless.ti
+	install mode.rc debian/tmp/usr/doc/ae/mode.rc
+	install modeless.pc debian/tmp/usr/doc/ae/modeless.pc
+	install modeless.rc debian/tmp/usr/doc/ae/modeless.rc
+	install modeless.tc debian/tmp/usr/doc/ae/modeless.tc
+	install modeless.ti debian/tmp/usr/doc/ae/modeless.ti
+	gzip -9f debian/tmp/usr/doc/ae/*
+	gzip -9f debian/tmp/usr/man/man1/ae.1
+	dpkg-shlibdeps $(package)
+	dpkg-gencontrol
+	chown -R root.root debian/tmp
+	chmod -R g-ws debian/tmp
+	dpkg --build debian/tmp ..
+
+define checkdir:
+	test -f $(package).man -a -f debian/rules
+endef
+
+# Static--
+
+source diff:
+	@echo >&2 'source and diff are obsolete, try dpkg-source -b'; false
+
+checkroot:
+	$(checkdir)
+	test root = "`whoami`"
+
+.PHONY: binary binary-arch binary-indep clean checkroot
--- ae-962.orig/debian/control
+++ ae-962/debian/control
@@ -0,0 +1,14 @@
+Source: ae
+Section: base
+Priority: required
+Maintainer: Dale Scheetz <dwarf@polaris.net>
+Standards-Version: 2.0.0.0
+
+Package: ae
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Anthony's Editor -- a tiny full-screen editor
+ ae is a tiny full-screen text editor with both modal (vi-like)
+ and modeless (emacs-like) modes, determined by an ae.rc config file.
+ .
+ Keybindings are configurable in the startup file.
--- ae-962.orig/debian/preinst
+++ ae-962/debian/preinst
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -e
+
+dpkg --assert-support-predepends
--- ae-962.orig/debian/rules
+++ ae-962/debian/rules
@@ -0,0 +1,76 @@
+#! /usr/bin/make -f
+#
+# Invoke each target with `./debian/rules <target>'.  All targets should be
+# invoked with the package root as the current directory.
+#
+# The `binary' target must be run as root, as it needs to install files with
+# specific ownership.
+
+CC = gcc
+CFLAGS = -O2 -DDEBIAN -DTERMIOS -DBADCURSES # ncurses terminfo
+# CFLAGS = -g -DDEBIAN -DTERMIOS -DBADCURSES # debugging ncurses terminfo
+# CFLAGS = -O2 -DDEBIAN -DTERMCAP -DBADCURSES # termcap
+# CFLAGS = -g -DDEBIAN -DTERMCAP # debugging termcap
+LDFLAGS = -s
+# LDFLAGS = # debugging
+prefix=/usr
+# LIBS = -lcurses -ltermcap # termcap
+LIBS = -lncurses # terminfo
+
+package=ae
+
+build:
+	$(checkdir)
+# Builds the binary package.
+	make CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)"
+	touch build
+
+clean:
+# Undoes the effect of `make -f debian/rules build'.
+	$(checkdir)
+	rm -f build
+	rm -f *.o ae core
+	rm -rf *~ debian/tmp
+
+binary-indep:
+# None--
+	@echo >&2 'No architecture independant portions'; false
+
+binary binary-arch:	checkroot build
+	rm -rf debian/tmp
+	install -d debian/tmp debian/tmp/DEBIAN
+	install -d debian/tmp/usr/doc/$(package)
+	cp debian/copyright debian/tmp/usr/doc/$(package)
+	cp debian/preinst debian/tmp/DEBIAN/.
+	chmod +x debian/tmp/DEBIAN/preinst
+	install -d debian/tmp/bin
+	install -s ./ae debian/tmp/bin/.
+	install -d debian/tmp/etc
+	install -m 644 debian.modeless.ti debian/tmp/etc/ae.rc
+	install -d debian/tmp/usr/man/man1
+	install -m 644 debian.ae.1 debian/tmp/usr/man/man1/ae.1
+	install -d debian/tmp/usr/doc/ae
+	install -m 644 ae.man debian/tmp/usr/doc/ae/ae.man
+	install -m 644 debian.modeless.ti \
+		debian/tmp/usr/doc/ae/debian.modeless.ti
+	install -m 644 mode.rc debian/tmp/usr/doc/ae/mode.rc
+	install -m 644 modeless.pc debian/tmp/usr/doc/ae/modeless.pc
+	install -m 644 modeless.rc debian/tmp/usr/doc/ae/modeless.rc
+	install -m 644 modeless.tc debian/tmp/usr/doc/ae/modeless.tc
+	install -m 644 modeless.ti debian/tmp/usr/doc/ae/modeless.ti
+	gzip -9f debian/tmp/usr/doc/ae/*
+	gzip -9f debian/tmp/usr/man/man1/ae.1
+	dpkg-shlibdeps $(package)
+	dpkg-gencontrol
+	chown -R root.root debian/tmp
+	chmod -R g-ws debian/tmp
+	dpkg --build debian/tmp ..
+
+define checkdir:
+	test -f $(package).man -a -f debian/rules
+endef
+
+checkroot:
+	test root = "`whoami`"
+
+.PHONY: binary binary-arch binary-indep clean checkroot
--- ae-962.orig/debian/changelog~
+++ ae-962/debian/changelog~
@@ -0,0 +1,72 @@
+ -- Dale Scheetz <dwarf@polaris.net>  Wed, 13 Nov 1996 13:25:40 -0500
+ae (962-11) frozen unstable; urgency=low
+
+  * installed "special character" patch
+  * removed execute permissions from man and docs
+
+ -- Dale Scheetz <dwarf@polaris.net>  Tue, 12 Nov 1996 18:15:04 -0500
+
+ae (962-10) unstable; urgency=low
+
+  * removed -N linker option
+
+ -- Dale Scheetz <dwarf@polaris.net>  Mon, 23 Sep 1996 10:03:05 -0400
+
+ae (962-9) unstable; urgency=low
+
+  * convert to new source format
+  * remove Essential field
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun, 1 Sept 1996 15:24:14 +0400
+
+Changes for ae-962-8
+	elf package
+	* source package multi-architecture compatability hanges
+
+Changes for ae-962-7
+	elf package
+	* added "PRIORITY: required" field to control file.
+	* The debian-specific change in main.c:lineinput() to put
+          terminal into raw mode turned off ICRNL.  Put terminal
+          into half-baked mode by turning ICRNL back on here.
+
+Changes for ae-962-6
+	elf package
+	* changes in main.c:lineinput() to avoid problem working with
+	  ncurses-1.9.9e.
+
+Changes for ae-962-5
+	elf package
+	* added Essential field to control file
+	* added keybinding aliases to /etc/ae.rc
+	* ^r, ^w, ^c (on menu) = read, write, quit-ask
+	* ^f, ^b, ^p, ^n (not on menu) = forward, back, up, down
+
+Changes for ae-962-4
+	elf package
+	* changed package version number format from 96.2 to 962
+          (representing Feb, 96).  This is so that dselect will
+	  upgrade instances of the previous ae-493 (representing
+	  April, 93) package to this new one.
+
+Changes for ae-96.2-3
+	elf package
+	* moved ae from /usr/bin to /bin
+
+Changes for ae-96.2-2
+	(changes not captured here)
+
+Changes for ae-96.2-1
+	elf package
+	* initial upload -- replaces ae-493
+        * added #ifndef DEBIAN block in header.h
+        * added #ifdef DEBIAN block in main.c
+
+ae-2.96 -- anthony's editor Feb 96 version
+kitted up for debian by Bill Mitchell <mitchell@mdd.comm.mot.com>
+from sources obtained via email from the author
+
+Local variables:
+mode: debian-changelog
+End:
+
--- ae-962.orig/debian/control~
+++ ae-962/debian/control~
@@ -0,0 +1,14 @@
+Source: ae
+Section: base
+Priority: standard
+Maintainer: Dale Scheetz <dwarf@polaris.net>
+Standards-Version: 2.0.0.0
+
+Package: ae
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Anthony's Editor -- a tiny full-screen editor
+ ae is a tiny full-screen text editor with both modal (vi-like)
+ and modeless (emacs-like) modes, determined by an ae.rc config file.
+ .
+ Keybindings are configurable in the startup file.
--- ae-962.orig/debian/substvars
+++ ae-962/debian/substvars
@@ -0,0 +1 @@
+shlibs:Depends=libc5 (>= 5.2.18), ncurses3.0
--- ae-962.orig/debian/files
+++ ae-962/debian/files
@@ -0,0 +1 @@
+ae_962-10_i386.deb base required
--- ae-962.orig/debian/changelog
+++ ae-962/debian/changelog
@@ -0,0 +1,71 @@
+ae (962-11) frozen unstable; urgency=low
+
+  * installed "special character" patch
+  * removed execute permissions from man and docs
+
+ -- Dale Scheetz <dwarf@polaris.net>  Wed, 13 Nov 1996 13:25:40 -0500
+
+ae (962-10) unstable; urgency=low
+
+  * removed -N linker option
+
+ -- Dale Scheetz <dwarf@polaris.net>  Mon, 23 Sep 1996 10:03:05 -0400
+
+ae (962-9) unstable; urgency=low
+
+  * convert to new source format
+  * remove Essential field
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun, 1 Sept 1996 15:24:14 +0400
+
+Changes for ae-962-8
+	elf package
+	* source package multi-architecture compatability hanges
+
+Changes for ae-962-7
+	elf package
+	* added "PRIORITY: required" field to control file.
+	* The debian-specific change in main.c:lineinput() to put
+          terminal into raw mode turned off ICRNL.  Put terminal
+          into half-baked mode by turning ICRNL back on here.
+
+Changes for ae-962-6
+	elf package
+	* changes in main.c:lineinput() to avoid problem working with
+	  ncurses-1.9.9e.
+
+Changes for ae-962-5
+	elf package
+	* added Essential field to control file
+	* added keybinding aliases to /etc/ae.rc
+	* ^r, ^w, ^c (on menu) = read, write, quit-ask
+	* ^f, ^b, ^p, ^n (not on menu) = forward, back, up, down
+
+Changes for ae-962-4
+	elf package
+	* changed package version number format from 96.2 to 962
+          (representing Feb, 96).  This is so that dselect will
+	  upgrade instances of the previous ae-493 (representing
+	  April, 93) package to this new one.
+
+Changes for ae-96.2-3
+	elf package
+	* moved ae from /usr/bin to /bin
+
+Changes for ae-96.2-2
+	(changes not captured here)
+
+Changes for ae-96.2-1
+	elf package
+	* initial upload -- replaces ae-493
+        * added #ifndef DEBIAN block in header.h
+        * added #ifdef DEBIAN block in main.c
+
+ae-2.96 -- anthony's editor Feb 96 version
+kitted up for debian by Bill Mitchell <mitchell@mdd.comm.mot.com>
+from sources obtained via email from the author
+
+Local variables:
+mode: debian-changelog
+End:
+
--- ae-962.orig/ae.patch
+++ ae-962/ae.patch
@@ -0,0 +1,16 @@
+
+--- display.c.orig	Thu May  9 04:42:49 1996
++++ display.c	Fri Nov  8 17:00:40 1996
+@@ -22,0 +23,6 @@
++ * Consider "printable" any iso-8859-1 character.
++ */
++
++#define my_isprint(ch) (isprint((ch)) || 160 <= (ch) && (ch) <= 255)
++
++/*
+@@ -347 +353 @@
+-	if (isprint(ch) || ch == '\t' || ch == '\n') {
++	if (my_isprint(ch) || ch == '\t' || ch == '\n') {
+@@ -429 +435 @@
+-	if (isprint(ch)) {
++	if (my_isprint(ch)) {
