Bug fixes from Scott Schwartz.

Try to make 9term not crash when X errors happen.
diff --git a/src/cmd/ed.c b/src/cmd/ed.c
index 42fa3e0..1c1639b 100644
--- a/src/cmd/ed.c
+++ b/src/cmd/ed.c
@@ -6,6 +6,8 @@
 #include <bio.h>
 #include <regexp.h>
 
+#undef EOF	/* stdio? */
+
 enum
 {
 	FNSIZE	= 128,		/* file name */