diff -u --recursive mc-3.1/Make.common.in mc-3.1.2/Make.common.in
--- mc-3.1/Make.common.in	Mon Jan  8 22:35:56 1996
+++ mc-3.1.2/Make.common.in	Tue Jan  9 19:59:30 1996
@@ -1,4 +1,4 @@
-VERSION=3.1
+VERSION=3.1.2
 SHELL = /bin/sh
 
 # This variable makes it possible to move the installation root to another
diff -u --recursive mc-3.1/NEWS mc-3.1.2/NEWS
--- mc-3.1/NEWS	Mon Jan  8 22:35:55 1996
+++ mc-3.1.2/NEWS	Tue Jan  9 19:59:28 1996
@@ -1,16 +1,52 @@
+
 Version 3.1
 
-- .netrc support (the program will check this for your login name and
-  possibly password on remote machines).
+This has been finished:
 
-- Unicode support on the Linux console.
+- Enhanced ftpfs:
+  - Displays progress bars.
+  - Supports netware and windows nt servers
+  - Better support for symlinked files.
+  - Handles those warez sites file names.
+  - Increase the directory cache timeout.
+  - Cache flushing (C-r)
+  - If you append a /~ to the directory, you will log into your home
+    directory (this is done by default if you use the menus to connect).
+  - More robust.
+- Subshell fixes (it should not hang any longer).
+  - Fixes prompt handling for zsh and tcsh users.
+  - Fixes variable expansion for tcsh (now you may edit files).
+  - Rewrote the sync code between the parend and child, should not hang
+    any longer.
+- Better command completion.
+- Keypad handling enhanced:
+  - Special key treatment for +, -, \ and now may be configure to
+    only take place if you do not have a command typed in.
+  - Now the + and \ bindings when ran on the Linux console work
+    may use the keypad and M-+ and M-\ and leave the + and \ keys
+    free.
+- Better handling of the line drawing chars on OSF/1 and AIX.
+- Enhanced tar/compressed tar file systems.
+- Global kill ring.
+- Added undelete feature for Linux systems: now you may recover deleted files
+  on ext2 file systems with the Undelete file system.
+- Symlink commands (for symlink lovers).
+  see the docs on C-x C-r,  C-x C-l, C-x C-s keystrokes.
+- New macros:
+  %b and %B return the basename of the selected filename
+  %var{ENV-VAR} expands to the contents of ENV-VAR variable.
+- MC may be invoked as a viewer (mc -f flag).
+- Added Unicode support on the Linux console (run with mc -N)
+- Tons of bug fixes, the code is cleaner and hopefully 
+- Allow a vfs pathname to be passed as a startup directory.
 
-- Now the + and \ bindings when ran on the Linux console work
-  may use the keypad and M-+ and M-\ and leave the + and \ keys
-  free.
+This is a list of people that put their effort into making the 3.1
+release:
 
-- A bunch of new commands to make work with symlinks easier (see C-x (C-)r,
-  C-x C-l, C-x C-s keystrokes).
+Adam Tla/lka, Antonio Palama, Carl Thompson, Ching Hui, Dugan Porter, Gerd
+Knorr, Ilya Rybkin, Jakub Jelinek, Janne Kikonlehto, Juan Grigera, Juan Jose
+Ciarlante, John Davis, Marcelo Fabian Roccasalva, Perry Francis Nguyen,
+Sergey Ya Korshunoff Steven Hirsch, Thanh Ma and Torben Fjerdingstad.
 
 Version 3.0
 
diff -u --recursive mc-3.1/README mc-3.1.2/README
--- mc-3.1/README	Mon Jan  8 22:35:55 1996
+++ mc-3.1.2/README	Tue Jan  9 19:59:28 1996
@@ -10,7 +10,7 @@
   Obtaining the Midnight Commander
 
 
-This is version 3.0 of the Midnight Commander, a free Norton Commander
+This is version 3.1 of the Midnight Commander, a free Norton Commander
 Clone with many useful features. The Midnight Commander comes with
 mouse support on xterms and optionally on the Linux console.
 
@@ -128,7 +128,7 @@
 The last alpha versions are available at ftp.nuclecu.unam.mx in the
 directory /linux/local/devel.
 
-European mirror of both version 3.0 and alpha versions is available
+European mirror of both version 3.1 and alpha versions is available
 at ftp.cvut.cz in the directory /pub/mc
 
 
