diff -ruN ng.1.3.1/Makefile Ng-1.3.1+lx/Makefile
--- ng.1.3.1/Makefile
+++ Ng-1.3.1+lx/Makefile	Wed Aug 18 20:00:35 1993
@@ -0,0 +1,137 @@
+# Makefile for MicroEMACS.
+# Is there a better way to do the rebuilds, other than using
+# the links?
+# Modified for Ng 1.0	by Shigeki Yoshida (shige@csk.CO.JP)	1990.01.29
+
+SYS	= sysv
+
+# CDEFS gets defines, and gets passed to lint. CFLAGS gets flags, and doesn't
+# get passed to lint.
+#
+# Now, compile time options are defined in a "config.h".
+#
+CDEFS	=
+CFLAGS	= -O $(CDEFS)
+
+# If your machine have an alloca() in a libPW.a, please add -lPW to the LIBS.
+#LIBS	= -lcurses -lPW
+LIBS	= -lcurses -ltermcap
+
+# If your machine don't have an alloca(), please define ALLOCA.
+#ALLOCA	= alloca.o
+ALLOCA	=
+
+CC	= cc
+
+# Objects which only depend on the "standard" includes
+OBJS	= basic.o cmode.o dir.o dired.o file.o line.o paragraph.o \
+	  random.o region.o shell.o version.o window.o word.o \
+	  kinsoku.o
+
+# Those with unique requirements
+IND	= buffer.o complt.o display.o echo.o extend.o help.o kbd.o keymap.o \
+	  macro.o main.o match.o modes.o regex.o re_search.o search.o \
+	  kanji.o
+
+# System dependent objects
+OOBJS = cinfo.o spawn.o ttyio.o tty.o ttykbd.o
+
+OBJ = $(OBJS) $(IND) $(OOBJS) fileio.o $(ALLOCA)
+
+OSRCS	= cinfo.c fileio.c spawn.c ttyio.c tty.c ttykbd.c alloca.c
+SRCS	= basic.c cmode.c dir.c dired.c file.c line.c match.c paragraph.c \
+	  random.c region.c search.c shell.c version.c window.c word.c \
+	  buffer.c complt.c display.c echo.c extend.c help.c kbd.c keymap.c \
+	  macro.c main.c modes.c regex.c re_search.c kanji.c kinsoku.c
+
+OINCS =	ttydef.h sysdef.h chrdef.h
+INCS =	config.h def.h
+
+#PROG = mg
+PROG = ng
+
+$(PROG):	$(OBJ)
+	cc $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
+
+# strip mg once you're satisfied it'll run -- makes it much smaller
+strip:
+	strip $(PROG)
+
+lint: $(SRCS) $(OSRCS) $(INCS) $(OINCS)
+	lint -ahbz $(CDEFS) $(SRCS) $(OSRCS)
+
+$(OBJ):		$(INCS) $(OINCS)
+
+$(OOBJS):	$(INCS) $(OINCS)
+
+buffer.o display.o keymap.o modes.o fileio.o: \
+		$(INCS) $(OINCS) kbd.h
+
+complt.o:	$(INCS) $(OINCS) kbd.h complt.h
+
+echo.o:		$(INCS) $(OINCS) key.h macro.h complt.h
+
+extend.o help.o kbd.o: \
+		$(INCS) $(OINCS) kbd.h macro.h key.h
+
+kanji.o:	$(INCS) $(OINCS) kinit.h
+
+macro.o:	$(INCS) $(OINCS) macro.h key.h
+
+main.o search.o: \
+		$(INCS) $(OINCS) macro.h
+
+match.o:	$(INCS) $(OINCS) key.h
+
+re_search.o:	$(INCS) $(OINCS) regex.h macro.h
+
+regex.o:	$(INCS) $(OINCS) regex.h
+
+sysdef.h:	sys/$(SYS)/sysdef.h	# Update links, if needed.
+	rm -f sysdef.h
+	ln sys/$(SYS)/sysdef.h .
+
+ttydef.h:	sys/default/ttydef.h
+	rm -f ttydef.h
+	ln sys/default/ttydef.h .
+
+chrdef.h:	sys/default/chrdef.h
+	rm -f chrdef.h
+	ln sys/default/chrdef.h .
+
+fileio.c:	sys/$(SYS)/fileio.c
+	rm -f fileio.c
+	ln sys/$(SYS)/fileio.c .
+
+spawn.c:	sys/$(SYS)/spawn.c
+	rm -f spawn.c
+	ln sys/$(SYS)/spawn.c .
+
+tty.c:		sys/default/tty.c
+	rm -f tty.c
+	ln sys/default/tty.c .
+
+ttyio.c:	sys/$(SYS)/ttyio.c
+	rm -f ttyio.c
+	ln sys/$(SYS)/ttyio.c .
+
+ttykbd.c:	sys/default/ttykbd.c
+	rm -f ttykbd.c
+	ln sys/default/ttykbd.c .
+
+cinfo.c:	sys/default/cinfo.c
+	rm -f cinfo.c
+	ln sys/default/cinfo.c .
+
+alloca.c:	sys/default/alloca.c
+	rm -f alloca.c
+	ln sys/default/alloca.c .
+
+port: $(SRCS) $(INCS)
+	rm -f port
+	tar cfb port 1 $?
+
+clean:;	rm -f $(OBJ) $(OSRCS) $(OINCS)
+
+install:
+	install -cs ng /usr/bin/
diff -ruN ng.1.3.1/README.jus Ng-1.3.1+lx/README.jus
--- ng.1.3.1/README.jus
+++ Ng-1.3.1+lx/README.jus	Mon Jun  1 19:14:26 1992
@@ -0,0 +1,14 @@
+
+ 作者の方から、ソースコードやマニュアル中に書かれている所属やアドレスが
+かなり古いものなので、最新のものがわかるようにしてほしいという要望が
+ありましたので、以下に載せておきます。
+
+					    JUS 配布担当 (sy) 1992.06.01
+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+Ng の作者の現在の所属とアドレス
+
+東京大学・生産技術研究所・電子計算機室
+吉田茂樹 (shige@iis.u-tokyo.ac.jp)
+
diff -ruN ng.1.3.1/config.h Ng-1.3.1+lx/config.h
--- ng.1.3.1/config.h	Wed Feb 13 12:41:31 1991
+++ Ng-1.3.1+lx/config.h	Wed May  5 08:35:04 1993
@@ -35,7 +35,7 @@
 
 #define	PREFIXREGION	/* Enable function "prefix-region". */
 