diff -u --recursive mc-3.1/VERSION mc-3.1.2/VERSION
--- mc-3.1/VERSION	Mon Jan  8 22:35:55 1996
+++ mc-3.1.2/VERSION	Tue Jan  9 19:59:30 1996
@@ -1 +1 @@
-#define VERSION "3.1"
+#define VERSION "3.1.2"
diff -u --recursive mc-3.1/configure mc-3.1.2/configure
--- mc-3.1/configure	Mon Jan  8 22:35:54 1996
+++ mc-3.1.2/configure	Tue Jan  9 19:59:28 1996
@@ -6564,12 +6564,35 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   
+			cat > conftest.$ac_ext <<EOF
+#line 6569 "configure"
+#include "confdefs.h"
+
+#include <curses.h>
+#include <term.h>
+int main() { return 0; }
+int t() {
+
+int mc_test ()
+{
+   if (key_end == parm_insert_line)
+ 	return 1;
+   return 0;
+}
+
+; return 0; }
+EOF
+if eval $ac_compile; then
+  rm -rf conftest*
+  
 			LIBS="$LIBS -lcurses"
 			cat >> confdefs.h <<\EOF
 #define USE_SETUPTERM 1
 EOF
 
-                        
+fi
+rm -f conftest*
+
 else
   echo "$ac_t""no" 1>&6
 fi
diff -u --recursive mc-3.1/configure.in mc-3.1.2/configure.in
--- mc-3.1/configure.in	Mon Jan  8 22:35:55 1996
+++ mc-3.1.2/configure.in	Tue Jan  9 19:59:28 1996
@@ -1067,9 +1067,18 @@
 	[Ss][Ll][Aa][Nn][Gg]*)
 changequote([, ])dnl
 		AC_CHECK_LIB(curses,setupterm,[
+			AC_TRY_COMPILE([
+#include <curses.h>
+#include <term.h>],[
+int mc_test ()
+{
+   if (key_end == parm_insert_line)
+ 	return 1;
+   return 0;
+}
+],[
 			LIBS="$LIBS -lcurses"
-			AC_DEFINE(USE_SETUPTERM)
-                        ])
+			AC_DEFINE(USE_SETUPTERM)])])
 		;;
 esac
 
diff -u --recursive mc-3.1/doc/LSM mc-3.1.2/doc/LSM
--- mc-3.1/doc/LSM	Mon Jan  8 22:36:05 1996
+++ mc-3.1.2/doc/LSM	Tue Jan  9 19:59:37 1996
@@ -1,44 +1,43 @@
-
 Begin3
 
-Title:		Midnight Commander
-Version:	3.0
-Entered-date:	13SEP95
-
-Description:	File manager and visual shell.  [More!]
-
-Keywords:	file directory manager shell browser utility curses mouse menu
-		visual user-friendly color SLang vfs tar ftp ls
-
-Author:		miguel@roxanne.nuclecu.unam.mx	(Miguel de Icaza)
-		jtklehto@paju.oulu.fi		(Janne Kukonlehto)
-		dugan@b011.eunet.es		(Dugan Orlando Porter)
-		rodo@earn.cvut.cz		(Radek Doulik)
-		fredl@nebula.ow.nl		(Fred Leeflang)
-		jj@sunsite.mff.cuni.cz		(Jakub Jelinek)
-		u811563@oz.nthu.edu.tw		(Ching Hui)
-		mok@roxanne.nuclecu.unam.mx	(Mauricio Plaza)
-
-Maintained-by:	miguel@roxanne.nuclecu.unam.mx	(Miguel de Icaza)
+Title:          Midnight Commander
+Version:        3.1
+Entered-date:   8JAN96
+
+Description:    File manager and visual shell.  [More!]
+
+Keywords:       file directory manager shell browser utility curses mouse menu
+                visual user-friendly color vfs tar ftp gzip undelete 
+
+Author:         rodo@earn.cvut.cz               (Radek Doulik)
+                u811563@Oz.nthu.edu.tw          (Ching Hui)
+                miguel@roxanne.nuclecu.unam.mx  (Miguel de Icaza)
+                jj@gnu.ai.mit.edu               (Jakub Jelinek)
+                jtklehto@paju.oulu.fi           (Janne Kukonlehto)
+                fredl@nebula.ow.nl              (Fred Leeflang)
+                mok@roxanne.nuclecu.unam.mx     (Mauricio Plaza)
+                dugan@b011.eunet.es             (Dugan Orlando Porter)
+		
+Maintained-by:  miguel@roxanne.nuclecu.unam.mx  (Miguel de Icaza)
 