-#define	C_MODE		/* Enable c-mode functions. */
+#undef	C_MODE		/* Enable c-mode functions. */
 
 #define	FILLPREFIX	/* Enable fill prefix function. */
 
diff -ruN ng.1.3.1/sys/sysv/Makefile Ng-1.3.1+lx/sys/sysv/Makefile
--- ng.1.3.1/sys/sysv/Makefile	Wed Feb 13 12:41:54 1991
+++ Ng-1.3.1+lx/sys/sysv/Makefile	Wed May  5 08:39:52 1993
@@ -15,7 +15,7 @@
 
 # If your machine have an alloca() in a libPW.a, please add -lPW to the LIBS.
 #LIBS	= -lcurses -lPW
-LIBS	= -lcurses
+LIBS	= -lcurses -ltermcap
 
 # If your machine don't have an alloca(), please define ALLOCA.
 #ALLOCA	= alloca.o
diff -ruN ng.1.3.1/sys/sysv/fileio.c Ng-1.3.1+lx/sys/sysv/fileio.c
--- ng.1.3.1/sys/sysv/fileio.c	Wed Feb 13 12:41:55 1991
+++ Ng-1.3.1+lx/sys/sysv/fileio.c	Mon Jul 26 13:57:49 1993
@@ -428,7 +428,7 @@
     }
     if(bclear(bp) != TRUE) return FALSE;
 #ifdef	BUGFIX	/* 91.02.04  by M.Oki */
-    (VOID) strcpy(line, "/bin/ls -al ");
+    (VOID) strcpy(line, "/usr/bin/ls -al ");
     (VOID) strcpy(&line[12], dirname);
 #else	/* ORIGINAL */
     (VOID) strcpy(line, "ls -al ");
@@ -493,6 +493,7 @@
 	return status == 0;
 }
 
+#ifndef	linux
 rename(f1, f2)
 char *f1, *f2;
 {
@@ -508,6 +509,7 @@
 		return FALSE;
 	return status == 0;
 }
+#endif
 #endif NO_DIRED
 
 #ifndef NO_DIRED	/* 91.01.15  by K.Maeda */
diff -ruN ng.1.3.1/sys/sysv/spawn.c Ng-1.3.1+lx/sys/sysv/spawn.c
--- ng.1.3.1/sys/sysv/spawn.c	Wed Nov 10 01:41:55 1993
+++ Ng-1.3.1+lx/sys/sysv/spawn.c	Wed Aug 18 19:54:39 1993
@@ -30,6 +30,7 @@
 	register int	wpid;
 	register int	(*oqsig)();
 	register int	(*oisig)();
+	register int	(*otsig)();
 #ifdef HAVE_SIGWINCH	/* by A.ITO	21 Jan., 1991 */
 	register int	(*owsig)();
 #endif
@@ -62,6 +63,11 @@
 #ifdef HAVE_SIGWINCH	/* by A.ITO  21 Jan. 1991 */
 	owsig = signal(SIGWINCH,  SIG_IGN);
 #endif
+#ifdef	linux
+	otsig = signal(SIGTSTP, SIG_DFL);
+	(void) kill(0, SIGTSTP);
+	signal(SIGTSTP, otsig);
+#else	!linux
 #ifdef JOBCTRL	/* by A.ITO  21 Jan. 1991 */
 	if (strcmp(shellp,"/bin/sh") != 0)
 		(void) kill(0, SIGTSTP);
@@ -81,6 +87,7 @@
 #ifdef JOBCTRL	/* by A.ITO  21 Jan. 1991 */
 	}
 #endif /* JOBCTRL */
+#endif	!linux
 	signal(SIGINT,  oisig);
 	signal(SIGQUIT, oqsig);
 #ifdef HAVE_SIGWINCH	/* by A.ITO  21 Jan. 1991 */
@@ -114,16 +121,17 @@
 char *command;
 char *input;
 {
-	char buf[256];
-	char *tmp;
+	char buf[256], *p;
+	static char *tmp[15];
 	int ostdin, ostdout, ostderr, in, out, s;
 	extern char *mktemp();
 
-	if ((tmp = mktemp("/tmp/ngXXXXXX")) == NULL)
+	strcpy(tmp, "/tmp/ngXXXXXX");
+	if ((p = mktemp(tmp)) == NULL)
 		return NULL;
 	if ((in = open(input ? input : "/dev/null", 0)) < 0)
 		return NULL;
-	if ((out = creat(tmp, S_IREAD | S_IWRITE)) < 0) {
+	if ((out = creat(p, S_IREAD | S_IWRITE)) < 0) {
 		close(in);
 		return NULL;
 	}
@@ -154,9 +162,9 @@
 #endif	/* SVR2 */
 skip:	close(ostdin); close(ostdout); close(ostderr);
 	if (s) {
-		unlink(tmp);
+		unlink(p);
 		return NULL;
 	}
-	return tmp;
+	return p;
 }
 #endif	/* NO_SHELL */