-Primary-site:	sunsite.unc.edu /pub/Linux/utils/file/managers
-		721k mc-3.0.tar.gz
+Primary-site:   sunsite.unc.edu /pub/Linux/utils/file/managers
+                806k mc-3.1.tar.gz
 
 Alternate-site: ftp.nuclecu.unam.mx /linux/local
-		721k mc-3.0.tar.gz
+                806k mc-3.1.tar.gz
 
-Platforms:	i[3-5]86-linux-linux1.[0-3],
-		mips-dec-ultrix4.3, mips-sgi-irix5.2,
-		rs6000-ibm-aix3.2.5, sparc-sun-sunos4.1,
-		sparc-sun-netbsd1.0, sparc-sun-solaris2.[3-5],
-		hppa-hp-hpux9, hppa-hp-hpux7, m68k-apple-aux,
-		mips-dec-netbsd1.0
-
-		If mouse support is required on the Linux
-		  console, then the GPM mouse server
-		  (available at iride.unipv.it:/pub/gpm)
-		  (ftp.nuclecu.unam.mx:/linux/local)
+Platforms:      i386-linux-linux1.[0123],
+                mips-dec-ultrix4.3, mips-sgi-irix5.2,
+                rs6000-ibm-aix3.2.5, sparc-sun-sunos4.1,
+                sparc-sun-netbsd1.0, sparc-sun-solaris2.3,
+                hppa-hp-hpux9, hppa-hp-hpux7, m68k-apple-aux,
+                unixware-????, dgux, sco,
+
+                If mouse support is required on the Linux
+                  console, then the GPM mouse server
+                  (available at iride.unipv.it:/pub/gpm)
+                  (ftp.nuclecu.unam.mx:/linux/local)
 
-Copying-policy:	GPL
+Copying-policy: GPL
 
 End
diff -u --recursive mc-3.1/src/ChangeLog mc-3.1.2/src/ChangeLog
--- mc-3.1/src/ChangeLog	Mon Jan  8 22:36:24 1996
+++ mc-3.1.2/src/ChangeLog	Tue Jan  9 20:00:05 1996
@@ -1,3 +1,10 @@
+Tue Jan  9 11:47:47 1996  Miguel de Icaza  <miguel@sphinx.nuclecu.unam.mx>
+
+	* configure.in: Define USE_SETUPTERM only if the sample program
+	included in configure is compiled successfully.  This is required
+	because some systems have setupterm but are lacking the macros we
+	need. 
+
 Tue Jan  2 17:01:23 1996  Carl Thompson  <miguel@athena.nuclecu.unam.mx>
 
 	* subshell.c (init_subshell): Use the builtin $cwd variable and
diff -u --recursive mc-3.1/src/TODO mc-3.1.2/src/TODO
--- mc-3.1/src/TODO	Mon Jan  8 22:36:21 1996
+++ mc-3.1.2/src/TODO	Tue Jan  9 20:00:02 1996
@@ -4,16 +4,11 @@
 connecting its stderr to /dev/null (it doesn't use it, does it?).
 If you really want to, you can do it after exec().
 
-  - Merge Alessandro Rubini fixes.
+  - Document C-x C-r, C-x C-l, C-x C-s
 
   - Sort is wrong: ftp://tsx-11.mit.edu/pub/# files.
 
   - Check that all the help contexts exist on the help file.
-
-  - Document all the .ini variables 
-
-  - Remove all the blocking calls to sigchild, the sigchld is now
-    working.  
 
   - Make the buttonbar for the tree box work.
 
diff -u --recursive mc-3.1/src/subshell.c mc-3.1.2/src/subshell.c
--- mc-3.1/src/subshell.c	Mon Jan  8 22:36:17 1996
+++ mc-3.1.2/src/subshell.c	Tue Jan  9 19:59:59 1996
@@ -494,7 +494,7 @@
 	goto write_it;
 
 	case TCSH:
-	sprintf (precmd, "alias precmd 'echo $cmd>>%s;kill -STOP $$'\n", tcsh_fifo);
+	sprintf (precmd, "alias precmd 'echo $cwd>>%s;kill -STOP $$'\n", tcsh_fifo);
 
 	write_it:
 	write (subshell_pty, precmd, strlen (precmd));
