Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37404180
en ru br
Репозитории ALT
S:4.8.30-alt3
5.1: 4.8.11-alt0.M51.1
4.1: 4.6.2-alt7.pre1
4.0: 4.6.1r-alt9
3.0: 4.6.1r-alt3
www.altlinux.org/Changes

Группа :: Работа с файлами
Пакет: mc

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: mc-4.7.0-alt4.pre4.patch
Скачать


 .gear/rules                                        |    5 +
 .../tags/21453aadeeb84b1ef809f03382883195dfd28d1e  |   13 +
 .gear/tags/list                                    |    1 +
 alt-files/mc-16.png                                |  Bin 0 -> 548 bytes
 alt-files/mc-32.png                                |  Bin 0 -> 324 bytes
 alt-files/mc-dark.color                            |    4 +
 alt-files/mc-dnlike.color                          |    6 +
 alt-files/synce-mcfs/README                        |   61 +++
 alt-files/synce-mcfs/src/extfs.ini.add             |    4 +
 alt-files/synce-mcfs/src/synce                     |   88 ++++
 alt-files/synce-mcfs/src/synceroot                 |   89 ++++
 alt-patches/mc-4.7.0-alt-cflags.patch              |   13 +
 alt-patches/mc-4.7.0-alt-defaults.patch            |   13 +
 alt-patches/mc-4.7.0-alt-esc.patch                 |   20 +
 alt-patches/mc-4.7.0-alt-extfs-rpm-fix.patch       |  188 +++++++
 alt-patches/mc-4.7.0-alt-extfs-srpm-fix.patch      |  188 +++++++
 alt-patches/mc-4.7.0-alt-extfs-udar.patch          |  151 ++++++
 alt-patches/mc-4.7.0-alt-extfs-urar-fix.patch      |   14 +
 alt-patches/mc-4.7.0-alt-filetypes.patch           |  214 ++++++++
 alt-patches/mc-4.7.0-alt-forceexec.patch           |   67 +++
 alt-patches/mc-4.7.0-alt-menu.patch                |   52 ++
 alt-patches/mc-4.7.0-alt-po.patch                  |   22 +
 alt-patches/mc-4.7.0-alt-syntax-mak.patch          |   13 +
 alt-patches/mc-4.7.0-alt-wrapper.patch             |   20 +
 alt-patches/mc-4.7.0-debian-mc.ext-use-arj.patch   |   13 +
 alt-patches/mc-4.7.0-savannah-edit-homekey.patch   |   40 ++
 configure.ac                                       |    2 +-
 contrib/.gitignore                                 |    1 -
 edit/edit.c                                        |    7 +-
 m4.include/ac-get-fs-info.m4                       |    2 +-
 m4.include/mc-use-termcap.m4                       |    2 +-
 mc.spec                                            |  519 ++++++++++++++++++++
 misc/.gitignore                                    |    1 +
 misc/mc.ext.in                                     |   10 +
 misc/mc.keymap.default                             |    2 +-
 src/Makefile.am                                    |    2 +-
 src/args.c                                         |    2 +-
 src/dir.c                                          |   96 +++--
 src/dir.h                                          |   12 +-
 src/filehighlight/ini-file-read.c                  |    1 +
 src/info.c                                         |   37 +-
 src/mcconfig/common.c                              |    1 +
 src/panelize.c                                     |    2 +-
 src/screen.c                                       |   17 +-
 src/setup.c                                        |    4 +
 src/skin/ini-file.c                                |    1 +
 src/textconf.c                                     |    1 +
 src/timefmt.h                                      |   12 -
 src/tty/win.c                                      |    2 +-
 src/wtools.h                                       |   62 ++-
 syntax/Makefile.am                                 |   29 +-
 syntax/Syntax                                      |    3 +
 vfs/ftpfs.c                                        |   12 +-
 vfs/mcserv.c                                       |   40 +-
 vfs/samba/configure.ac                             |    2 +-
 vfs/samba/lib/time.c                               |    8 -
 vfs/undelfs.c                                      |   16 +-
 vfs/utilvfs.h                                      |    2 +
 vfs/vfs-impl.h                                     |    2 +
 59 files changed, 2048 insertions(+), 163 deletions(-)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..4379916
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,5 @@
+copy: alt-patches/*.patch
+copy: alt-files/*
+tar: 4.7.0-pre4:. name=mc-4.7.0
+tar: alt-files/synce-mcfs name=synce-mcfs
+diff: 4.7.0-pre4:. .
diff --git a/.gear/tags/21453aadeeb84b1ef809f03382883195dfd28d1e b/.gear/tags/21453aadeeb84b1ef809f03382883195dfd28d1e
new file mode 100644
index 0000000..0560698
--- /dev/null
+++ b/.gear/tags/21453aadeeb84b1ef809f03382883195dfd28d1e
@@ -0,0 +1,13 @@
+object a501ebd839395e092b853f16b6c6b54d6f1908ca
+type commit
+tag 4.7.0-pre4
+tagger Slava Zanko <slavazanko@gmail.com> 1256928642 +0200
+
+Last prerelease.
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iEYEABECAAYFAkrrNY4ACgkQb3oGR6aVLppA/wCeIxLv1dF4Rgl/gtguy6i7MfWG
+5VcAnRoe0URGfz1qcFybGUx/basXPR6F
+=wvPv
+-----END PGP SIGNATURE-----
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..20f803a
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+21453aadeeb84b1ef809f03382883195dfd28d1e 4.7.0-pre4
diff --git a/alt-files/mc-16.png b/alt-files/mc-16.png
new file mode 100644
index 0000000..39225c8
--- /dev/null
+++ b/alt-files/mc-16.png
@@ -0,0 +1,6 @@
+┴PNG
+
+
IHDRСЪagAMA╠▐ЭabKGDЫC╩	pHYsd_▒╢IDAT8к┘рOK■QгЯоСлu,3├я)Л	╔╣╟TWY▀═(б╥AшчOО║M╩ *▒ю(5┌А─P&р▄ё╘е8O▀╧⌠ЬГю┘sн≈sнОэ{В'&ч╨i+и@р═пЮW
+i╟ ▓╔ЪЁ4Mл©z▄▐w}zЭДауГ▌ж|x7bНр╟яЗ,≤ы1\·s}lфШИя6√3s1к┌:©W:╫²Рu∙EЗЬ:║╘`─┘/ГUk∙╔v√ЦзkA┐М║дБ┘Ём┌
+2╙ЩеfэEУnQ╣╖хо,#m9ЪNцН√ЛYK╗a'P█╛╩у i;iTрйoЮY[цG≤█Ч╧V┐*bAmг■БЧ┐QчcйМЩ╓ча°фv\║│^°┼q)РtАЧдДР╦┐▌XЭ0Фjm,▐u┌█xaгё╕oЯ╧.c[Я%Р╩╟б█б╨┘Л╘еЫ2╧╓╘╒ъё┌,X▌kТдRйсрц÷╩°╪r├R▌ую@═(
+│ею`h╡ч@OТШЫ°ПБЕт╓║нD╘/Ё┌cм╕'╝╢╪W.MtwOЧХ`┤°-█┴┌IEND╝B`┌
\ No newline at end of file
diff --git a/alt-files/mc-32.png b/alt-files/mc-32.png
new file mode 100644
index 0000000..592d901
--- /dev/null
+++ b/alt-files/mc-32.png
@@ -0,0 +1,3 @@
+┴PNG
+
+
IHDR  szzТgAMA╠▐ЭabKGDЪЪЪ═╫╖⌠	pHYsрщ~ЭtIMEс
!5≥·х▄аIDATx°МWA└ KvЬЪ≈╩'wзR╖ие≥▓@л@E ┬HнЙdi╛Ь┘╖у╒:╔ЦJ?)*г╙оХ:╜H┐еi╣Яоp╣┤qNю{│:]qj⌠╨Ё│хF╢x╜бы	Лж%pКXbЮ█	╓╥Бm`H7П?├яk╘ф▀h
нэ╔т Ь┼V╫■z_4╘·uщсtЯNхgT7фГВ─├зrХи┘
~©c≤Жwv,ъеьn°Gjdz#Jг╪оAtRРоIEND╝B`┌
\ No newline at end of file
diff --git a/alt-files/mc-dark.color b/alt-files/mc-dark.color
new file mode 100644
index 0000000..ab32807
--- /dev/null
+++ b/alt-files/mc-dark.color
@@ -0,0 +1,4 @@
+
+[Colors]
+base_color=normal=,black:marked=,black:directory=white,black:link=gray,black:device=,black:special=red,black:executable=green,black:viewunderline=,black:editor=yellow,black:editnormal=lightgray,black:viewnormal=white,black:hidden=gray,black:temp=gray,black:doc=brown,black:archive=brightmagenta,black:source=cyan,black:media=green,black:graph=brightcyan,black:database=brightred,black
+
diff --git a/alt-files/mc-dnlike.color b/alt-files/mc-dnlike.color
new file mode 100644
index 0000000..a12a9dc
--- /dev/null
+++ b/alt-files/mc-dnlike.color
@@ -0,0 +1,6 @@
+Add this to your ~/.mc/ini file for DN-like coloration:
+
+[Colors]
+base_color=normal=green,black:marked=,black:directory=white,black:link=gray,black:device=,black:special=red,black:executable=green,black:viewunderline=,black:editor=yellow,black:editnormal=lightgray,black:viewnormal=white,black
+
+Thanks to Peter V. Chernikoff
diff --git a/alt-files/synce-mcfs/README b/alt-files/synce-mcfs/README
new file mode 100644
index 0000000..23c0982
--- /dev/null
+++ b/alt-files/synce-mcfs/README
@@ -0,0 +1,61 @@
+SynCE-mcvf 0.1.1 by Michael Lashkevich, 10.06.2003
+
+
+       Midnight Commander virtual filesystem for SynCE
+
+
+INTRODUCTION
+
+The package "synce-mcvf" makes it possible to open the Windows CE
+filesystem of your Pocket PC as a Midnight Commander virtual filesystem,
+once you connected to your Pocket PC using SynCE.
+
+After installing this package you can use "cd #synce" or "cd #synceroot"
+to enter the filesystem of the Windows CE.
+
+cd #synce
+
+works faster and changes directory to "\My Documents".
+
+cd #synceroot
+
+starts much slower and enters the root directory ("\") of Windows CE.
+The last is intended for administrative use only.
+
+
+INSTALLATION
+
+Please, install SynCE package <http://synce.sourseforge.net/synce/> to
+make connection to your Pocket PC.
+
+Then follow the instructions:
+
+1. Enter your UNIX system as a root.
+
+2. Unpack the archive:
+
+tar zxvf synce-mcfs.tar.gz
+
+2. Change directory
+
+cd <prefix>/mc/extfs
+
+where <prefix> is tipically "/usr/share",  "/usr/lib",
+"/usr/local/share", or "/usr/local/lib".
+
+3. Copy the contents of the archive into this directory, e.g.:
+
+cp /root/synce-mcfs/src/* .
+
+4. Add the file "extfs.ini.add" to "extfs.ini" at the end:
+
+cat extfs.ini.add >> extfs.ini
+
+Installation is completed.
+
+
+BUG REPORTS
+
+Please, report all bugs to
+
+Michael Lashkevich <lashkevi@landau.ac.ru>
diff --git a/alt-files/synce-mcfs/src/extfs.ini.add b/alt-files/synce-mcfs/src/extfs.ini.add
new file mode 100644
index 0000000..3a8780f
--- /dev/null
+++ b/alt-files/synce-mcfs/src/extfs.ini.add
@@ -0,0 +1,4 @@
+
+# For SynCE UNIX <-> Windows CE Pocket PC communicator
+synce
+synceroot
diff --git a/alt-files/synce-mcfs/src/synce b/alt-files/synce-mcfs/src/synce
new file mode 100755
index 0000000..cb02ee0
--- /dev/null
+++ b/alt-files/synce-mcfs/src/synce
@@ -0,0 +1,88 @@
+#! /usr/bin/perl -w
+#
+# External filesystem for Windows CE, using SynCE, version 0.1.1,
+# by Michael Lashkevich <lashkevi@landau.ac.ru> on 10.06.2003
+#
+# Opens the "\My Documents" directory.
+# You have to establish SynCE connection before changin directory
+# to #synce
+# 
+
+# These mtools components must be in PATH for this to work
+$pls = "pls";
+$pcp = "pcp";
+$prm = "prm";
+$pmkdir = "pmkdir";
+$prmdir = "prmdir";
+
+SWITCH: for ( $ARGV[0] ) {
+  /list/ && do {
+    @dirs = get_dirs("");
+    while ($dir = shift(@dirs)) {
+      push @dirs, get_dirs("$dir");
+    } exit 0; };
+  /mkdir/ && do {
+    shift; shift;
+    exit 1 if scalar(@ARGV) != 1;
+    system("$pmkdir \"$ARGV[0]\" >/dev/null");
+    exit 0; };
+  /rmdir/ && do {
+    shift; shift;
+    exit 1 if scalar(@ARGV) != 1;
+    system("$prmdir \"$ARGV[0]\" >/dev/null");
+    exit 0; };
+  /rm/ && do {
+    shift; shift;
+    exit 1 if scalar(@ARGV) != 1;
+    system("$prm \"$ARGV[0]\" >/dev/null");
+    exit 0; };
+  /copyout/ && do {
+    shift; shift;
+    exit 1 if scalar(@ARGV) != 2;
+    ( $src, $dest ) = @ARGV;
+    system("$pcp \":My Documents/$src\" $dest >/dev/null");
+    exit 0; };
+  /copyin/ && do {
+    shift; shift;
+    exit 1 if scalar(@ARGV) != 2;
+    ( $dest, $src ) = @ARGV;
+    system("$pcp $src \":My Documents/$dest\" >/dev/null");
+    exit 0; };
+  /.*/ && do {                               # an unfamiliar command
+    exit 1; };
+}
+
+sub get_dirs {
+  my ($path, $name, $pathname, $type0, $type2, $size, $datetime, @lst, @rv);
+
+  $path = shift(@_);
+  @rv = ();
+
+  open(FILE,"$pls -a \"/My Documents/$path\" |");
+  while ( <FILE> ) {
+    chomp();
+    /^ / && next;                            # ignore `non-file' lines
+    /^$/ && next;                            # ignore empty lines
+    /^\.\.?/ && next;                        # ignore `.' and `..'
+
+    $name = substr($_,60);
+    $pathname = $path.$name;
+    $type0 = substr($_,0,1);
+    $type2 = substr($_,2,1);
+    $datetime = substr($_,28,6).substr($_,43,5).substr($_,34,9);
+    $size = substr($_,14,8);
+
+    if ($type0 =~ 'D' or $type2 =~ 'D') {
+      printf("drwxr-xr-x   1 %-8d %-8d %-8d %s %s\n",
+        0, 0, 0, $datetime, $pathname);
+      push @rv, $pathname;
+    } else {
+      printf("-rw-r--r--   1 %-8d %-8d %s %s %s\n",
+        0, 0, $size, $datetime, $pathname);
+    }
+  }
+  close(FILE);
+  return @rv;
+}
+
+1;
diff --git a/alt-files/synce-mcfs/src/synceroot b/alt-files/synce-mcfs/src/synceroot
new file mode 100755
index 0000000..7d4d576
--- /dev/null
+++ b/alt-files/synce-mcfs/src/synceroot
@@ -0,0 +1,89 @@
+#! /usr/bin/perl -w
+#
+# External filesystem for Windows CE, using SynCE, version 0.1.1,
+# by Michael Lashkevich <lashkevi@landau.ac.ru> on 10.06.2003
+#
+# In contrast to #synce it opens the root ("\") directory and, therefore,
+# 'cd #synceroot' works slower than 'cd #synce'.
+# You have to establish SynCE connection before changin directory
+# to #synceroot.
+# 
+
+# These mtools components must be in PATH for this to work
+$pls = "pls";
+$pcp = "pcp";
+$prm = "prm";
+$pmkdir = "pmkdir";
+$prmdir = "prmdir";
+
+SWITCH: for ( $ARGV[0] ) {
+  /list/ && do {
+    @dirs = get_dirs("");
+    while ($dir = shift(@dirs)) {
+      push @dirs, get_dirs("$dir");
+    } exit 0; };
+  /mkdir/ && do {
+    shift; shift;
+    exit 1 if scalar(@ARGV) != 1;
+    system("$pmkdir \"$ARGV[0]\" >/dev/null");
+    exit 0; };
+  /rmdir/ && do {
+    shift; shift;
+    exit 1 if scalar(@ARGV) != 1;
+    system("$prmdir \"$ARGV[0]\" >/dev/null");
+    exit 0; };
+  /rm/ && do {
+    shift; shift;
+    exit 1 if scalar(@ARGV) != 1;
+    system("$prm \"$ARGV[0]\" >/dev/null");
+    exit 0; };
+  /copyout/ && do {
+    shift; shift;
+    exit 1 if scalar(@ARGV) != 2;
+    ( $src, $dest ) = @ARGV;
+    system("$pcp \":/$src\" $dest >/dev/null");
+    exit 0; };
+  /copyin/ && do {
+    shift; shift;
+    exit 1 if scalar(@ARGV) != 2;
+    ( $dest, $src ) = @ARGV;
+    system("$pcp $src \":/$dest\" >/dev/null");
+    exit 0; };
+  /.*/ && do {                               # an unfamiliar command
+    exit 1; };
+}
+
+sub get_dirs {
+  my ($path, $name, $pathname, $type0, $type2, $size, $datetime, @lst, @rv);
+
+  $path = shift(@_);
+  @rv = ();
+
+  open(FILE,"$pls -a \"/$path\" |");
+  while ( <FILE> ) {
+    chomp();
+    /^ / && next;                            # ignore `non-file' lines
+    /^$/ && next;                            # ignore empty lines
+    /^\.\.?/ && next;                        # ignore `.' and `..'
+
+    $name = substr($_,60);
+    $pathname = $path.$name;
+    $type0 = substr($_,0,1);
+    $type2 = substr($_,2,1);
+    $datetime = substr($_,28,6).substr($_,43,5).substr($_,34,9);
+    $size = substr($_,14,8);
+
+    if ($type0 =~ 'D' or $type2 =~ 'D') {
+      printf("drwxr-xr-x   1 %-8d %-8d %-8d %s %s\n",
+        0, 0, 0, $datetime, $pathname);
+      push @rv, $pathname;
+    } else {
+      printf("-rw-r--r--   1 %-8d %-8d %s %s %s\n",
+        0, 0, $size, $datetime, $pathname);
+    }
+  }
+  close(FILE);
+  return @rv;
+}
+
+1;
diff --git a/alt-patches/mc-4.7.0-alt-cflags.patch b/alt-patches/mc-4.7.0-alt-cflags.patch
new file mode 100644
index 0000000..1c5a836
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-cflags.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 0f1f863..5e96b04 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -517,7 +517,7 @@ fi
+ 
+ MC_CHECK_CFLAGS
+ 
+-CFLAGS_OPTS=" -O2 "
++CFLAGS_OPTS=""
+ 
+ if test x$USE_MAINTAINER_MODE = xyes; then
+     CFLAGS_OPTS="-g3 -O -ggdb"
diff --git a/alt-patches/mc-4.7.0-alt-defaults.patch b/alt-patches/mc-4.7.0-alt-defaults.patch
new file mode 100644
index 0000000..87bc143
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-defaults.patch
@@ -0,0 +1,13 @@
+diff --git a/src/main.c b/src/main.c
+index 17a6eca..e026594 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -189,7 +189,7 @@ int fast_reload_w = 0;
+ int mouse_move_pages = 1;
+ 
+ /* If true: l&r arrows are used to chdir if the input line is empty */
+-int navigate_with_arrows = 0;
++int navigate_with_arrows = 1;
+ 
+ /* If true program softkeys (HP terminals only) on startup and after every
+    command ran in the subshell to the description found in the termcap/terminfo
diff --git a/alt-patches/mc-4.7.0-alt-esc.patch b/alt-patches/mc-4.7.0-alt-esc.patch
new file mode 100644
index 0000000..d875eb6
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-esc.patch
@@ -0,0 +1,20 @@
+--- mc/src/tty/key.c.orig	2009-10-03 14:38:59 +0600
++++ mc/src/tty/key.c	2009-10-03 14:48:23 +0600
+@@ -86,7 +86,7 @@ int alternate_plus_minus = 0;
+ 
+ int mou_auto_repeat = 100;
+ int double_click_speed = 250;
+-int old_esc_mode = 0;
++int old_esc_mode = 1;
+ int use_8th_bit_as_meta = 0;
+ 
+ /* This table is a mapping between names and the constants we use 
+@@ -482,7 +482,7 @@ static key_define_t qansi_key_defines[] 
+ };
+ 
+ /* timeout for old_esc_mode in usec */
+-static int keyboard_key_timeout = 1000000;      /* settable via env */
++static int keyboard_key_timeout = 25000;      /* settable via env */
+ 
+ /* This holds all the key definitions */
+ static key_def *keys = NULL;
diff --git a/alt-patches/mc-4.7.0-alt-extfs-rpm-fix.patch b/alt-patches/mc-4.7.0-alt-extfs-rpm-fix.patch
new file mode 100644
index 0000000..79d505d
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-extfs-rpm-fix.patch
@@ -0,0 +1,188 @@
+--- mc/vfs/extfs/rpm.orig	2009-10-02 21:21:29 +0600
++++ mc/vfs/extfs/rpm	2009-10-03 00:03:44 +0600
+@@ -25,10 +25,6 @@ else
+   RPM="rpm"
+ fi
+ RPM2CPIO="rpm2cpio"
+-SED="sed"
+-# Surround the whole filename with single quotes and handle specially
+-# \', ' and \ at the end of the string.
+-SEDCMD="s/\\(\\\\\\?\\)'/'\\1\\1\\\\''/g;s/\\\\\$/'\\\\\\\\'/;s/^/'/;s/\$/'/"
+ 
+ mcrpmfs_list ()
+ {
+@@ -38,13 +34,12 @@ mcrpmfs_list ()
+     if test -z "$MCFASTRPM"; then
+       MCFASTRPM=$MCFASTRPM_DFLT
+     fi
+-    f="`echo "$1" | $SED "$SEDCMD"`"
+     FILEPREF="-r--r--r--   1 root     root    "
+-    DESC=`$RPM -qip "$f" 2>/dev/null` || {
++    DESC=`$RPM -qip "$1" 2>/dev/null` || {
+ 	echo "$FILEPREF 0 "`date +"%b %d %H:%M"`" ERROR"
+ 	exit 1
+     }
+-    DATE=`$RPM -qp --qf "%{BUILDTIME:date}\n" "$f" | cut -c 5-11,21-24`
++    DATE=`$RPM -qp --qf "%{BUILDTIME:date}\n" "$1" | cut -c 5-11,21-24`
+     HEADERSIZE=`echo "$DESC" | wc -c`
+     echo "-r--r--r--   1 root     root  $HEADERSIZE $DATE HEADER"
+     echo "-r-xr-xr-x   1 root     root    39 $DATE INSTALL"
+@@ -55,25 +50,25 @@ mcrpmfs_list ()
+     echo "$FILEPREF 0 $DATE INFO/BUILDHOST"
+     echo "$FILEPREF 0 $DATE INFO/SOURCERPM"
+     if test "$MCFASTRPM" = 0 ; then
+-     test "`$RPM -qp --qf \"%{DISTRIBUTION}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{DISTRIBUTION}\" \"$1\"`" = "(none)" ||
+  	 echo "$FILEPREF 0 $DATE INFO/DISTRIBUTION"
+-     test "`$RPM -qp --qf \"%{VENDOR}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{VENDOR}\" \"$1\"`" = "(none)" ||
+ 	 echo "$FILEPREF 0 $DATE INFO/VENDOR"
+-     test "`$RPM -qp --qf \"%{DESCRIPTION}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{DESCRIPTION}\" \"$1\"`" = "(none)" ||
+          echo "$FILEPREF 0 $DATE INFO/DESCRIPTION"
+-     test "`$RPM -qp --qf \"%{SUMMARY}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{SUMMARY}\" \"$1\"`" = "(none)" ||
+          echo "$FILEPREF 0 $DATE INFO/SUMMARY"
+-     if test "`$RPM -qp --qf \"%{RPMTAG_PREIN}%{RPMTAG_POSTIN}%{RPMTAG_PREUN}%{RPMTAG_POSTUN}%{VERIFYSCRIPT}\" \"$f\"`" != "(none)(none)(none)(none)(none)"; then
++     if test "`$RPM -qp --qf \"%{RPMTAG_PREIN}%{RPMTAG_POSTIN}%{RPMTAG_PREUN}%{RPMTAG_POSTUN}%{VERIFYSCRIPT}\" \"$1\"`" != "(none)(none)(none)(none)(none)"; then
+ 	echo "dr-xr-xr-x   1 root     root     0 $DATE INFO/SCRIPTS"
+-	test "`$RPM -qp --qf \"%{RPMTAG_PREIN}\" \"$f\"`" = '(none)' ||
++	test "`$RPM -qp --qf \"%{RPMTAG_PREIN}\" \"$1\"`" = '(none)' ||
+ 	   echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREIN"
+-	test "`$RPM -qp --qf \"%{RPMTAG_POSTIN}\" \"$f\"`" = '(none)' ||
++	test "`$RPM -qp --qf \"%{RPMTAG_POSTIN}\" \"$1\"`" = '(none)' ||
+ 	   echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTIN"
+-	test "`$RPM -qp --qf \"%{RPMTAG_PREUN}\" \"$f\"`" = '(none)' ||
++	test "`$RPM -qp --qf \"%{RPMTAG_PREUN}\" \"$1\"`" = '(none)' ||
+ 	   echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREUN"
+-	test "`$RPM -qp --qf \"%{RPMTAG_POSTUN}\" \"$f\"`" = '(none)' ||
++	test "`$RPM -qp --qf \"%{RPMTAG_POSTUN}\" \"$1\"`" = '(none)' ||
+ 	   echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTUN"
+-	test "`$RPM -qp --qf \"%{VERIFYSCRIPT}\" \"$f\"`" = '(none)' ||
++	test "`$RPM -qp --qf \"%{VERIFYSCRIPT}\" \"$1\"`" = '(none)' ||
+ 	   echo "$FILEPREF 0 $DATE INFO/SCRIPTS/VERIFYSCRIPT"
+         echo "$FILEPREF 0 $DATE INFO/SCRIPTS/ALL"
+      fi
+@@ -91,13 +86,13 @@ mcrpmfs_list ()
+      echo "$FILEPREF 0 $DATE INFO/SCRIPTS/ALL"
+     fi
+     if test "$MCFASTRPM" = 0 ; then
+-     test "`$RPM -qp --qf \"%{PACKAGER}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{PACKAGER}\" \"$1\"`" = "(none)" ||
+ 	 echo "$FILEPREF 0 $DATE INFO/PACKAGER"
+-     test "`$RPM -qp --qf \"%{URL}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{URL}\" \"$1\"`" = "(none)" ||
+ 	 echo "$FILEPREF 0 $DATE INFO/URL"
+-     test "`$RPM -qp --qf \"%{EPOCH}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{EPOCH}\" \"$1\"`" = "(none)" ||
+ 	 echo "$FILEPREF 0 $DATE INFO/EPOCH"
+-     test "`$RPM -qp --qf \"%{LICENSE}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{LICENSE}\" \"$1\"`" = "(none)" ||
+ 	 echo "$FILEPREF 0 $DATE INFO/LICENSE"
+     else
+ 	 echo "$FILEPREF 0 $DATE INFO/PACKAGER"
+@@ -110,15 +105,15 @@ mcrpmfs_list ()
+     echo "$FILEPREF 0 $DATE INFO/OS"
+     echo "$FILEPREF 0 $DATE INFO/SIZE"
+     if test "$MCFASTRPM" != 0 ; then
+-    $RPM -qp --qf "[%{REQUIRENAME}\n]" "$f" | grep "(none)" > /dev/null ||
++    $RPM -qp --qf "[%{REQUIRENAME}\n]" "$1" | grep "(none)" > /dev/null ||
+ 	echo "$FILEPREF 0 $DATE INFO/REQUIRENAME"
+-    $RPM -qp --qf "[%{OBSOLETES}\n]" "$f" | grep "(none)" > /dev/null ||
++    $RPM -qp --qf "[%{OBSOLETES}\n]" "$1" | grep "(none)" > /dev/null ||
+ 	echo "$FILEPREF 0 $DATE INFO/OBSOLETES"
+-    $RPM -qp --qf "[%{PROVIDES}\n]" "$f" | grep "(none)" > /dev/null ||
++    $RPM -qp --qf "[%{PROVIDES}\n]" "$1" | grep "(none)" > /dev/null ||
+ 	echo "$FILEPREF 0 $DATE INFO/PROVIDES"
+-    $RPM -qp --qf "[%{CONFLICTS}\n]" "$f" | grep "(none)" > /dev/null ||
++    $RPM -qp --qf "[%{CONFLICTS}\n]" "$1" | grep "(none)" > /dev/null ||
+ 	echo "$FILEPREF 0 $DATE INFO/CONFLICTS"
+-    test "`$RPM -qp --qf \"%{CHANGELOGTEXT}\" \"$f\"`" = "(none)" ||
++    test "`$RPM -qp --qf \"%{CHANGELOGTEXT}\" \"$1\"`" = "(none)" ||
+        echo "$FILEPREF 0 $DATE INFO/CHANGELOG"
+     else 
+ 	echo "$FILEPREF 0 $DATE INFO/REQUIRENAME"
+@@ -133,40 +128,39 @@ mcrpmfs_list ()
+ 
+ mcrpmfs_copyout ()
+ {
+-    f="`echo "$1" | $SED "$SEDCMD"`"
+     case "$2" in
+-	HEADER) $RPM -qip "$f" > "$3"; exit 0;;
++	HEADER) $RPM -qip "$1" > "$3"; exit 0;;
+ 	INSTALL) echo "# Run this to install this RPM package" > "$3"; exit 0;;
+ 	UPGRADE) echo "# Run this to upgrade this RPM package" > "$3"; exit 0;;
+-	ERROR) $RPM -qip "$f" > /dev/null 2> "$3"; exit 0;;
+-	INFO/NAME-VERSION-RELEASE)	$RPM -qp --qf "%{NAME}-%{VERSION}-%{RELEASE}\n" "$f" > "$3"; exit 0;;
+-	INFO/RELEASE)		$RPM -qp --qf "%{RELEASE}\n" "$f" > "$3"; exit 0;;
+-	INFO/GROUP)		$RPM -qp --qf "%{GROUP}\n" "$f" > "$3"; exit 0;;
+-	INFO/DISTRIBUTION) 	$RPM -qp --qf "%{DISTRIBUTION}\n" "$f" > "$3"; exit 0;;
+-	INFO/VENDOR)		$RPM -qp --qf "%{VENDOR}\n" "$f" > "$3"; exit 0;;
+-	INFO/BUILDHOST)		$RPM -qp --qf "%{BUILDHOST}\n" "$f" > "$3"; exit 0;;
+-	INFO/SOURCERPM)		$RPM -qp --qf "%{SOURCERPM}\n" "$f" > "$3"; exit 0;;
+-	INFO/DESCRIPTION)	$RPM -qp --qf "%{DESCRIPTION}\n" "$f" > "$3"; exit 0;;
+-	INFO/PACKAGER)		$RPM -qp --qf "%{PACKAGER}\n" "$f" > "$3"; exit 0;;
+-	INFO/URL)		$RPM -qp --qf "%{URL}\n" "$f" >"$3"; exit 0;;
+-	INFO/BUILDTIME)		$RPM -qp --qf "%{BUILDTIME:date}\n" "$f" >"$3"; exit 0;;
+-	INFO/EPOCH)		$RPM -qp --qf "%{EPOCH}\n" "$f" >"$3"; exit 0;;
+-	INFO/LICENSE)		$RPM -qp --qf "%{LICENSE}\n" "$f" >"$3"; exit 0;;
+-	INFO/RPMVERSION)	$RPM -qp --qf "%{RPMVERSION}\n" "$f" >"$3"; exit 0;;
+-	INFO/REQUIRENAME)	$RPM -qp --qf "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" "$f" >"$3"; exit 0;;
+-	INFO/PROVIDES)		$RPM -qp --qf "[%{PROVIDES}\n]" "$f" >"$3"; exit 0;;
+-	INFO/SCRIPTS/PREIN)	$RPM -qp --qf "%{RPMTAG_PREIN}\n" "$f" >"$3"; exit 0;;
+-	INFO/SCRIPTS/POSTIN)	$RPM -qp --qf "%{RPMTAG_POSTIN}\n" "$f" >"$3"; exit 0;;
+-	INFO/SCRIPTS/PREUN)	$RPM -qp --qf "%{RPMTAG_PREUN}\n" "$f" >"$3"; exit 0;;
+-	INFO/SCRIPTS/POSTUN)	$RPM -qp --qf "%{RPMTAG_POSTUN}\n" "$f" >"$3"; exit 0;;
+-	INFO/SCRIPTS/VERIFYSCRIPT)	$RPM -qp --qf "%{VERIFYSCRIPT}\n" "$f" >"$3"; exit 0;;
+-	INFO/SCRIPTS/ALL)		$RPM -qp --scripts "$f" > "$3"; exit 0;;
+-	INFO/SUMMARY)		$RPM -qp --qf "%{SUMMARY}\n" "$f" > "$3"; exit 0;;
+-	INFO/OS)		$RPM -qp --qf "%{OS}\n" "$f" > "$3"; exit 0;;
+-	INFO/CHANGELOG)		$RPM -qp --qf "[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]\n" "$f" > "$3"; exit 0;;
+-	INFO/SIZE)		$RPM -qp --qf "%{SIZE} bytes\n" "$f" > "$3"; exit 0;;
+-	INFO/OBSOLETES)		$RPM -qp --qf "[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" "$f" > "$3"; exit 0;;
+-	INFO/CONFLICTS)		$RPM -qp --qf "[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]" "$f" >"$3"; exit 0;;
++	ERROR) $RPM -qip "$1" > /dev/null 2> "$3"; exit 0;;
++	INFO/NAME-VERSION-RELEASE)	$RPM -qp --qf "%{NAME}-%{VERSION}-%{RELEASE}\n" "$1" > "$3"; exit 0;;
++	INFO/RELEASE)		$RPM -qp --qf "%{RELEASE}\n" "$1" > "$3"; exit 0;;
++	INFO/GROUP)		$RPM -qp --qf "%{GROUP}\n" "$1" > "$3"; exit 0;;
++	INFO/DISTRIBUTION) 	$RPM -qp --qf "%{DISTRIBUTION}\n" "$1" > "$3"; exit 0;;
++	INFO/VENDOR)		$RPM -qp --qf "%{VENDOR}\n" "$1" > "$3"; exit 0;;
++	INFO/BUILDHOST)		$RPM -qp --qf "%{BUILDHOST}\n" "$1" > "$3"; exit 0;;
++	INFO/SOURCERPM)		$RPM -qp --qf "%{SOURCERPM}\n" "$1" > "$3"; exit 0;;
++	INFO/DESCRIPTION)	$RPM -qp --qf "%{DESCRIPTION}\n" "$1" > "$3"; exit 0;;
++	INFO/PACKAGER)		$RPM -qp --qf "%{PACKAGER}\n" "$1" > "$3"; exit 0;;
++	INFO/URL)		$RPM -qp --qf "%{URL}\n" "$1" >"$3"; exit 0;;
++	INFO/BUILDTIME)		$RPM -qp --qf "%{BUILDTIME:date}\n" "$1" >"$3"; exit 0;;
++	INFO/EPOCH)		$RPM -qp --qf "%{EPOCH}\n" "$1" >"$3"; exit 0;;
++	INFO/LICENSE)		$RPM -qp --qf "%{LICENSE}\n" "$1" >"$3"; exit 0;;
++	INFO/RPMVERSION)	$RPM -qp --qf "%{RPMVERSION}\n" "$1" >"$3"; exit 0;;
++	INFO/REQUIRENAME)	$RPM -qp --qf "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" "$1" >"$3"; exit 0;;
++	INFO/PROVIDES)		$RPM -qp --qf "[%{PROVIDES}\n]" "$1" >"$3"; exit 0;;
++	INFO/SCRIPTS/PREIN)	$RPM -qp --qf "%{RPMTAG_PREIN}\n" "$1" >"$3"; exit 0;;
++	INFO/SCRIPTS/POSTIN)	$RPM -qp --qf "%{RPMTAG_POSTIN}\n" "$1" >"$3"; exit 0;;
++	INFO/SCRIPTS/PREUN)	$RPM -qp --qf "%{RPMTAG_PREUN}\n" "$1" >"$3"; exit 0;;
++	INFO/SCRIPTS/POSTUN)	$RPM -qp --qf "%{RPMTAG_POSTUN}\n" "$1" >"$3"; exit 0;;
++	INFO/SCRIPTS/VERIFYSCRIPT)	$RPM -qp --qf "%{VERIFYSCRIPT}\n" "$1" >"$3"; exit 0;;
++	INFO/SCRIPTS/ALL)		$RPM -qp --scripts "$1" > "$3"; exit 0;;
++	INFO/SUMMARY)		$RPM -qp --qf "%{SUMMARY}\n" "$1" > "$3"; exit 0;;
++	INFO/OS)		$RPM -qp --qf "%{OS}\n" "$1" > "$3"; exit 0;;
++	INFO/CHANGELOG)		$RPM -qp --qf "[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]\n" "$1" > "$3"; exit 0;;
++	INFO/SIZE)		$RPM -qp --qf "%{SIZE} bytes\n" "$1" > "$3"; exit 0;;
++	INFO/OBSOLETES)		$RPM -qp --qf "[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" "$1" > "$3"; exit 0;;
++	INFO/CONFLICTS)		$RPM -qp --qf "[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]" "$1" >"$3"; exit 0;;
+ 	CONTENTS.cpio)		$RPM2CPIO "$1" > "$3"; exit 0;;
+ 	*)
+ 	    ;;
+@@ -175,10 +169,9 @@ mcrpmfs_copyout ()
+ 
+ mcrpmfs_run ()
+ {
+-    f="`echo "$1" | $SED "$SEDCMD"`"
+     case "$2" in
+-	INSTALL) echo "Installing \"\"$f\"\""; $RPM -ivh "$f"; exit 0;;
+-	UPGRADE) echo "Upgrading \"\"$f\"\""; $RPM -Uvh "$f"; exit 0;;
++	INSTALL) echo "Installing \"$1\""; $RPM -ivh "$1"; exit 0;;
++	UPGRADE) echo "Upgrading \"$1\""; $RPM -iUvh "$1"; exit 0;;
+     esac
+ }
+ 
diff --git a/alt-patches/mc-4.7.0-alt-extfs-srpm-fix.patch b/alt-patches/mc-4.7.0-alt-extfs-srpm-fix.patch
new file mode 100644
index 0000000..f1f3e4d
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-extfs-srpm-fix.patch
@@ -0,0 +1,188 @@
+diff --git a/vfs/extfs/srpm b/vfs/extfs/srpm
+index 168b5c0..1de5cb7 100644
+--- a/vfs/extfs/srpm
++++ b/vfs/extfs/srpm
+@@ -32,10 +32,6 @@ else
+   RPM="rpm"
+ fi
+ RPM2CPIO="rpm2cpio"
+-SED="sed"
+-# Surround the whole filename with single quotes and handle specially
+-# \', ' and \ at the end of the string.
+-SEDCMD="s/\\(\\\\\\?\\)'/'\\1\\1\\\\''/g;s/\\\\\$/'\\\\\\\\'/;s/^/'/;s/\$/'/"
+ 
+ mcrpmfs_list ()
+ {
+@@ -45,13 +41,12 @@ mcrpmfs_list ()
+     if test -z "$MCFASTRPM"; then
+       MCFASTRPM=$MCFASTRPM_DFLT
+     fi
+-    f="`echo "$1" | $SED "$SEDCMD"`"
+     FILEPREF="-r--r--r--   1 root     root    "
+-    DESC=`$RPM -qip "$f" 2>/dev/null` || {
++    DESC=`$RPM -qip "$1" 2>/dev/null` || {
+ 	echo "$FILEPREF 0 "`date +"%b %d %H:%M"`" ERROR"
+ 	exit 1
+     }
+-    DATE=`$RPM -qp --qf "%{BUILDTIME:date}\n" "$f" | cut -c 5-11,21-24`
++    DATE=`$RPM -qp --qf "%{BUILDTIME:date}\n" "$1" | cut -c 5-11,21-24`
+     HEADERSIZE=`echo "$DESC" | wc -c`
+     echo "-r--r--r--   1 root     root  $HEADERSIZE $DATE HEADER"
+     echo "-r-xr-xr-x   1 root     root    39 $DATE INSTALL"
+@@ -62,25 +57,25 @@ mcrpmfs_list ()
+     echo "$FILEPREF 0 $DATE INFO/BUILDHOST"
+     echo "$FILEPREF 0 $DATE INFO/SOURCERPM"
+     if test "$MCFASTRPM" = 0 ; then
+-     test "`$RPM -qp --qf \"%{DISTRIBUTION}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{DISTRIBUTION}\" \"$1\"`" = "(none)" ||
+  	 echo "$FILEPREF 0 $DATE INFO/DISTRIBUTION"
+-     test "`$RPM -qp --qf \"%{VENDOR}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{VENDOR}\" \"$1\"`" = "(none)" ||
+ 	 echo "$FILEPREF 0 $DATE INFO/VENDOR"
+-     test "`$RPM -qp --qf \"%{DESCRIPTION}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{DESCRIPTION}\" \"$1\"`" = "(none)" ||
+          echo "$FILEPREF 0 $DATE INFO/DESCRIPTION"
+-     test "`$RPM -qp --qf \"%{SUMMARY}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{SUMMARY}\" \"$1\"`" = "(none)" ||
+          echo "$FILEPREF 0 $DATE INFO/SUMMARY"
+-     if test "`$RPM -qp --qf \"%{RPMTAG_PREIN}%{RPMTAG_POSTIN}%{RPMTAG_PREUN}%{RPMTAG_POSTUN}%{VERIFYSCRIPT}\" \"$f\"`" != "(none)(none)(none)(none)(none)"; then
++     if test "`$RPM -qp --qf \"%{RPMTAG_PREIN}%{RPMTAG_POSTIN}%{RPMTAG_PREUN}%{RPMTAG_POSTUN}%{VERIFYSCRIPT}\" \"$1\"`" != "(none)(none)(none)(none)(none)"; then
+ 	echo "dr-xr-xr-x   1 root     root     0 $DATE INFO/SCRIPTS"
+-	test "`$RPM -qp --qf \"%{RPMTAG_PREIN}\" \"$f\"`" = '(none)' ||
++	test "`$RPM -qp --qf \"%{RPMTAG_PREIN}\" \"$1\"`" = '(none)' ||
+ 	   echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREIN"
+-	test "`$RPM -qp --qf \"%{RPMTAG_POSTIN}\" \"$f\"`" = '(none)' ||
++	test "`$RPM -qp --qf \"%{RPMTAG_POSTIN}\" \"$1\"`" = '(none)' ||
+ 	   echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTIN"
+-	test "`$RPM -qp --qf \"%{RPMTAG_PREUN}\" \"$f\"`" = '(none)' ||
++	test "`$RPM -qp --qf \"%{RPMTAG_PREUN}\" \"$1\"`" = '(none)' ||
+ 	   echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREUN"
+-	test "`$RPM -qp --qf \"%{RPMTAG_POSTUN}\" \"$f\"`" = '(none)' ||
++	test "`$RPM -qp --qf \"%{RPMTAG_POSTUN}\" \"$1\"`" = '(none)' ||
+ 	   echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTUN"
+-	test "`$RPM -qp --qf \"%{VERIFYSCRIPT}\" \"$f\"`" = '(none)' ||
++	test "`$RPM -qp --qf \"%{VERIFYSCRIPT}\" \"$1\"`" = '(none)' ||
+ 	   echo "$FILEPREF 0 $DATE INFO/SCRIPTS/VERIFYSCRIPT"
+         echo "$FILEPREF 0 $DATE INFO/SCRIPTS/ALL"
+      fi
+@@ -98,13 +93,13 @@ mcrpmfs_list ()
+      echo "$FILEPREF 0 $DATE INFO/SCRIPTS/ALL"
+     fi
+     if test "$MCFASTRPM" = 0 ; then
+-     test "`$RPM -qp --qf \"%{PACKAGER}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{PACKAGER}\" \"$1\"`" = "(none)" ||
+ 	 echo "$FILEPREF 0 $DATE INFO/PACKAGER"
+-     test "`$RPM -qp --qf \"%{URL}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{URL}\" \"$1\"`" = "(none)" ||
+ 	 echo "$FILEPREF 0 $DATE INFO/URL"
+-     test "`$RPM -qp --qf \"%{EPOCH}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{EPOCH}\" \"$1\"`" = "(none)" ||
+ 	 echo "$FILEPREF 0 $DATE INFO/EPOCH"
+-     test "`$RPM -qp --qf \"%{LICENSE}\" \"$f\"`" = "(none)" ||
++     test "`$RPM -qp --qf \"%{LICENSE}\" \"$1\"`" = "(none)" ||
+ 	 echo "$FILEPREF 0 $DATE INFO/LICENSE"
+     else
+ 	 echo "$FILEPREF 0 $DATE INFO/PACKAGER"
+@@ -117,15 +112,15 @@ mcrpmfs_list ()
+     echo "$FILEPREF 0 $DATE INFO/OS"
+     echo "$FILEPREF 0 $DATE INFO/SIZE"
+     if test "$MCFASTRPM" != 0 ; then
+-    $RPM -qp --qf "[%{REQUIRENAME}\n]" "$f" | grep "(none)" > /dev/null ||
++    $RPM -qp --qf "[%{REQUIRENAME}\n]" "$1" | grep "(none)" > /dev/null ||
+ 	echo "$FILEPREF 0 $DATE INFO/REQUIRENAME"
+-    $RPM -qp --qf "[%{OBSOLETES}\n]" "$f" | grep "(none)" > /dev/null ||
++    $RPM -qp --qf "[%{OBSOLETES}\n]" "$1" | grep "(none)" > /dev/null ||
+ 	echo "$FILEPREF 0 $DATE INFO/OBSOLETES"
+-    $RPM -qp --qf "[%{PROVIDES}\n]" "$f" | grep "(none)" > /dev/null ||
++    $RPM -qp --qf "[%{PROVIDES}\n]" "$1" | grep "(none)" > /dev/null ||
+ 	echo "$FILEPREF 0 $DATE INFO/PROVIDES"
+-    $RPM -qp --qf "[%{CONFLICTS}\n]" "$f" | grep "(none)" > /dev/null ||
++    $RPM -qp --qf "[%{CONFLICTS}\n]" "$1" | grep "(none)" > /dev/null ||
+ 	echo "$FILEPREF 0 $DATE INFO/CONFLICTS"
+-    test "`$RPM -qp --qf \"%{CHANGELOGTEXT}\" \"$f\"`" = "(none)" ||
++    test "`$RPM -qp --qf \"%{CHANGELOGTEXT}\" \"$1\"`" = "(none)" ||
+        echo "$FILEPREF 0 $DATE INFO/CHANGELOG"
+     else 
+ 	echo "$FILEPREF 0 $DATE INFO/REQUIRENAME"
+@@ -140,40 +135,39 @@ mcrpmfs_list ()
+ 
+ mcrpmfs_copyout ()
+ {
+-    f="`echo "$1" | $SED "$SEDCMD"`"
+     case "$2" in
+-	HEADER) $RPM -qip "$f" > "$3"; exit 0;;
++	HEADER) $RPM -qip "$1" > "$3"; exit 0;;
+ 	INSTALL) echo "# Run this to install this RPM package" > "$3"; exit 0;;
+ 	REBUILD) echo "# Run this to rebuild this RPM package" > "$3"; exit 0;;
+-	ERROR) $RPM -qip "$f" > /dev/null 2> "$3"; exit 0;;
+-	INFO/NAME-VERSION-RELEASE)	$RPM -qp --qf "%{NAME}-%{VERSION}-%{RELEASE}\n" "$f" > "$3"; exit 0;;
+-	INFO/RELEASE)		$RPM -qp --qf "%{RELEASE}\n" "$f" > "$3"; exit 0;;
+-	INFO/GROUP)		$RPM -qp --qf "%{GROUP}\n" "$f" > "$3"; exit 0;;
+-	INFO/DISTRIBUTION) 	$RPM -qp --qf "%{DISTRIBUTION}\n" "$f" > "$3"; exit 0;;
+-	INFO/VENDOR)		$RPM -qp --qf "%{VENDOR}\n" "$f" > "$3"; exit 0;;
+-	INFO/BUILDHOST)		$RPM -qp --qf "%{BUILDHOST}\n" "$f" > "$3"; exit 0;;
+-	INFO/SOURCERPM)		$RPM -qp --qf "%{SOURCERPM}\n" "$f" > "$3"; exit 0;;
+-	INFO/DESCRIPTION)	$RPM -qp --qf "%{DESCRIPTION}\n" "$f" > "$3"; exit 0;;
+-	INFO/PACKAGER)		$RPM -qp --qf "%{PACKAGER}\n" "$f" > "$3"; exit 0;;
+-	INFO/URL)		$RPM -qp --qf "%{URL}\n" "$f" >"$3"; exit 0;;
+-	INFO/BUILDTIME)		$RPM -qp --qf "%{BUILDTIME:date}\n" "$f" >"$3"; exit 0;;
+-	INFO/EPOCH)		$RPM -qp --qf "%{EPOCH}\n" "$f" >"$3"; exit 0;;
+-	INFO/LICENSE)		$RPM -qp --qf "%{LICENSE}\n" "$f" >"$3"; exit 0;;
+-	INFO/RPMVERSION)	$RPM -qp --qf "%{RPMVERSION}\n" "$f" >"$3"; exit 0;;
+-	INFO/REQUIRENAME)	$RPM -qp --qf "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" "$f" >"$3"; exit 0;;
+-	INFO/PROVIDES)		$RPM -qp --qf "[%{PROVIDES}\n]" "$f" >"$3"; exit 0;;
+-	INFO/SCRIPTS/PREIN)	$RPM -qp --qf "%{RPMTAG_PREIN}\n" "$f" >"$3"; exit 0;;
+-	INFO/SCRIPTS/POSTIN)	$RPM -qp --qf "%{RPMTAG_POSTIN}\n" "$f" >"$3"; exit 0;;
+-	INFO/SCRIPTS/PREUN)	$RPM -qp --qf "%{RPMTAG_PREUN}\n" "$f" >"$3"; exit 0;;
+-	INFO/SCRIPTS/POSTUN)	$RPM -qp --qf "%{RPMTAG_POSTUN}\n" "$f" >"$3"; exit 0;;
+-	INFO/SCRIPTS/VERIFYSCRIPT)	$RPM -qp --qf "%{VERIFYSCRIPT}\n" "$f" >"$3"; exit 0;;
+-	INFO/SCRIPTS/ALL)		$RPM -qp --scripts "$f" > "$3"; exit 0;;
+-	INFO/SUMMARY)		$RPM -qp --qf "%{SUMMARY}\n" "$f" > "$3"; exit 0;;
+-	INFO/OS)		$RPM -qp --qf "%{OS}\n" "$f" > "$3"; exit 0;;
+-	INFO/CHANGELOG)		$RPM -qp --qf "[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]\n" "$f" > "$3"; exit 0;;
+-	INFO/SIZE)		$RPM -qp --qf "%{SIZE} bytes\n" "$f" > "$3"; exit 0;;
+-	INFO/OBSOLETES)		$RPM -qp --qf "[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" "$f" > "$3"; exit 0;;
+-	INFO/CONFLICTS)		$RPM -qp --qf "[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]" "$f" >"$3"; exit 0;;
++	ERROR) $RPM -qip "$1" > /dev/null 2> "$3"; exit 0;;
++	INFO/NAME-VERSION-RELEASE)	$RPM -qp --qf "%{NAME}-%{VERSION}-%{RELEASE}\n" "$1" > "$3"; exit 0;;
++	INFO/RELEASE)		$RPM -qp --qf "%{RELEASE}\n" "$1" > "$3"; exit 0;;
++	INFO/GROUP)		$RPM -qp --qf "%{GROUP}\n" "$1" > "$3"; exit 0;;
++	INFO/DISTRIBUTION) 	$RPM -qp --qf "%{DISTRIBUTION}\n" "$1" > "$3"; exit 0;;
++	INFO/VENDOR)		$RPM -qp --qf "%{VENDOR}\n" "$1" > "$3"; exit 0;;
++	INFO/BUILDHOST)		$RPM -qp --qf "%{BUILDHOST}\n" "$1" > "$3"; exit 0;;
++	INFO/SOURCERPM)		$RPM -qp --qf "%{SOURCERPM}\n" "$1" > "$3"; exit 0;;
++	INFO/DESCRIPTION)	$RPM -qp --qf "%{DESCRIPTION}\n" "$1" > "$3"; exit 0;;
++	INFO/PACKAGER)		$RPM -qp --qf "%{PACKAGER}\n" "$1" > "$3"; exit 0;;
++	INFO/URL)		$RPM -qp --qf "%{URL}\n" "$1" >"$3"; exit 0;;
++	INFO/BUILDTIME)		$RPM -qp --qf "%{BUILDTIME:date}\n" "$1" >"$3"; exit 0;;
++	INFO/EPOCH)		$RPM -qp --qf "%{EPOCH}\n" "$1" >"$3"; exit 0;;
++	INFO/LICENSE)		$RPM -qp --qf "%{LICENSE}\n" "$1" >"$3"; exit 0;;
++	INFO/RPMVERSION)	$RPM -qp --qf "%{RPMVERSION}\n" "$1" >"$3"; exit 0;;
++	INFO/REQUIRENAME)	$RPM -qp --qf "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" "$1" >"$3"; exit 0;;
++	INFO/PROVIDES)		$RPM -qp --qf "[%{PROVIDES}\n]" "$1" >"$3"; exit 0;;
++	INFO/SCRIPTS/PREIN)	$RPM -qp --qf "%{RPMTAG_PREIN}\n" "$1" >"$3"; exit 0;;
++	INFO/SCRIPTS/POSTIN)	$RPM -qp --qf "%{RPMTAG_POSTIN}\n" "$1" >"$3"; exit 0;;
++	INFO/SCRIPTS/PREUN)	$RPM -qp --qf "%{RPMTAG_PREUN}\n" "$1" >"$3"; exit 0;;
++	INFO/SCRIPTS/POSTUN)	$RPM -qp --qf "%{RPMTAG_POSTUN}\n" "$1" >"$3"; exit 0;;
++	INFO/SCRIPTS/VERIFYSCRIPT)	$RPM -qp --qf "%{VERIFYSCRIPT}\n" "$1" >"$3"; exit 0;;
++	INFO/SCRIPTS/ALL)		$RPM -qp --scripts "$1" > "$3"; exit 0;;
++	INFO/SUMMARY)		$RPM -qp --qf "%{SUMMARY}\n" "$1" > "$3"; exit 0;;
++	INFO/OS)		$RPM -qp --qf "%{OS}\n" "$1" > "$3"; exit 0;;
++	INFO/CHANGELOG)		$RPM -qp --qf "[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]\n" "$1" > "$3"; exit 0;;
++	INFO/SIZE)		$RPM -qp --qf "%{SIZE} bytes\n" "$1" > "$3"; exit 0;;
++	INFO/OBSOLETES)		$RPM -qp --qf "[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" "$1" > "$3"; exit 0;;
++	INFO/CONFLICTS)		$RPM -qp --qf "[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]" "$1" >"$3"; exit 0;;
+ 	CONTENTS.cpio)		$RPM2CPIO "$1" > "$3"; exit 0;;
+ 	*)
+ 	    ;;
+@@ -182,9 +176,8 @@ mcrpmfs_copyout ()
+ 
+ mcrpmfs_run ()
+ {
+-    f="`echo "$1" | $SED "$SEDCMD"`"
+     case "$2" in
+-	INSTALL) echo "Installing \"\"$f\"\""; $RPM -ivh "$f"; exit 0;;
++	INSTALL) echo "Installing \"$1\""; $RPM -ivh "$1"; exit 0;;
+ 	REBUILD) echo "Rebuilding \"$1\""; $RPMBUILD --rebuild "$1"; exit 0;;
+     esac
+ }
diff --git a/alt-patches/mc-4.7.0-alt-extfs-udar.patch b/alt-patches/mc-4.7.0-alt-extfs-udar.patch
new file mode 100644
index 0000000..22f733a
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-extfs-udar.patch
@@ -0,0 +1,151 @@
+diff --git a/misc/mc.ext.in b/misc/mc.ext.in
+index 493e8c5..ec8df2a 100644
+--- a/misc/mc.ext.in
++++ b/misc/mc.ext.in
+@@ -628,6 +628,11 @@ regex/\.xz$
+ 	View=%view{ascii} xz -dc %f 2>/dev/null
+ 
+ 
++# dar
++regex/\.[0-9]*\.[Dd][Aa][Rr]$
++	Open=%cd %p#udar
++	View=%view{ascii} dar -l `echo %f | sed 's/\.[0-9]*\.[Dd][Aa][Rr]$//'` -N
++
+ ### Default ###
+ 
+ # Default target for anything not described above
+diff --git a/vfs/extfs/Makefile.am b/vfs/extfs/Makefile.am
+index 48253f3..663892f 100644
+--- a/vfs/extfs/Makefile.am
++++ b/vfs/extfs/Makefile.am
+@@ -6,7 +6,7 @@ EXTFSCONFFILES = extfs.ini sfs.ini
+ EXTFS_MISC  = README
+ 
+ # Scripts hat don't need adaptation to the local system
+-EXTFS_CONST = bpp rpm trpm srpm u7z ucab
++EXTFS_CONST = bpp rpm trpm srpm u7z ucab udar
+ 
+ # Scripts that need adaptation to the local system - source files
+ EXTFS_IN    = 			\
+diff --git a/vfs/extfs/extfs.ini b/vfs/extfs/extfs.ini
+index bfc6e91..8e54e46 100644
+--- a/vfs/extfs/extfs.ini
++++ b/vfs/extfs/extfs.ini
+@@ -60,3 +60,6 @@ bpp
+ 
+ # ISO image
+ iso9660
++
++# Disk archivers
++udar
+diff --git a/vfs/extfs/udar b/vfs/extfs/udar
+new file mode 100644
+index 0000000..3103f82
+--- /dev/null
++++ b/vfs/extfs/udar
+@@ -0,0 +1,105 @@
++#!/bin/sh
++
++# This is a parser for Dar archives in Midnight Commander. You need
++# the GPL dar program (version >= 2.3.0) written by Denis Corbin.
++
++# Author: Guus Jansman
++
++# Limitations:
++# - The archive file can not be changed
++# - Symbolic and hard links are not handled properly
++# - Block and character special files are not handled
++# - Files not stored in (differential) backups are not handled
++# - Dar files in archives are not handled (due filename restriction)
++
++DAR=dar
++
++# dar expects the basename (without number and extension)
++BASENAME="`echo "$2" | sed -e 's/\.[0-9]*\.[Dd][Aa][Rr]$//'`"
++
++mcdarfs_list ()
++{
++$DAR -l "$BASENAME" -N -Q -as 2>/dev/null | gawk -v uuid=${UID-0} '
++BEGIN { flag=0 }
++/^-------/ { flag++; if (flag > 1) exit 0; next }
++/^$/ { next }
++{
++    if (flag == 0) next
++    line=$0
++    split(line, record, " ")
++
++    # Do not display removed files
++    if (record[1] == "[" && record[2] == "REMOVED")
++    {
++        next
++    }
++
++    # We want "line" to start with permutation
++    # TODO: better algorithm
++    while (length(record[1]) != 10 || match(substr(record[1], 2, 1), "[r-]") == 0)
++    {
++        # line without real contents
++        if (length(line) == 0) {
++            next
++        }
++        line=substr(line, length(record[1])+1)
++        while (length(line) != 0 && substr(line, 1, 1) != " ")
++        {
++            line=substr(line, 2)
++        }
++        split(line, record, " ")
++    }
++
++    perm=record[1]
++    # Block and character special files not supported
++    # Change [bc] to [bcl] if symbolic links should not show up either
++    if (match(substr(perm, 1, 1), "[bc]") != 0)
++    {
++        next
++    }
++    uid=record[2]
++    if (match(uid, "^[0-9]*$") != 0)
++    {
++        uid=sprintf("%-8d", uid)
++    }
++    gid=record[3]
++    if (match(gid, "^[0-9]*$") != 0)
++    {
++        gid=sprintf("%-8d", gid)
++    }
++    size=record[4]
++    month=record[6]
++    day=record[7]
++    tm=substr(record[8], 1, 5)
++    year=record[9]
++    name=substr(line, index(line, sprintf("%s:", tm))+14)
++    # TODO: find symbolic link target (probably the link has to be extracted)
++    printf "%s    1 %s %s %8d %3s %02d %04d %s %s\n", perm, uid, gid, size, month, day, year, tm, name
++}'
++}
++
++mcdarfs_copyout ()
++{
++    # Dummy directory necessary since dar cannot output to stdout or named file
++    mkdir "$3.dir.tmp"
++    chmod 700 "$3.dir.tmp"
++    if [ ! -d "$3.dir.tmp" ]; then exit 1; fi
++    $DAR -x "$BASENAME" -N -O -Q -wa -g "$2" -R "$3.dir.tmp" >/dev/null 2>&1
++    if [ -e "$3.dir.tmp/$2" ]; then
++        mv "$3.dir.tmp/$2" "$3"
++        rm -rf "$3.dir.tmp"
++    else
++        rm -rf "$3.dir.tmp"
++        exit 1
++    fi
++}
++
++umask 077
++cmd="$1"
++shift
++case "$cmd" in
++    list)    mcdarfs_list    "$@" ;;
++    copyout) mcdarfs_copyout "$@" ;;
++    *)       exit 1 ;;
++esac
++exit 0
diff --git a/alt-patches/mc-4.7.0-alt-extfs-urar-fix.patch b/alt-patches/mc-4.7.0-alt-extfs-urar-fix.patch
new file mode 100644
index 0000000..9c19d4e
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-extfs-urar-fix.patch
@@ -0,0 +1,14 @@
+diff --git a/vfs/extfs/urar.in b/vfs/extfs/urar.in
+index 6d29cd0..45491d8 100644
+--- a/vfs/extfs/urar.in
++++ b/vfs/extfs/urar.in
+@@ -93,9 +93,6 @@ mcrarfs_rm ()
+     $RAR d "$1" "$2" >/dev/null
+ }
+ 
+-LC_ALL=C
+-export LC_ALL
+-
+ umask 077
+ 
+ cmd="$1"
diff --git a/alt-patches/mc-4.7.0-alt-filetypes.patch b/alt-patches/mc-4.7.0-alt-filetypes.patch
new file mode 100644
index 0000000..d33bf6c
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-filetypes.patch
@@ -0,0 +1,214 @@
+diff --git a/misc/mc.ext.in b/misc/mc.ext.in
+index 707bff4..bdf8639 100644
+--- a/misc/mc.ext.in
++++ b/misc/mc.ext.in
+@@ -111,6 +111,11 @@ regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$
+ 	Open=%cd %p#utar
+ 	View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
+ 
++# .war
++regex/\.war$
++	Open=%cd %p#utar
++	View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
++
+ regex/\.tar\.bz$
+ 	# Open=%cd %p#utar
+ 	View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf -
+@@ -167,7 +172,7 @@ regex/\.([Hh][Aa])$
+ # rar
+ regex/\.[rR]([aA][rR]|[0-9][0-9])$
+ 	Open=%cd %p#urar
+-	View=%view{ascii} rar v -c- %f
++	View=%view{ascii} unrar l -v -c- %f
+ 
+ # ALZip
+ regex/\.(alz|ALZ)$
+@@ -246,10 +251,10 @@ regex/\.iso$
+ # 7zip archives (they are not man pages)
+ regex/\.(7z|7Z)$
+ 	Open=%cd %p#u7z
+-	View=%view{ascii} 7za l %f 2>/dev/null
++	View=%view{ascii} 7z l %f 2>/dev/null
+ 
+ # Mailboxes
+-type/^ASCII\ mail\ text
++type/mail\ text
+ 	Open=%cd %p#mailfs
+ 
+ 
+@@ -257,15 +262,15 @@ type/^ASCII\ mail\ text
+ 
+ # C
+ shell/.c
+-	Open=%var{EDITOR:vi} %f
++	Include=editor
+ 
+ # Fortran
+ shell/.f
+-	Open=%var{EDITOR:vi} %f
++	Include=editor
+ 
+ # Header
+ regex/\.(h|hpp)$
+-	Open=%var{EDITOR:vi} %f
++	Include=editor
+ 
+ # Object
+ type/^ELF
+@@ -273,11 +278,14 @@ type/^ELF
+ 	View=%view{ascii} file %f && nm %f
+ 
+ # Asm
+-shell/.s
+-	Open=%var{EDITOR:vi} %f
++regex/\.([Ss]|[Aa]sm|ASM)$
++	Include=editor
+ 
+ # C++
+ regex/\.(C|cc|cpp)$
++	Include=editor
++
++include/editor
+ 	Open=%var{EDITOR:vi} %f
+ 
+ 
+@@ -297,6 +305,9 @@ shell/.info
+ # Exception - .so libraries are not manual pages
+ regex/\.(so|so\.[0-9\.]*)$
+ 	View=%view{ascii} file %f && nm %f
++# Exception - .3gp are video files
++regex/\.(3[gG][pP])$
++	Include=video
+ 
+ regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
+ 	Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
+@@ -377,11 +388,17 @@ type/^PPM
+ type/^Netpbm
+ 	Include=image
+ 
++type/^JNG
++	Include=image
++
++type/^MNG
++	Include=image
++
+ shell/.xcf
+ 	Open=(gimp %f &)
+ 
+ shell/.xbm
+-	Open=bitmap %f
++	Include=image
+ 
+ shell/.xpm
+ 	Include=image
+@@ -391,7 +408,7 @@ shell/.ico
+ 	Include=image
+ 
+ include/image
+-	Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
++	Open=if [ "$DISPLAY" = "" ]; then fbv %f; else (gqview %f &); fi
+ 	View=%view{ascii} identify %f
+ 	#View=%view{ascii} asciiview %f
+ 
+@@ -447,6 +464,9 @@ regex/\.([dD][iI][vV][xX])$
+ regex/\.([mM][kK][vV])$
+ 	Include=video
+ 
++regex/\.([mM][kK][vV])$
++	Include=video
++
+ regex/\.([mM][oO][vV]|[qQ][tT])$
+ 	Include=video
+ 
+@@ -466,10 +486,11 @@ regex/\.([oO][gG][mM])$
+ 	Include=video
+ 
+ regex/\.([rR][aA]?[mM])$
+-	Open=(realplay %f >/dev/null 2>&1 &)
++	Include=video
+ 
+ include/video
+-	Open=(mplayer %f >/dev/null 2>&1 &)
++	Open=if which mplayer >/dev/null 2>&1; then (mplayer %f >/dev/null 2>&1 &); else (xine --no-splash -ph %f >/dev/null 2>&1 &); fi
++	View=%view{ascii} mplayer -identify -vo null -ao null -frames 0 %f 2>&1 | sed -n '/^ID_/p'
+ 	#Open=(gtv %f >/dev/null 2>&1 &)
+ 	#Open=(xanim %f >/dev/null 2>&1 &)
+ 
+@@ -493,7 +514,7 @@ type/^PDF
+ 
+ # html
+ regex/\.([hH][tT][mM][lL]?)$
+-	Open=(if test -n "@X11_WWW@" && test -n "$DISPLAY"; then (@X11_WWW@ file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
++	Open=if test -n "$BROWSER" && test -n "$DISPLAY"; then ($BROWSER file://%d/%p &) >/dev/null 2>&1; else links %f 2>/dev/null || lynx -force_html %f || ${PAGER:-more} %f; fi
+ 	View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
+ 
+ # StarOffice 5.2
+@@ -511,28 +532,33 @@ shell/.abw
+ 
+ # Microsoft Word Document
+ regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
+-	Open=(abiword %f >/dev/null 2>&1 &)
++	Open=(ooffice %f &)
+ 	View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
+ type/^Microsoft\ Word
+-	Open=(abiword %f >/dev/null 2>&1 &)
++	Open=(ooffice %f &)
+ 	View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
+ 
+ # RTF document
+ regex/\.([rR][tT][fF])$
+-	Open=(abiword %f >/dev/null 2>&1 &)
++	Open=(ooffice %f &)
++	View=%view{ascii} catdoc -w %f
+ 
+ # Microsoft Excel Worksheet
+ regex/\.([xX][lL][sSwW])$
+-	Open=(gnumeric %f >/dev/null 2>&1 &)
++	Open=(ooffice %f &)
+ 	View=%view{ascii} xls2csv %f || strings %f
+ type/^Microsoft\ Excel
+-	Open=(gnumeric %f >/dev/null 2>&1 &)
++	Open=(ooffice %f &)
+ 	View=%view{ascii} xls2csv %f || strings %f
+ 
+ # Use OpenOffice.org to open any MS Office documents
+ type/^Microsoft\ Office\ Document
+ 	Open=(ooffice %f &)
+ 
++# gnumeric
++regex/\.(gnumeric)$
++	Open=gnumeric %f
++
+ # Framemaker
+ type/^FrameMaker
+ 	Open=fmclient -f %f
+@@ -648,6 +674,29 @@ regex/\.xz$
+ 	Open=xz -dc %f | %var{PAGER:more}
+ 	View=%view{ascii} xz -dc %f 2>/dev/null
+ 
++### ALT additions ###
++
++# lyx
++regex/\.(lyx|LYX)$
++	Open=lyx %f
++	View=%view{ascii} lyxcat %f
++
++# svg
++regex/\.(svg|SVG)$
++	Open=sodipodi %f
++	View=display %f
++
++# Gettext Catalogs
++shell/.mo
++	View=%view{ascii} msgunfmt %f || cat %f
++
++# CHM
++regex/\.(chm|CHM)$
++	Open=which kchmviewer > /dev/null 2>&1 && (kchmviewer %f &) || (xchm %f &)
++
++# DjVu
++regex/\.(djvu|DJVU)$
++	Open=djview %f &
+ 
+ ### Default ###
+ 
diff --git a/alt-patches/mc-4.7.0-alt-forceexec.patch b/alt-patches/mc-4.7.0-alt-forceexec.patch
new file mode 100644
index 0000000..0fa2a23
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-forceexec.patch
@@ -0,0 +1,67 @@
+--- mc/po/ru.po.orig	2009-10-02 21:21:29 +0600
++++ mc/po/ru.po	2009-10-03 13:36:10 +0600
+@@ -226,6 +226,9 @@ msgstr "&п≈п╟п╪п╣п╫п╦я┌я▄"
+ msgid " Replace "
+ msgstr " п≈п╟п╪п╣п╫п╦я┌я▄ "
+ 
++msgid "Force subshell execution"
++msgstr "п÷я─п╦п╫я┐п╢п╦я┌п╣п╩я▄п╫п╬п╣ п╡я▀п©п╬п╩п╫п╣п╫п╦п╣ п╡п╬ п╡я│я┌я─п╬п╣п╫п╫п╬п╧ п╨п╬п╪п╟п╫п╢п╫п╬п╧ п╬п╠п╬п╩п╬я┤п╨п╣"
++
+ #, c-format
+ msgid " %ld replacements made. "
+ msgstr " п·я│я┐я┴п╣я│я┌п╡п╩п╣п╫п╬ п©п╬п╢я│я┌п╟п╫п╬п╡п╬п╨: %ld "
+--- mc/src/args.c.orig	2009-10-03 13:38:53 +0600
++++ mc/src/args.c	2009-10-03 13:58:10 +0600
+@@ -38,6 +38,7 @@
+ 
+ extern int reset_hp_softkeys;
+ extern int use_subshell;
++extern int force_subshell_execution;
+ 
+ extern char *mc_home;
+ extern char *mc_home_alt;
+@@ -135,6 +136,13 @@ static const GOptionEntry argument_main_
+      N_("Disables subshell support"),
+      NULL
+     },
++
++    {
++     "forceexec", 'r', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE,
++     &force_subshell_execution,
++     N_("Force subshell execution"),
++     NULL
++    },
+ #endif
+ 
+     /* debug options */
+--- mc/src/execute.c.orig	2009-10-02 21:21:29 +0600
++++ mc/src/execute.c	2009-10-03 13:36:11 +0600
+@@ -41,6 +41,7 @@
+ #include "execute.h"
+ #include "../vfs/vfs.h"
+ 
++int force_subshell_execution = 0;
+ 
+ static void
+ edition_post_exec (void)
+@@ -209,7 +210,7 @@ shell_execute (const char *command, int 
+ 
+ #ifdef HAVE_SUBSHELL_SUPPORT
+     if (use_subshell)
+-	if (subshell_state == INACTIVE)
++	if (subshell_state == INACTIVE || force_subshell_execution)
+ 	    do_execute (shell, cmd ? cmd : command, flags | EXECUTE_AS_SHELL);
+ 	else
+ 	    message (D_ERROR, MSG_ERROR,
+--- mc/src/execute.h.orig	2009-10-02 21:21:29 +0600
++++ mc/src/execute.h	2009-10-03 13:36:11 +0600
+@@ -11,6 +11,9 @@
+ #define EXECUTE_AS_SHELL	(1 << 2)
+ #define EXECUTE_HIDE		(1 << 3)
+ 
++/* If true message "The shell is already running a command" never */
++extern int force_subshell_execution;
++
+ /* Execute functions that use the shell to execute */
+ void shell_execute (const char *command, int flags);
+ 
diff --git a/alt-patches/mc-4.7.0-alt-menu.patch b/alt-patches/mc-4.7.0-alt-menu.patch
new file mode 100644
index 0000000..b8f9f11
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-menu.patch
@@ -0,0 +1,52 @@
+diff --git a/misc/mc.menu b/misc/mc.menu
+index 0cdcee4..dae4b5f 100644
+--- a/misc/mc.menu
++++ b/misc/mc.menu
+@@ -257,7 +257,7 @@ y       Gzip or gunzip current file
+ 	    *.gz) DECOMP=-d;;
+ 	    *.[zZ]) DECOMP=-d;;
+ 	esac
+-        gzip $DECOMP -v %f
++        gzip -9 $DECOMP -v %f
+ 
+ + t t
+ Y       Gzip or gunzip tagged files
+@@ -268,7 +268,7 @@ Y       Gzip or gunzip tagged files
+ 	    *.gz) DECOMP=-d;;
+ 	    *.[zZ]) DECOMP=-d;;
+ 	  esac
+-          gzip $DECOMP -v $i
++          gzip -9 $DECOMP -v $i
+         done
+ 
+ + ! t t
+@@ -303,7 +303,7 @@ z       Extract compressed tar file to subdirectory
+ 	  *.tar.bz2) D="`basename %f .tar.bz2`"; set bunzip2 -c ;;
+ 	  *.tar.F) D="`basename %f .tar.F`"; set freeze -dc;
+ 	esac
+-	mkdir $D; cd $D && ($1 $2 ../%f | tar xvf -)
++	mkdir "$D"; cd "$D" && ($1 $2 ../%f | tar xvf -)
+ 
+ + t t
+ Z       Extract compressed tar files to subdirectories
+@@ -320,7 +320,7 @@ Z       Extract compressed tar files to subdirectories
+ 	    *.tar.F)   D="`basename $i .tar.F`"; set freeze -dc;;
+ 	    *.tar.bz2) D="`basename $i .tar.bz2`"; set bunzip2 -c;;
+           esac
+-	  mkdir $D; (cd $D && $1 $2 ../$i | tar xvf -)
++	  mkdir "$D"; (cd "$D" && $1 $2 ../$i | tar xvf -)
+         done
+ 
+ + f \.gz$ | f \.tgz$ | f \.tpz$ | f \.Z$ | f \.z$ | f \.bz2$ & t r & ! t t
+@@ -341,9 +341,9 @@ c       Convert gz<->bz2, tar.gz<->tar.bz2 & tgz->tar.bz2
+ 	  bz2)		D="`basename %f .bz2`";;
+         esac
+         if [ "$EXT" = "bz2" ]; then
+-	    bunzip2 -v %f ; gzip -f9 -v $D
++	    bunzip2 -v %f ; gzip -f9 -v "$D"
+ 	else
+-	    gunzip -v %f ; bzip2 -v $D
++	    gunzip -v %f ; bzip2 -v "$D"
+ 	fi
+ 
+ + t t
diff --git a/alt-patches/mc-4.7.0-alt-po.patch b/alt-patches/mc-4.7.0-alt-po.patch
new file mode 100644
index 0000000..b0b1ce9
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-po.patch
@@ -0,0 +1,22 @@
+diff --git a/po/ru.po b/po/ru.po
+index e3ee718..f59f7b5 100644
+--- a/po/ru.po
++++ b/po/ru.po
+@@ -1866,7 +1866,7 @@ msgid ""
+ msgstr ""
+ "\n"
+ "   п п╟я┌п╟п╩п╬пЁ п╫п╣ п©я┐я│я┌.    \n"
+-"   пёп╢п╟п╩п╦я┌я▄ я─п╣п╨я┐я─я│п╦п╡п╫п╬? "
++"   пёп╢п╟п╩п╦я┌я▄ п╡п╩п╬п╤п╣п╫п╫я▀п╣ п╨п╟я┌п╟п╩п╬пЁп╦? "
+ 
+ msgid ""
+ "\n"
+@@ -1875,7 +1875,7 @@ msgid ""
+ msgstr ""
+ "\n"
+ "   п╓п╬п╫п╬п╡я▀п╧ п©я─п╬я├п╣я│я│: п╨п╟я┌п╟п╩п╬пЁ п╫п╣ п©я┐я│я┌ \n"
+-"   пёп╢п╟п╩п╦я┌я▄ я─п╣п╨я┐я─я│п╦п╡п╫п╬? "
++"   пёп╢п╟п╩п╦я┌я▄ п╡п╩п╬п╤п╣п╫п╫я▀п╣ п╨п╟я┌п╟п╩п╬пЁп╦? "
+ 
+ msgid " Delete: "
+ msgstr " пёп╢п╟п╩п╦я┌я▄: "
diff --git a/alt-patches/mc-4.7.0-alt-syntax-mak.patch b/alt-patches/mc-4.7.0-alt-syntax-mak.patch
new file mode 100644
index 0000000..677931e
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-syntax-mak.patch
@@ -0,0 +1,13 @@
+diff --git a/syntax/Syntax b/syntax/Syntax
+index 2b5b0d1..f078bc6 100644
+--- a/syntax/Syntax
++++ b/syntax/Syntax
+@@ -55,7 +55,7 @@ include html.syntax
+ file ..\*\\.(xml|XML|xsd|XSD|xslt?|XSLT?|dtd|DTD|qpg|qpg.in)$ XML\sdocument (\\?xml\sversion|!DOCTYPE\s)
+ include xml.syntax
+ 
+-file (.\*[Mm]akefile[\\\.A-Za-z0-9]\*|..\*\\.mk|Kbuild)$ Makefile
++file (.\*[Mm]akefile[\\\.A-Za-z0-9]\*|..\*\\.mk|..\*\\.mak|Kbuild)$ Makefile
+ include makefile.syntax
+ 
+ file ..\*\\.(pp|PP|pas|PAS|dpr|DPR|inc|INC)$ Pascal\sProgram
diff --git a/alt-patches/mc-4.7.0-alt-wrapper.patch b/alt-patches/mc-4.7.0-alt-wrapper.patch
new file mode 100644
index 0000000..559eb3e
--- /dev/null
+++ b/alt-patches/mc-4.7.0-alt-wrapper.patch
@@ -0,0 +1,20 @@
+diff --git a/contrib/mc-wrapper.sh.in b/contrib/mc-wrapper.sh.in
+index 8badfb8..8da9412 100644
+--- a/contrib/mc-wrapper.sh.in
++++ b/contrib/mc-wrapper.sh.in
+@@ -1,6 +1,8 @@
+ MC_USER=`id | sed 's/[^(]*(//;s/).*//'`
+-MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$"
+-@bindir@/mc -P "$MC_PWD_FILE" "$@"
++[ ! -d ${TMPDIR-/tmp}/mc-$MC_USER ] && mkdir -p ${TMPDIR-/tmp}/mc-$MC_USER
++if MC_PWD_FILE=`mktemp ${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.XXXXXXXXXX`; then
++rm -f "$MC_PWD_FILE"
++@bindir@/mc -r -P "$MC_PWD_FILE" "$@"
+ 
+ if test -r "$MC_PWD_FILE"; then
+ 	MC_PWD="`cat "$MC_PWD_FILE"`"
+@@ -12,3 +14,4 @@ fi
+ 
+ rm -f "$MC_PWD_FILE"
+ unset MC_PWD_FILE
++fi
diff --git a/alt-patches/mc-4.7.0-debian-mc.ext-use-arj.patch b/alt-patches/mc-4.7.0-debian-mc.ext-use-arj.patch
new file mode 100644
index 0000000..ebd5736
--- /dev/null
+++ b/alt-patches/mc-4.7.0-debian-mc.ext-use-arj.patch
@@ -0,0 +1,13 @@
+diff --git a/misc/mc.ext.in b/misc/mc.ext.in
+index 6396bdf..9d74f57 100644
+--- a/misc/mc.ext.in
++++ b/misc/mc.ext.in
+@@ -142,7 +142,7 @@ type/^LHa\ .*archive
+ # arj
+ regex/\.a(rj|[0-9][0-9])$
+ 	Open=%cd %p#uarj
+-	View=%view{ascii} unarj l %f
++	View=%view{ascii} arj l %f
+ 
+ # ha
+ regex/\.([Hh][Aa])$
diff --git a/alt-patches/mc-4.7.0-savannah-edit-homekey.patch b/alt-patches/mc-4.7.0-savannah-edit-homekey.patch
new file mode 100644
index 0000000..2730ee1
--- /dev/null
+++ b/alt-patches/mc-4.7.0-savannah-edit-homekey.patch
@@ -0,0 +1,40 @@
+diff --git a/edit/edit.c b/edit/edit.c
+index d365ea5..d0cd9d3 100644
+--- a/edit/edit.c
++++ b/edit/edit.c
+@@ -1520,6 +1520,26 @@ long edit_bol (WEdit * edit, long current)
+     return current;
+ }
+ 
++/* returns index of first char on line or the first nonspace char */
++long edit_bol_var (WEdit * edit, long current)
++{
++    long tmp;
++    int b;
++    
++    if (current < 0)
++	return 0;
++	
++    if (edit_get_byte (edit, current - 1) != '\n')	/* not at BOL */
++	return edit_bol (edit, current);
++
++    if (edit_get_byte (edit, current) == '\n')		/* on an empty line */
++	return current;
++
++    for (tmp = current; (b = edit_get_byte (edit, tmp)) != '\n'; tmp++)
++	if (b != ' ' && b != '\t')
++	    return tmp;
++    return current;
++}
+ 
+ int edit_count_lines (WEdit * edit, long current, int upto)
+ {
+@@ -1961,7 +1981,7 @@ static void edit_move_to_bottom (WEdit * edit)
+ /* goto beginning of line */
+ static void edit_cursor_to_bol (WEdit * edit)
+ {
+-    edit_cursor_move (edit, edit_bol (edit, edit->curs1) - edit->curs1);
++    edit_cursor_move (edit, edit_bol_var (edit, edit->curs1) - edit->curs1);
+     edit->search_start = edit->curs1;
+     edit->prev_col = edit_get_col (edit);
+     edit->over_col = 0;
diff --git a/configure.ac b/configure.ac
index 0f1f863..d1f6ae5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -166,7 +166,7 @@ AC_CHECK_FUNCS([\
 	initgroups isascii \
 	memcpy memset \
 	putenv \
-	setreuid setuid statfs strerror strftime sysconf \
+	setreuid setuid statfs strerror sysconf \
 	tcgetattr tcsetattr truncate \
 ])
 
diff --git a/contrib/.gitignore b/contrib/.gitignore
index fa4c631..bf2c44a 100644
--- a/contrib/.gitignore
+++ b/contrib/.gitignore
@@ -1,5 +1,4 @@
 mc-wrapper.csh
 mc-wrapper.sh
 mc.csh
-mc.ext
 mc.sh
diff --git a/edit/edit.c b/edit/edit.c
index 0090181..9a51b79 100644
--- a/edit/edit.c
+++ b/edit/edit.c
@@ -1627,7 +1627,7 @@ long edit_move_forward3 (WEdit * edit, long current, int cols, long upto)
 	        if (utf8_display)
 	            col += 1;
 	    } else {
-	        col -= cw;
+	        col -= 2;
 	    }
 	    p += cw - 1;
 	}
@@ -3120,10 +3120,10 @@ edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
 	break;
     case CK_Edit_Save_Mode:
 	menu_save_mode_cmd ();
-    case CK_Date:
 	break;
+    case CK_Date:
 	{
-	    char s[1024];
+	    char s[BUF_MEDIUM];
 	    /* fool gcc to prevent a Y2K warning */
 	    char time_format[] = "_c";
 	    time_format[0] = '%';
@@ -3133,6 +3133,7 @@ edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
 	    edit->force |= REDRAW_PAGE;
 	    break;
 	}
+	break;
     case CK_Goto:
 	edit_goto_cmd (edit);
 	break;
diff --git a/m4.include/ac-get-fs-info.m4 b/m4.include/ac-get-fs-info.m4
index 97b64da..b1a6513 100644
--- a/m4.include/ac-get-fs-info.m4
+++ b/m4.include/ac-get-fs-info.m4
@@ -142,7 +142,7 @@ if test x"$ac_cv_func_getmntent" = xyes; then
 # endif
 #endif
 ],
-                    [ struct mntent *mnt = 0; char *table = MOUNTED;
+                    [ struct mntent *mnt = 0; const char *table = MOUNTED;
 		      if (sizeof mnt && sizeof table) return 0;],
 		    fu_cv_sys_mounted_getmntent1=yes,
 		    fu_cv_sys_mounted_getmntent1=no)])
diff --git a/m4.include/mc-use-termcap.m4 b/m4.include/mc-use-termcap.m4
index 6e36214..ec34b31 100644
--- a/m4.include/mc-use-termcap.m4
+++ b/m4.include/mc-use-termcap.m4
@@ -24,7 +24,7 @@ AC_DEFUN([MC_SLANG_TERMCAP], [
 #include <slang.h>
 #endif
 		    ],
-		    [SLtt_get_terminfo(); SLtt_tgetflag("");],
+		    [SLtt_get_terminfo(); SLtt_tgetflag((char*)"");],
 		    [mc_cv_slang_termcap=no],
 		    [mc_cv_slang_termcap=yes])
 	LIBS="$ac_save_LIBS"
diff --git a/mc.spec b/mc.spec
new file mode 100644
index 0000000..7e2fe10
--- /dev/null
+++ b/mc.spec
@@ -0,0 +1,519 @@
+Name: mc
+Version: 4.7.0
+Release: alt4.pre4
+
+License: %gpllgpl2plus
+Summary: A user-friendly file manager and visual shell
+Group: File tools
+Url: http://midnight-commander.org/
+
+Packager: Andrey Rahmatullin <wrar@altlinux.ru>
+
+Source0: %name-%version.tar
+Source1: synce-mcfs.tar
+Source2: mc-dnlike.color
+Source3: mc-dark.color
+Source4: mc-16.png
+Source5: mc-32.png
+
+Patch0: %name-%version-%release.patch
+
+Patch1: mc-4.7.0-alt-esc.patch
+Patch2: mc-4.7.0-alt-wrapper.patch
+Patch3: mc-4.7.0-alt-cflags.patch
+Patch4: mc-4.7.0-alt-extfs-rpm-fix.patch
+Patch5: mc-4.7.0-alt-filetypes.patch
+Patch6: mc-4.7.0-alt-forceexec.patch
+Patch7: mc-4.7.0-alt-po.patch
+Patch8: mc-4.7.0-alt-syntax-mak.patch
+Patch9: mc-4.7.0-alt-defaults.patch
+Patch10: mc-4.7.0-alt-menu.patch
+Patch11: mc-4.7.0-alt-extfs-urar-fix.patch
+Patch12: mc-4.7.0-alt-extfs-udar.patch
+Patch13: mc-4.7.0-alt-extfs-srpm-fix.patch
+
+# Debian
+Patch51: mc-4.7.0-debian-mc.ext-use-arj.patch
+
+# Misc
+# https://savannah.gnu.org/patch/?4211
+Patch101: mc-4.7.0-savannah-edit-homekey.patch
+
+BuildRequires(pre): rpm-build-licenses
+
+BuildPreReq: glib2-devel libe2fs-devel libgpm-devel
+BuildPreReq: groff-base cvs libX11-devel unzip
+BuildPreReq: libslang2-devel
+
+%add_findreq_skiplist %_sysconfdir/mc/edit.indent.rc
+%add_findreq_skiplist %_sysconfdir/mc/edit.spell.rc
+%add_findreq_skiplist %_datadir/mc/extfs/*
+
+%description
+Midnight Commander is a visual shell much like a file manager, only with way
+more features.  It is text mode, but also includes mouse support if you are
+running GPM.  Its coolest feature is the ability to ftp, view tar, zip
+files, and poke into RPMs for specific files.  :-)
+
+%prep
+%setup -a1
+%patch0 -p1
+
+# ALT
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+
+# Debian
+%patch51 -p1
+
+# Misc
+%patch101 -p1
+
+#%%autoreconf
+./autogen.sh
+
+mkdir doc/vfs/
+cp -a vfs/{COPYING.LGPL,README*,HACKING} doc/vfs/
+
+rm -rf vfs/samba/
+
+%build
+%configure \
+	--enable-extcharset \
+	--enable-vfs-undelfs
+
+%make_build
+
+%install
+%makeinstall
+
+install -d %buildroot%_sysconfdir/{profile.d,bashrc.d}
+mv %buildroot%_libexecdir/mc/mc.csh %buildroot%_sysconfdir/profile.d/
+mv %buildroot%_libexecdir/mc/mc.sh %buildroot%_sysconfdir/bashrc.d/
+# Install DosNavigator color scheme
+install -m644 %SOURCE2 .
+# Install Dark color scheme
+install -m644 %SOURCE3 .
+# Install SynCE VFS
+install -m755 synce-mcfs/src/synce* %buildroot%_datadir/%name/extfs/
+cat synce-mcfs/src/extfs.ini.add >> %buildroot%_sysconfdir/%name/extfs/extfs.ini
+
+# remove bash wrapper
+# rm -f %buildroot%_datadir/mc/bin/mc-wrapper.sh
+
+# .desktop
+cat <<__EOF__>%name.desktop
+[Desktop Entry]
+Type=Application
+Name=Midnight Commander
+Comment=Midnight Commander
+Icon=%name
+Exec=%name
+Terminal=true
+Categories=ConsoleOnly;System;FileTools;FileManager;
+__EOF__
+install -pD -m644 %name.desktop %buildroot%_desktopdir/%name.desktop
+
+# icons
+install -pD -m644 %SOURCE4 %buildroot%_miconsdir/%name.png
+install -pD -m644 %SOURCE5 %buildroot%_iconsdir/%name.png
+
+%find_lang %name
+
+
+%files -f %name.lang
+%doc AUTHORS doc/FAQ doc/HACKING doc/MAINTAINERS doc/NEWS doc/README
+%doc doc/README.QNX doc/TODO doc/filehighlight.txt contrib/README.xterm
+%doc doc/vfs/
+%doc mc-dnlike.color mc-dark.color
+%_bindir/mc
+%_bindir/mcedit
+%_bindir/mcview
+%_bindir/mcmfmt
+%_libexecdir/mc/
+%_datadir/mc/
+%_man1dir/*
+%_desktopdir/%name.desktop
+%_iconsdir/%name.png
+%_miconsdir/%name.png
+%config(noreplace) %_sysconfdir/bashrc.d/*
+%config(noreplace) %_sysconfdir/profile.d/*
+%dir %_sysconfdir/mc
+%dir %_sysconfdir/mc/extfs
+%config %_sysconfdir/mc/Syntax
+%config %_sysconfdir/mc/mc.charsets
+%config %_sysconfdir/mc/mc.lib
+%config(noreplace) %_sysconfdir/mc/*edit*
+%config(noreplace) %_sysconfdir/mc/filehighlight.ini
+%config(noreplace) %_sysconfdir/mc/mc.ext
+%config(noreplace) %_sysconfdir/mc/mc.keymap
+%config(noreplace) %_sysconfdir/mc/mc.keymap.default
+%config(noreplace) %_sysconfdir/mc/mc.keymap.emacs
+%config(noreplace) %_sysconfdir/mc/mc.menu
+%config(noreplace) %_sysconfdir/mc/mc.menu.sr
+%config(noreplace) %_sysconfdir/mc/extfs/extfs.ini
+%config(noreplace) %_sysconfdir/mc/extfs/sfs.ini
+
+
+%changelog
+* Sun Nov 15 2009 Andrey Rahmatullin <wrar@altlinux.ru> 4.7.0-alt4.pre4
+- 4.7.0-pre4-42-gd36c635
+- apply the rpm extfs fix to the srpm extfs too (closes: #22293)
+
+* Wed Nov 04 2009 Andrey Rahmatullin <wrar@altlinux.ru> 4.7.0-alt3.pre4
+- 4.7.0-pre4-3-g299b04b
+- Sisyphus build (closes: #6944, #10772, #13820, #21092)
+
+* Tue Oct 13 2009 Andrey Rahmatullin <wrar@altlinux.ru> 4.7.0-alt3.pre3
+- 4.7.0-pre3-57-gc492abe
+
+* Sun Oct 11 2009 Andrey Rahmatullin <wrar@altlinux.ru> 4.7.0-alt2.pre3
+- 4.7.0-pre3-50-ge2e549d
+- remove obsolete iso9660 patch (see #13820)
+- add unzip to buildreqs
+- update Url:
+
+* Fri Oct 02 2009 Andrey Rahmatullin <wrar@altlinux.ru> 4.7.0-alt1.pre3
+- 4.7.0-pre3
+- disable autoreq for the extfs modules
+- change Esc timeout to 25ms, enable old_esc_mode by default (Patch451
+  which adds a configuration dialog for that options no longer applies)
+
+* Mon Jun 22 2009 Andrey Rahmatullin <wrar@altlinux.ru> 4.6.2-alt12.pre1
+- extfs:
+  + add udar extfs (closes: #11019)
+  + don't set C locale in urar (closes: #18492, yurifil@etersoft.ru)
+  + fix display of files in subdirs in ucab (closes: #18619, yurifil@etersoft.ru)
+
+* Sun Nov 23 2008 Andrey Rahmatullin <wrar@altlinux.ru> 4.6.2-alt11.pre1
+- remove obsolete macros
+- replace menu file with .desktop
+- try to load libX11.so.6 if libX11.so didn't load (SuSe)
+- make whitespace highlighting configurable through menu (RH)
+
+* Thu Aug 28 2008 Andrey Rahmatullin <wrar@altlinux.ru> 4.6.2-alt10.pre1
+- add configuration dialog for Esc key timeout (Arch, upstream #13733)
+- mcedit: second press of Home key jumps to first non-space character (upstream
+  patch #4211)
+- fix extension in mc-4.6.1-mdv-lzma.patch (RH)
+- update mc-4.6.2-debian-recode.patch from 4.6.2~git20080311-3
+- fix u7z list mode (RH; closes: #14099)
+- mc.ext
+  + use 7z instead of 7za
+  + remove .fli patch (merged upstream)
+
+* Sat Aug 09 2008 Andrey Rahmatullin <wrar@altlinux.ru> 4.6.2-alt9.pre1
+- update to upstream 05069a72
+- sync Debian patches with 4.6.2~git20080311-1
+- mc.ext:
+  + recognize .cl as Lisp source (damned@; closes: #15971)
+  + use arj instead of unarj (Debian)
+- syntax:
+  + enhance: mail (Debian)
+  + add: asm, procmail (Debian)
+- extfs:
+  + add .cab extfs (yurifil@etersoft.ru; closes: #16361)
+- fix config file names in the manpage (Debian)
+- correctly view tar files with colons in their names (Debian)
+- fix smb.conf path (Debian)
+
+* Sun May 11 2008 Andrey Rahmatullin <wrar@altlinux.ru> 4.6.2-alt8.pre1
+- mc.ext:
+  + recognize .3gp as video, not manpage (#14982, hiddenman@)
+  + don't show exif(1) error if file doesn't contain EXIF data
+  + recognize all mailboxes, not only ASCII ones
+  + use fbv instead of zgv for viewing images without X
+- syntax:
+  + update ebuild.syntax
+  + recognize .mak as Makefiles (#15589, led@)
+- move global configs to /etc (RH)
+- build with X events support
+- 51 patch applied so far
+
+* Wed Apr 02 2008 Andrey Rahmatullin <wrar@altlinux.ru> 4.6.2-alt7.pre1
+- syntax:
+  + recognize .hh and .hpp as c++ again (#15177, was lost during adaptation
+    of Debian patches)
+  + recognize man pages with additional suffixes other than 'x', such as
+    write.3p (Debian)
+- add recoding support to panels, FTP and copy/move operations (Debian)
+- make visible_tabs and visible_tws mcedit options configurable through config
+  file (Debian)
+- (un)escape weird folder names in the command line (Debian)
+- use more aggressive colors in warning boxes for superuser (UHU)
+
+* Sat Mar 29 2008 Andrey Rahmatullin <wrar@altlinux.ru> 4.6.2-alt6.pre1
+- build with slang2
+- build with system libpopt
+- fix mcview with slang2 in 8-bit locales (RH)
+- fix segfault when no hint files available (RH)
+- fix segfault when trying to display invalid timestamp (Gentoo)
+- remove chkconfig from Requires
+- convert all help files to UTF-8 to be viewable in all locales (Debian)
+- fix displaying link count and mode columns in UTF-8 locale (Debian)
+- fix bottom button widths in UTF-8 locale (UHU)
+- fix selection width in the hotlist and quick search in UTF-8 locale (UHU)
+- fix off-by-one misbehavior of Ctrl-Left and Alt-Backspace in line edit
+  widget (UHU)
+- fix line edit widget behavior with literal newline entered (UHU)
+- syntax:
+  + add ebuild (Gentoo)
+- mc.ext:
+  + use djview for .djvu files
+
+* Tue Mar 18 2008 Andrey Rahmatullin <wrar@altlinux.ru> 4.6.2-alt5.pre1
+- add option to build with libslang2 (#10591)
+- mc.ext:
+  + open chm files with kchmviewer || xchm
+- disable mc-4.6.2-rh-delcheck.patch
+- fix memleak in mc-4.6.1-alt-vfs.patch (#14849)
+- fix unpacking of archives with spaces (#12626)
+
+* Wed Mar 12 2008 Andrey Rahmatullin <wrar@altlinux.ru> 4.6.2-alt4.pre1
+- build with slang2
+- Daedalus build
+
+* Wed Mar 05 2008 Andrey Rahmatullin <wrar@altlinux.ru> 4.6.2-alt3.pre1
+- fix x86_64 build (damir@)
+- mc.ext:
+  + show EXIF for JPEG images (Debian)
+  + use msgunfmt to view .mo message catalogs (Debian)
+  + add .mkv and .rm to video file extensions (Mandriva)
+  + add .asm to assembler file extensions (RH)
+  + add JNG and MNG to image file types (RH)
+  + add .flic to video file extensions (RH)
+  + use mplayer -identify to 'view' video files (RH)
+  + use OO.o for all MSO files (RH)
+
+* Thu Feb 28 2008 Andrey Rahmatullin <wrar@altlinux.ru> 4.6.2-alt2.pre1
+- enable lynx-style navigation by default (#8046)
+- package /etc/profile.d/mc.csh
+- compress ChangeLog
+- Debian patches:
+  + syntax enhance: c++, sh
+  + syntax add: debian/{control,changelog,rules}, dsc, named,
+    sources.list, strace
+- RH patches:
+  + update panels before showing copy/move dialog
+  + allow exit command on non-local filesystems
+  + disable support of dirs with embedded newline
+  + fix 'Preserve attributes' copy/move option
+  + handle resizing during file operation
+  + show free space on the current device
+  + add vertical scrollbars to panels and other widgets
+- PLD patches:
+  + syntax enhance: rpm spec
+  + syntax add: vhdl
+- Mandriva patches:
+  + extfs: add lzma
+- Misc patches:
+  + extfs: 7z improvements
+
+* Sun Feb 24 2008 Andrey Rahmatullin <wrar@altlinux.ru> 4.6.2-alt1.pre1
+- 4.6.2-pre1
+- spec cleanup
+- take utf8 patch from Debian mc 1:4.6.2~pre1-3 (includes
+  mc-4.6.1-alt-promptfix.patch)
+
+* Fri Jan 05 2007 Igor Zubkov <icesik@altlinux.org> 4.6.1r-alt9
+- fix not readable help when utf-8 locale is used (#9727)
+
+* Mon Oct 23 2006 Igor Zubkov <icesik@altlinux.org> 4.6.1r-alt8
+- use unrar instead rar in mc.ext (#8028)
+
+* Mon Oct 16 2006 Igor Zubkov <icesik@altlinux.ru> 4.6.1r-alt7
+- added mc-4.6.1-alt-menu.patch (fixed mc.menu scripts)
+
+* Mon Oct 16 2006 Igor Zubkov <icesik@altlinux.ru> 4.6.1r-alt6
+- revert mc-4.6.1a-rh-promptfix.patch (buggy)
+- fix promt (mc-4.6.1-alt-promptfix.patch) (#8310)
+
+* Mon Oct 16 2006 Igor Zubkov <icesik@altlinux.ru> 4.6.1r-alt5
+- add catdoc as RTF viewer (#4443)
+
+* Mon Oct 16 2006 Igor Zubkov <icesik@altlinux.ru> 4.6.1r-alt4
+- add nemerle syntax (#10104)
+
+* Thu Sep 15 2005 Kachalov Anton <mouse@altlinux.ru> 4.6.1r-alt3
+- Updated file-type coloring (X-Stranger)
+- Bugfixes:
+    + Menu-file fix (#5007)
+    + PO translation (#7582, patch from php-coder@)
+    + 7zip extension support (#7962)
+
+* Sat Aug 13 2005 Kachalov Anton <mouse@altlinux.ru> 4.6.1r-alt2
+- Added file-type coloring (thanks to X-Stranger <x@interfax.by>)
+
+* Mon Aug 01 2005 Kachalov Anton <mouse@altlinux.ru> 4.6.1r-alt1
+- Release 4.6.1
+
+* Mon Jul 11 2005 Kachalov Anton <mouse@altlinux.ru> 4.6.1a.20050606-alt1
+- 4.6.1a
+- New patches (RH):
+    + updated UTF8
+    + fish upload
+    + command prompt fix
+
+* Wed Jun 01 2005 Kachalov Anton <mouse@altlinux.ru> 4.6.1.20050601-alt1
+- Bugfixes:
+    + force subshell execution, forwardport (#6952)
+    + question symbols in xterm title bar (#6945)
+    + partially fixed codepage conversion (#6944)
+
+* Thu May 19 2005 Kachalov Anton <mouse@altlinux.ru> 4.6.1.20050518-alt1
+- 4.6.1 from CVS: 18 May 2005
+- Bugfixes:
+    + aterm generates symbols instead of cursor movement (#4548)
+    + big files from zip archive doesn't show (#5428)
+    + files copy failed via remote shell (#6806)
+    + play video with mplayer or xine (#5052)
+    + broken Grey Enter key (#1214)
+    + missed menu entry (#5007)
+- Added:
+    + UTF-8 support
+    + SynCE VFS
+
+* Tue Jun 29 2004 Kachalov Anton <mouse@altlinux.ru> 4.6.0-alt9
+- fix iso extension (#4366, #4536)
+- additional file types handling (#3334, #4443)
+- fix date parsing in vfs (#4545)
+
+* Wed Apr 07 2004 Kachalov Anton <mouse@altlinux.ru> 4.6.0-alt8
+- fix security bugs (buffer overflow) and backport from CVS version.
+
+* Mon Jan 19 2004 Stanislav Ievlev <inger@altlinux.org> 4.6.0-alt7.1
+- fix security bugs.
+
+* Mon Nov 03 2003 Kachalov Anton <mouse@altlinux.ru> 4.6.0-alt7
+- added .hh and .hpp files to Syntax highlight
+
+* Wed Sep 03 2003 Kachalov Anton <mouse@altlinux.ru> 4.6.0-alt6
+- removed requires for cdrecord, cdparanoia and wget
+
+* Mon Jul 21 2003 Kachalov Anton <mouse@altlinux.ru> 4.6.0-alt5
+- using links instead of lynx for viewing html
+- added help file in cp1251 (#0002685)
+- added DN-like coloration (thanks to Peter V. Chernikoff)
+
+* Tue Apr 29 2003 Kachalov Anton <mouse@altlinux.ru> 4.6.0-alt4
+- added ISO extfs
+
+* Tue Feb 18 2003 Kachalov Anton <mouse@altlinux.ru> 4.6.0-alt3
+- bugfix:
+    + russian char in cp1251 locale not displayed (#000271)
+    + problem with cp866 (#0002023)
+
+* Mon Feb 10 2003 Kachalov Anton <mouse@altlinux.ru> 4.6.0-alt2
+- bugfix: mc doesn't give hostname to the terminal
+- proper recognition of man pages
+- wrapper creation temp dir on first startup fix
+
+* Thu Jan 06 2003 Kachalov Anton <mouse@altlinux.ru> 4.6.0-alt1
+- new version
+- remove mcserv
+- remove smbfs
+- bugfix:
+    + Eterm is considered to be a dumb terminal (#0000851)
+    + doen't look inside ~/.terminfo (#0000907)
+    + mc crashes on linux console when gpm server closes connection (#0001123)
+    + not copyied russian char to command line (#0001208)
+    + locale error (#0001550)
+    + hostname resolve (#0002010)
+
+* Thu Dec 26 2002 Konstantin Volckov <goldhead@altlinux.ru> 4.6.0-alt0.5.5
+- Fixed wrapper
+
+* Thu Nov 28 2002 Konstantin Volckov <goldhead@altlinux.ru> 4.6.0-alt0.5
+- Rebuilt with latest CVS changes
+
+* Thu Oct 31 2002 Konstantin Volckov <goldhead@altlinux.ru> 4.6.0-alt0.4
+- Rebuilt back with slang library
+
+* Mon Oct 28 2002 Konstantin Volckov <goldhead@altlinux.ru> 4.6.0-alt0.3
+- Fixed gpm bug
+- Rebuilt with latest CVS changes
+- Rebuilt with ncurses library
+- Turn on smbfs support
+
+* Tue Sep 03 2002 Konstantin Volckov <goldhead@altlinux.ru> 4.6.0-alt0.2
+- Rebuild with latest CVS changes
+- Fixed restoring mouse events under xterm
+
+* Wed Aug 27 2002 Konstantin Volckov <goldhead@altlinux.ru> 4.6.0-alt0.1
+- Rebuild with latest CVS changes
+- Fixed some bugs
+- Version now 4.6.0pre1a
+
+* Thu Aug 15 2002 Konstantin Volckov <goldhead@altlinux.ru> 4.5.99a-alt3
+- Rebuild with latest CVS changes
+
+* Wed Jul 17 2002 Konstantin Volckov <goldhead@altlinux.ru> 4.5.99a-alt2
+- Rebuild with fixed libgpm
+
+* Tue Jul 16 2002 Konstantin Volckov <goldhead@altlinux.ru> 4.5.99a-alt1
+- Build from snapshot
+- Package gmc now removed
+- Some spec cleanup
+
+* Tue Apr 16 2002 Konstantin Volckov <goldhead@altlinux.ru> 4.5.55-alt7
+- Added --enable-largefile, thnx to sav
+
+* Mon Apr 15 2002 Konstantin Volckov <goldhead@altlinux.ru> 4.5.55-alt6
+- Removed umask patch
+
+* Thu Feb 07 2002 AEN <aen@logic.ru> 4.5.55-alt5
+- LANGUAGE variable not used anymore
+- belarussian translation added
+- build requires regenerated
+- uk_UA.CP1251 tips added
+
+* Tue Sep 24 2001 Kachalov Anton <mouse@altlinux.ru> 4.5.55-alt4
+- Updated Russian translation - thanx to Andrew Borodin
+
+* Tue Sep 11 2001 Konstantin Volckov <goldhead@altlinux.ru> 4.5.55-alt3
+- Updated Russian translation - thanx to Andrew Borodin
+
+* Sun Sep 09 2001 Konstantin Volckov <goldhead@altlinux.ru> 4.5.55-alt2
+- Fix mc.hint for CP1251 locle
+- Now we call links when view html's
+
+* Tue Sep 04 2001 Konstantin Volckov <goldhead@altlinux.ru> 4.5.55-alt1
+- 4.5.55
+- Use recoding support fom mc
+- Fixed Requires
+- Show backup files by default now is on
+
+* Thu Jun 21 2001 Konstantin Volckov <goldhead@linux.ru.net> 4.5.54-alt3.1
+- Updated recode patch - added editor support & view search support
+
+* Mon Jun 18 2001 Konstantin Volckov <goldhead@linux.ru.net> 4.5.54-alt3
+- Fix Full 8 bit input to be on by default
+
+* Thu Jun 14 2001 Konstantin Volckov <goldhead@linux.ru.net> 4.5.54-alt2
+- Fixed cdparanoia requires
+- Some spec cleanup
+
+* Mon Jun 4 2001 Konstantin Volckov <goldhead@linux.ru.net> 4.5.54-alt1
+- New mc version - 4.5.54
+- Some new Cooker patches
+- Fixed sources (bzip2 -> gz)
+- Fixed recode patch
+- Removed all entries in changelog before 01012001
+- Added umask settings
+
+* Thu Mar 15 2001 Konstantin Volckov <goldhead@linux.ru.net> 4.5.51-ipl11mdk
+- Added recode patch
+- Fix build with glibc-2.2.2 (time patch)
+- Fixed name of po file
+- Fixed build with new gtk
diff --git a/misc/.gitignore b/misc/.gitignore
new file mode 100644
index 0000000..3af159c
--- /dev/null
+++ b/misc/.gitignore
@@ -0,0 +1 @@
+mc.ext
diff --git a/misc/mc.ext.in b/misc/mc.ext.in
index 41dd8a2..707bff4 100644
--- a/misc/mc.ext.in
+++ b/misc/mc.ext.in
@@ -343,6 +343,9 @@ regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$
 	Open=case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
 	View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
 
+# CHM
+regex/\.(chm|CHM)$
+	Open=which kchmviewer > /dev/null 2>&1 && (kchmviewer %f &) || (xchm %f &)
 
 ### Images ###
 
@@ -350,6 +353,7 @@ type/^GIF
 	Include=image
 
 type/^JPEG
+	View=%view{ascii} identify %f; test -x /usr/bin/exif && echo && exif %f 2>/dev/null
 	Include=image
 
 type/^PC\ bitmap
@@ -440,6 +444,9 @@ regex/\.([aA][sS][fFxX])$
 regex/\.([dD][iI][vV][xX])$
 	Include=video
 
+regex/\.([mM][kK][vV])$
+	Include=video
+
 regex/\.([mM][oO][vV]|[qQ][tT])$
 	Include=video
 
@@ -576,6 +583,9 @@ regex/\.(d64|D64)$
 regex/\.([Gg][Ll][Aa][Dd][Ee])$
 	Open=if glade-3 --version >/dev/null 2>&1; then (glade-3 %f >/dev/null 2>&1 &); else (glade-2 %f >/dev/null 2>&1 &); fi
 
+# Gettext Catalogs
+shell/.mo
+	View=%view{ascii} msgunfmt %f || cat %f
 
 ### Plain compressed files ###
 
diff --git a/misc/mc.keymap.default b/misc/mc.keymap.default
index 74375f2..7b76a58 100644
--- a/misc/mc.keymap.default
+++ b/misc/mc.keymap.default
@@ -199,7 +199,7 @@ CmdMkdir = f7
 CmdDelete = f8
 CmdQuit = f10
 CmdMenuLastSelected = f19
-CmdQuietQuit = f20; ctrl-g
+CmdQuietQuit = f20
 CmdFind = alt-question
 CmdQuickCd = alt-c
 CmdQuickChdir = ctrl-backslash
diff --git a/src/Makefile.am b/src/Makefile.am
index 1ff9d17..28cdbd2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -44,7 +44,7 @@ SRC_maintainer=logging.c logging.h
 SRC_charset = charsets.c charsets.h selcodepage.c selcodepage.h
 
 if USE_MAINTAINER_MODE
-    SRC_USE_maintainer=$(SRC_MAINTAINER)
+    SRC_USE_maintainer=$(SRC_maintainer)
 endif
 
 if CHARSET
diff --git a/src/args.c b/src/args.c
index 02607a6..05202fa 100644
--- a/src/args.c
+++ b/src/args.c
@@ -32,7 +32,7 @@
 #include "../src/tty/tty.h"
 #include "../src/args.h"
 #include "../src/strutil.h"
-
+#include "../src/textconf.h"
 
 /*** external variables **************************************************************************/
 
diff --git a/src/dir.c b/src/dir.c
index 40980f8..74af764 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -27,14 +27,17 @@
 #include <string.h>
 #include <sys/stat.h>
 
-#include "global.h"
 #include "../src/tty/tty.h"
-#include "dir.h"
+
+#include "../src/search/search.h"
+
+#include "global.h"
 #include "wtools.h"
 #include "treestore.h"
 #include "strutil.h"
 #include "fs.h"
-#include "../src/search/search.h"
+#include "util.h"		/* canonicalize_pathname () */
+#include "dir.h"
 
 /* If true show files starting with a dot */
 int show_dot_files = 1;
@@ -256,34 +259,29 @@ clean_dir (dir_list *list, int count)
     }
 }
 
-static int
-add_dotdot_to_list (dir_list *list, int lc_index)
+/* Used to set up a directory list when there is no access to a directory */
+gboolean
+set_zero_dir (dir_list *list)
 {
     /* Need to grow the *list? */
-    if (lc_index == list->size) {
+    if (list->size == 0) {
 	list->list = g_realloc (list->list, sizeof (file_entry) *
 			      (list->size + RESIZE_STEPS));
-	if (!list->list)
-	    return 0;
+	if (list->list == NULL)
+	    return FALSE;
+
 	list->size += RESIZE_STEPS;
     }
 
-    memset (&(list->list) [lc_index], 0, sizeof(file_entry));
-    (list->list) [lc_index].fnamelen = 2;
-    (list->list) [lc_index].fname = g_strdup ("..");
-    (list->list) [lc_index].f.link_to_dir = 0;
-    (list->list) [lc_index].f.stale_link = 0;
-    (list->list) [lc_index].f.dir_size_computed = 0;
-    (list->list) [lc_index].f.marked = 0;
-    (list->list) [lc_index].st.st_mode = 040755;
-    return 1;
-}
-
-/* Used to set up a directory list when there is no access to a directory */
-int
-set_zero_dir (dir_list *list)
-{
-    return (add_dotdot_to_list (list, 0));
+    memset (&(list->list) [0], 0, sizeof(file_entry));
+    list->list[0].fnamelen = 2;
+    list->list[0].fname = g_strdup ("..");
+    list->list[0].f.link_to_dir = 0;
+    list->list[0].f.stale_link = 0;
+    list->list[0].f.dir_size_computed = 0;
+    list->list[0].f.marked = 0;
+    list->list[0].st.st_mode = 040755;
+    return TRUE;
 }
 
 /* If you change handle_dirent then check also handle_path. */
@@ -339,6 +337,26 @@ handle_dirent (dir_list *list, const char *filter, struct dirent *dp,
     return 1;
 }
 
+/* get info about ".." */
+static gboolean
+get_dotdot_dir_stat (const char *path, struct stat *st)
+{
+    gboolean ret = FALSE;
+
+    if ((path != NULL) && (path[0] != '\0') && (st != NULL)) {
+	char *dotdot_dir;
+	struct stat s;
+
+	dotdot_dir = g_strdup_printf ("%s/../", path);
+	canonicalize_pathname (dotdot_dir);
+	ret = mc_stat (dotdot_dir, &s) == 0;
+	g_free (dotdot_dir);
+	*st = s;
+    }
+
+    return ret;
+}
+
 /* handle_path is a simplified handle_dirent. The difference is that
    handle_path doesn't pay attention to show_dot_files and show_backups.
    Moreover handle_path can't be used with a filemask.
@@ -392,8 +410,11 @@ do_load_dir (const char *path, dir_list *list, sortfn *sort, int lc_reverse,
     struct stat st;
 
     /* ".." (if any) must be the first entry in the list */
-    if (set_zero_dir (list) == 0)
+    if (!set_zero_dir (list))
 	return next_free;
+
+    if (get_dotdot_dir_stat (path, &st))
+	list->list[next_free].st = st;
     next_free++;
 
     dirp = mc_opendir (path);
@@ -401,10 +422,13 @@ do_load_dir (const char *path, dir_list *list, sortfn *sort, int lc_reverse,
 	message (D_ERROR, MSG_ERROR, _("Cannot read directory contents"));
 	return next_free;
     }
+
     tree_store_start_check (path);
+
     /* Do not add a ".." entry to the root directory */
-    if (!strcmp (path, "/"))
+    if ((path[0] == PATH_SEP) && (path[1] == '\0'))
 	next_free--;
+
     while ((dp = mc_readdir (dirp))) {
 	status =
 	    handle_dirent (list, filter, dp, &st, next_free, &link_to_dir,
@@ -426,13 +450,13 @@ do_load_dir (const char *path, dir_list *list, sortfn *sort, int lc_reverse,
         list->list[next_free].sort_key = NULL;
         list->list[next_free].second_sort_key = NULL;
 	next_free++;
-	if (!(next_free % 32))
+
+	if ((next_free & 31) == 0)
 	    rotate_dash ();
     }
 
-    if (next_free) {
+    if (next_free != 0)
 	do_sort (list, sort, next_free - 1, lc_reverse, lc_case_sensitive, exec_ff);
-    }
 
     mc_closedir (dirp);
     tree_store_end_check ();
@@ -504,7 +528,7 @@ do_reload_dir (const char *path, dir_list *list, sortfn *sort, int count,
     if (!dirp) {
 	message (D_ERROR, MSG_ERROR, _("Cannot read directory contents"));
 	clean_dir (list, count);
-	return set_zero_dir (list);
+	return set_zero_dir (list) ? 1 : 0;
     }
 
     tree_store_start_check (path);
@@ -529,12 +553,16 @@ do_reload_dir (const char *path, dir_list *list, sortfn *sort, int count,
 
     /* Add ".." except to the root directory. The ".." entry
        (if any) must be the first in the list. */
-    if (strcmp (path, "/") != 0) {
-	if (set_zero_dir (list) == 0) {
+    if (!((path[0] == PATH_SEP) && (path[1] == '\0'))) {
+	if (!set_zero_dir (list)) {
 	    clean_dir (list, count);
 	    clean_dir (&dir_copy, count);
 	    return next_free;
 	}
+
+	if (get_dotdot_dir_stat (path, &st))
+	    list->list[next_free].st = st;
+
 	next_free++;
     }
 
@@ -581,8 +609,8 @@ do_reload_dir (const char *path, dir_list *list, sortfn *sort, int count,
 	list->list[next_free].f.stale_link = stale_link;
 	list->list[next_free].f.dir_size_computed = 0;
 	list->list[next_free].st = st;
-        list->list[next_free].sort_key = NULL;
-        list->list[next_free].second_sort_key = NULL;
+	list->list[next_free].sort_key = NULL;
+	list->list[next_free].second_sort_key = NULL;
 	next_free++;
 	if (!(next_free % 16))
 	    rotate_dash ();
diff --git a/src/dir.h b/src/dir.h
index ba78121..dee5dd7 100644
--- a/src/dir.h
+++ b/src/dir.h
@@ -6,17 +6,17 @@
 #ifndef MC_DIR_H
 #define MC_DIR_H
 
+#include <sys/stat.h>
+
+#include "global.h"
+
 #define MIN_FILES 128
 #define RESIZE_STEPS 128
 
-#include <sys/stat.h>
-
 /* keys are set only during sorting */
 typedef struct {
-
     /* File attributes */
-
-    int  fnamelen;
+    size_t fnamelen;
     char *fname;
     struct stat st;
     /* key used for comparing names */
@@ -47,7 +47,7 @@ void do_sort (dir_list * list, sortfn * sort, int top, int reverse,
 int do_reload_dir (const char *path, dir_list * list, sortfn * sort, int count,
 		   int reverse, int case_sensitive, int exec_ff, const char *filter);
 void clean_dir (dir_list * list, int count);
-int set_zero_dir (dir_list * list);
+gboolean set_zero_dir (dir_list *list);
 int handle_path (dir_list *list, const char *path, struct stat *buf1,
 		 int next_free, int *link_to_dir, int *stale_link);
 
diff --git a/src/filehighlight/ini-file-read.c b/src/filehighlight/ini-file-read.c
index 167a0df..b2f4901 100644
--- a/src/filehighlight/ini-file-read.c
+++ b/src/filehighlight/ini-file-read.c
@@ -33,6 +33,7 @@
 #include "../src/fileloc.h"
 #include "../src/strescape.h"
 #include "../src/skin/skin.h"
+#include "../../src/util.h"
 #include "fhl.h"
 #include "internal.h"
 
diff --git a/src/info.c b/src/info.c
index 6437ec8..2cbc76d 100644
--- a/src/info.c
+++ b/src/info.c
@@ -70,7 +70,7 @@ static void info_box (Dlg_head *h, struct WInfo *info)
 static void
 info_show_info (struct WInfo *info)
 {
-    static int i18n_adjust=0;
+    static int i18n_adjust = 0;
     static const char *file_label;
     GString *buff;
     struct stat st;
@@ -96,10 +96,10 @@ info_show_info (struct WInfo *info)
 
     /* Print only lines which fit */
 
-    if(!i18n_adjust) {
+    if (i18n_adjust == 0) {
 	/* This printf pattern string is used as a reference for size */
-	file_label=_("File:       %s");
-	i18n_adjust = str_term_width1(file_label) + 2;
+	file_label = _("File:       %s");
+	i18n_adjust = str_term_width1 (file_label) + 2;
     }
 
     buff = g_string_new ("");
@@ -193,30 +193,30 @@ info_show_info (struct WInfo *info)
 	tty_printf (_("Owner:     %s/%s"),
 	    get_owner (st.st_uid),
 	    get_group (st.st_gid));
-	
+
     case 6:
 	widget_move (&info->widget, 6, 3);
 	tty_printf (_("Links:     %d"), (int) st.st_nlink);
-	
+
     case 5:
 	widget_move (&info->widget, 5, 3);
 	tty_printf (_("Mode:      %s (%04o)"),
 		string_perm (st.st_mode), (unsigned) st.st_mode & 07777);
-	
+
     case 4:
 	widget_move (&info->widget, 4, 3);
 	tty_printf (_("Location:  %Xh:%Xh"), (int)st.st_dev, (int)st.st_ino);
-	
+
     case 3:
+    {
+	const char *fname;
+
 	widget_move (&info->widget, 3, 2);
-	/* .ado: fname is invalid if selected == 0 && info called from current panel */
-	if (current_panel->selected){
-            str_printf (buff, file_label, 
-            str_trunc (current_panel->dir.list [current_panel->selected].fname,
-				    info->widget.cols - i18n_adjust));
-            tty_print_string (buff->str);
-	} else
-	    tty_print_string (_("File:       None"));
+	fname = current_panel->dir.list [current_panel->selected].fname;
+	str_printf (buff, file_label,
+		    str_trunc (fname, info->widget.cols - i18n_adjust));
+	tty_print_string (buff->str);
+    }
 
     case 2:
     case 1:
@@ -230,13 +230,13 @@ static void info_hook (void *data)
 {
     struct WInfo *info = (struct WInfo *) data;
     Widget *other_widget;
-    
+
     other_widget = get_panel_widget (get_current_index ());
     if (!other_widget)
 	return;
     if (dlg_overlap (&info->widget, other_widget))
 	return;
-    
+
     info->ready = 1;
     info_show_info (info);
 }
@@ -301,4 +301,3 @@ info_new (void)
 
     return info;
 }
-
diff --git a/src/mcconfig/common.c b/src/mcconfig/common.c
index 39b2e21..b0999ba 100644
--- a/src/mcconfig/common.c
+++ b/src/mcconfig/common.c
@@ -30,6 +30,7 @@
 #include "global.h"
 
 #include "../../vfs/vfs.h"      /* mc_stat */
+#include "../../src/util.h"
 
 #include "mcconfig.h"
 
diff --git a/src/panelize.c b/src/panelize.c
index 9179deb..e2287fb 100644
--- a/src/panelize.c
+++ b/src/panelize.c
@@ -445,7 +445,7 @@ static void do_external_panelize (char *command)
 	    chdir (PATH_SEP_STR);
 	}
     } else {
-	current_panel->count = set_zero_dir (list);
+	current_panel->count = set_zero_dir (list) ? 1 : 0;
     }
     if (pclose (external) < 0)
 	message (D_NORMAL, _("External panelize"), _("Pipe close failed"));
diff --git a/src/screen.c b/src/screen.c
index 2a75d71..0ad69b8 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -300,9 +300,6 @@ static const char *
 string_file_mtime (file_entry *fe, int len)
 {
     (void) len;
-    if (!strcmp (fe->fname, "..")) {
-       return "";
-    }
     return file_date (fe->st.st_mtime);
 }
 
@@ -311,9 +308,6 @@ static const char *
 string_file_atime (file_entry *fe, int len)
 {
     (void) len;
-    if (!strcmp (fe->fname, "..")) {
-       return "";
-    }
     return file_date (fe->st.st_atime);
 }
 
@@ -322,9 +316,6 @@ static const char *
 string_file_ctime (file_entry *fe, int len)
 {
     (void) len;
-    if (!strcmp (fe->fname, "..")) {
-       return "";
-    }
     return file_date (fe->st.st_ctime);
 }
 
@@ -1338,7 +1329,7 @@ panel_reload (WPanel *panel)
 
 	if (panel->cwd[0] == PATH_SEP && panel->cwd[1] == 0) {
 	    panel_clean_dir (panel);
-	    panel->count = set_zero_dir (&panel->dir);
+	    panel->count = set_zero_dir (&panel->dir) ? 1 : 0;
 	    return;
 	}
 	last_slash = strrchr (panel->cwd, PATH_SEP);
@@ -1381,8 +1372,8 @@ panel_paint_sort_info(WPanel *panel)
 static gchar*
 panel_get_title_without_hotkey(const char *title)
 {
-    gchar *translated_title;
-    const gchar *hkey;
+    char *translated_title;
+    char *hkey;
 
     if (title == NULL)
 	return NULL;
@@ -3227,7 +3218,7 @@ reload_panelized (WPanel *panel)
 	j++;
     }
     if (j == 0)
-	panel->count = set_zero_dir (list);
+	panel->count = set_zero_dir (list) ? 1 : 0;
     else
 	panel->count = j;
 
diff --git a/src/setup.c b/src/setup.c
index ef45ff5..3e63315 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -196,6 +196,7 @@ static const struct {
     { "ftpfs_retry_seconds", &ftpfs_retry_seconds },
     { "ftpfs_always_use_proxy", &ftpfs_always_use_proxy },
     { "ftpfs_use_passive_connections", &ftpfs_use_passive_connections },
+    { "ftpfs_use_passive_connections_over_proxy", &ftpfs_use_passive_connections_over_proxy },
     { "ftpfs_use_unix_list_options", &ftpfs_use_unix_list_options },
     { "ftpfs_first_cd_then_ls", &ftpfs_first_cd_then_ls },
     { "fish_directory_timeout", &fish_directory_timeout },
@@ -409,6 +410,9 @@ panel_load_setup (WPanel *panel, const char *section)
     /* Load sort order */
     buffer = mc_config_get_string(mc_panels_config, section, "sort_order", "name");
     panel->current_sort_field = panel_get_field_by_id(buffer);
+    if (panel->current_sort_field == NULL )
+	panel->current_sort_field = panel_get_field_by_id("name");
+
     g_free(buffer);
 
     /* Load the listing mode */
diff --git a/src/skin/ini-file.c b/src/skin/ini-file.c
index ce12e13..1a2b3fb 100644
--- a/src/skin/ini-file.c
+++ b/src/skin/ini-file.c
@@ -31,6 +31,7 @@
 #include "../src/global.h"
 #include "../src/main.h"
 #include "../src/fileloc.h"
+#include "../../src/util.h"
 #include "skin.h"
 #include "internal.h"
 
diff --git a/src/textconf.c b/src/textconf.c
index 8fe02b3..9bfc84c 100644
--- a/src/textconf.c
+++ b/src/textconf.c
@@ -31,6 +31,7 @@
 
 #include "global.h"
 #include "ecs.h"
+#include "../src/textconf.h"
 
 #ifdef USE_VFS
 static const char *const vfs_supported[] = {
diff --git a/src/timefmt.h b/src/timefmt.h
index b93a135..ef58867 100644
--- a/src/timefmt.h
+++ b/src/timefmt.h
@@ -10,8 +10,6 @@
 
 #define INVALID_TIME_TEXT	"(invalid)"
 
-#ifdef HAVE_STRFTIME
-
 /* safe localtime formatting - strftime()-using version */
 #define FMT_LOCALTIME(buffer, bufsize, fmt, when)			\
     {									\
@@ -28,16 +26,6 @@
 	}								\
     }									\
 
-#else
-
-/* fallback when strftime/localtime not available */
-#define FMT_LOCALTIME(buffer,bufsize,fmt,when)			\
-    {								\
-	ctime_r(when,buffer);					\
-    }								\
-
-#endif
-
 #define FMT_LOCALTIME_CURRENT(buffer, bufsize, fmt)		\
     {								\
 	time_t __current_time;					\
diff --git a/src/tty/win.c b/src/tty/win.c
index ce5922d..86cf6a1 100644
--- a/src/tty/win.c
+++ b/src/tty/win.c
@@ -34,7 +34,7 @@
 
 #include "../../src/tty/tty.h"  /* tty_gotoyx, tty_print_char */
 #include "../../src/tty/win.h"
-
+#include "../../src/util.h"
 #include "../../src/cons.saver.h"       /* console_flag */
 
 /*** global variables **************************************************/
diff --git a/src/wtools.h b/src/wtools.h
index 5d06391..d9f7b8b 100644
--- a/src/wtools.h
+++ b/src/wtools.h
@@ -86,8 +86,12 @@ typedef struct {
     .relative_y = y,							\
     .y_divisions = ydiv,						\
     .widget = NULL,							\
-    .u.checkbox.text = txt,						\
-    .u.checkbox.state = st						\
+    .u = { 								\
+	.checkbox = {							\
+	    .text = txt,						\
+	    .state = st							\
+	}								\
+    }									\
 }
 
 #define QUICK_BUTTON(x, xdiv, y, ydiv, txt, act, cb)			\
@@ -98,9 +102,13 @@ typedef struct {
     .relative_y = y,							\
     .y_divisions = ydiv,						\
     .widget = NULL,							\
-    .u.button.text = txt,						\
-    .u.button.action = act,						\
-    .u.button.callback = cb						\
+    .u = {								\
+	.button = {							\
+	    .text = txt,						\
+	    .action = act,						\
+	    .callback = cb						\
+	}								\
+    }									\
 }
 
 #define QUICK_INPUT(x, xdiv, y, ydiv, txt, len_, flags_, hname, res)	\
@@ -111,11 +119,15 @@ typedef struct {
     .relative_y = y,							\
     .y_divisions = ydiv,						\
     .widget = NULL,							\
-    .u.input.text = txt,						\
-    .u.input.len = len_,						\
-    .u.input.flags = flags_,						\
-    .u.input.histname = hname,						\
-    .u.input.result = res						\
+    .u = {								\
+	.input = {							\
+	    .text = txt,						\
+	    .len = len_,						\
+	    .flags = flags_,						\
+	    .histname = hname,						\
+	    .result = res						\
+	}								\
+    }									\
 }
 
 #define QUICK_LABEL(x, xdiv, y, ydiv, txt)				\
@@ -126,7 +138,11 @@ typedef struct {
     .relative_y = y,							\
     .y_divisions = ydiv,						\
     .widget = NULL,							\
-    .u.label.text = txt							\
+    .u = {								\
+	.label = {							\
+	    .text = txt							\
+	}								\
+    }									\
 }
 
 #define QUICK_RADIO(x, xdiv, y, ydiv, cnt, items_, val)			\
@@ -137,9 +153,13 @@ typedef struct {
     .relative_y = y,							\
     .y_divisions = ydiv,						\
     .widget = NULL,							\
-    .u.radio.count = cnt,						\
-    .u.radio.items = items_,						\
-    .u.radio.value = val,						\
+    .u = {								\
+	.radio = {							\
+	    .count = cnt,						\
+	    .items = items_,						\
+	    .value = val						\
+	}								\
+    }									\
 }
 
 #define QUICK_END							\
@@ -150,11 +170,15 @@ typedef struct {
     .relative_y = 0,							\
     .y_divisions = 0,							\
     .widget = NULL,							\
-    .u.input.text = NULL,						\
-    .u.input.len = 0,							\
-    .u.input.flags = 0,							\
-    .u.input.histname = NULL,						\
-    .u.input.result = NULL						\
+    .u = {								\
+	.input = {							\
+	    .text = NULL,						\
+	    .len = 0,							\
+	    .flags = 0,							\
+	    .histname = NULL,						\
+	    .result = NULL						\
+	}								\
+    }									\
 }
 
 typedef struct {
diff --git a/syntax/Makefile.am b/syntax/Makefile.am
index 8eec579..df707d9 100644
--- a/syntax/Makefile.am
+++ b/syntax/Makefile.am
@@ -1,40 +1,43 @@
 SYNTAXFILES =			\
+	PKGBUILD.syntax		\
 	ada95.syntax		\
-	awk.syntax		\
 	aspx.syntax		\
 	assembler.syntax	\
+	awk.syntax		\
 	c.syntax		\
 	changelog.syntax	\
-	debian-changelog.syntax	\
-	debian-control.syntax	\
-	debian-description.syntax \
-	debian-sources-list.syntax \
 	cs.syntax		\
 	css.syntax		\
 	cxx.syntax		\
 	d.syntax		\
+	debian-changelog.syntax	\
+	debian-control.syntax	\
+	debian-description.syntax	\
+	debian-sources-list.syntax	\
 	diff.syntax		\
 	dos.syntax		\
 	ebuild.syntax		\
 	eiffel.syntax		\
 	erlang.syntax		\
 	f90.syntax		\
+	filehighlight.syntax	\
 	fortran.syntax		\
 	haskell.syntax		\
 	html.syntax		\
 	idl.syntax		\
+	j.syntax		\
 	java.syntax		\
 	js.syntax		\
 	latex.syntax		\
 	lisp.syntax		\
 	lsm.syntax		\
 	lua.syntax		\
-	nemerle.syntax		\
 	m4.syntax		\
 	mail.syntax		\
 	makefile.syntax		\
 	ml.syntax		\
-	named.syntax    	\
+	named.syntax		\
+	nemerle.syntax		\
 	nroff.syntax		\
 	octave.syntax		\
 	pascal.syntax		\
@@ -43,22 +46,26 @@ SYNTAXFILES =			\
 	po.syntax		\
 	povray.syntax		\
 	procmail.syntax		\
+	properties.syntax	\
 	python.syntax		\
 	ruby.syntax		\
 	sh.syntax		\
-	smalltalk.syntax	\
 	slang.syntax		\
+	smalltalk.syntax	\
 	spec.syntax		\
-	strace.syntax 		\
 	sql.syntax		\
+	strace.syntax 		\
 	swig.syntax		\
 	syntax.syntax		\
 	tcl.syntax		\
 	texinfo.syntax		\
+	tt.syntax		\
+	unknown.syntax		\
 	verilog.syntax		\
 	vhdl.syntax		\
-	unknown.syntax		\
-	xml.syntax
+	xml.syntax		\
+	yum-repo.syntax		\
+	yxx.syntax
 
 SYNTAXCONFFILES =		\
 	Syntax
diff --git a/syntax/Syntax b/syntax/Syntax
index 4337a46..0ae014c 100644
--- a/syntax/Syntax
+++ b/syntax/Syntax
@@ -58,6 +58,9 @@ include html.syntax
 file ..\*\\.(xml|XML|xsd|XSD|xslt?|XSLT?|dtd|DTD|qpg|qpg.in)$ XML\sdocument (\\?xml\sversion|!DOCTYPE\s)
 include xml.syntax
 
+file ..\*\\.(tt|TT)$ Template::Toolkit\sFile
+include tt.syntax
+
 file (.\*[Mm]akefile[\\\.A-Za-z0-9]\*|..\*\\.mk|Kbuild)$ Makefile
 include makefile.syntax
 
diff --git a/vfs/ftpfs.c b/vfs/ftpfs.c
index 846890a..9917fa8 100644
--- a/vfs/ftpfs.c
+++ b/vfs/ftpfs.c
@@ -89,6 +89,7 @@ What to do with this?
 #include "../src/main.h"	/* print_vfs_message */
 #include "../src/history.h"
 #include "../src/setup.h"	/* for load_anon_passwd */
+#include "../src/mcconfig/mcconfig.h"
 
 #include "utilvfs.h"
 #include "xdirentry.h"
@@ -1655,9 +1656,18 @@ ftpfs_init_passwd(void)
 static int ftpfs_chmod (struct vfs_class *me, const char *path, int mode)
 {
     char buf[BUF_SMALL];
+    int ret;
 
     g_snprintf(buf, sizeof(buf), "SITE CHMOD %4.4o /%%s", mode & 07777);
-    return ftpfs_send_command(me, path, buf, OPT_FLUSH);
+
+    ret = ftpfs_send_command(me, path, buf, OPT_FLUSH);
+
+    if ( mc_config_get_bool (mc_main_config, CONFIG_APP_SECTION,
+            "ignore_ftp_chattr_errors", TRUE)) {
+        return 0;
+    }
+
+    return ret;
 }
 
 static int ftpfs_chown (struct vfs_class *me, const char *path, int owner, int group)
diff --git a/vfs/mcserv.c b/vfs/mcserv.c
index 4c4986a..5fedc55 100644
--- a/vfs/mcserv.c
+++ b/vfs/mcserv.c
@@ -42,6 +42,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
+#include <fcntl.h>
 #ifdef HAVE_LIMITS_H
 #    include <limits.h>
 #endif
@@ -297,13 +298,13 @@ do_close (void)
 /* {{{ Stat family routines */
 
 static void
-send_time (int sock, time_t time)
+send_time (int sock, time_t t)
 {
     if (clnt_version == 1) {
 	char *ct;
 	int month;
 
-	ct = ctime (&time);
+	ct = ctime (&t);
 	ct[3] = ct[10] = ct[13] = ct[16] = ct[19] = 0;
 
 	/* Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec */
@@ -326,7 +327,7 @@ send_time (int sock, time_t time)
 	    month = 10;
 	} else
 	    month = 11;
-	rpc_send (msock, RPC_INT, atoi (&ct[17]),	/* sec */
+	rpc_send (sock, RPC_INT, atoi (&ct[17]),	/* sec */
 		  RPC_INT, atoi (&ct[14]),	/* min */
 		  RPC_INT, atoi (&ct[11]),	/* hour */
 		  RPC_INT, atoi (&ct[8]),	/* mday */
@@ -334,11 +335,11 @@ send_time (int sock, time_t time)
 		  RPC_INT, month,	/* month */
 		  RPC_END);
     } else {
-	long ltime = (long) time;
+	long ltime = (long) t;
 	char buf[BUF_SMALL];
 
 	snprintf (buf, sizeof (buf), "%lx", ltime);
-	rpc_send (msock, RPC_STRING, buf, RPC_END);
+	rpc_send (sock, RPC_STRING, buf, RPC_END);
     }
 }
 
@@ -594,16 +595,16 @@ do_mknod (void)
 static void
 do_readlink (void)
 {
-    char buffer[2048];
+    char buf[2048];
     char *file;
     int n;
 
     rpc_get (msock, RPC_STRING, &file, RPC_END);
-    n = readlink (file, buffer, 2048 - 1);
+    n = readlink (file, buf, 2048 - 1);
     send_status (n, errno);
     if (n >= 0) {
-	buffer[n] = 0;
-	rpc_send (msock, RPC_STRING, buffer, RPC_END);
+	buf[n] = 0;
+	rpc_send (msock, RPC_STRING, buf, RPC_END);
     }
     g_free (file);
 }
@@ -818,12 +819,12 @@ mc_pam_auth (const char *username, const char *password)
 
 /* Keep reading until we find a \n */
 static int
-next_line (int socket)
+next_line (int sock)
 {
     char c;
 
     while (1) {
-	if (read (socket, &c, 1) <= 0)
+	if (read (sock, &c, 1) <= 0)
 	    return 0;
 	if (c == '\n')
 	    return 1;
@@ -1048,15 +1049,16 @@ do_rauth (int socket)
 #endif
 
 static int
-do_rauth (int msock)
+do_rauth (int sock)
 {
+    sock = 0;	/* prevent warning */
     return 0;
 }
 
 static void
-login_reply (int logged_in)
+login_reply (int _logged_in)
 {
-    rpc_send (msock, RPC_INT, logged_in ? MC_LOGINOK : MC_INVALID_PASS,
+    rpc_send (msock, RPC_INT, _logged_in ? MC_LOGINOK : MC_INVALID_PASS,
 	      RPC_END);
 }
 
@@ -1168,7 +1170,7 @@ void
 tcp_invalidate_socket (int sock)
 {
     if (verbose)
-	printf ("Connection closed\n");
+	printf ("Connection closed [socket %d]\n", sock);
     DO_QUIT_VOID ();
 }
 
@@ -1193,7 +1195,7 @@ server (int sock)
 /* {{{ Net support code */
 
 static const char *
-get_client (int portnum)
+get_client (int port)
 {
     int sock, newsocket;
     unsigned int clilen;
@@ -1211,7 +1213,7 @@ get_client (int portnum)
     memset ((char *) &server_address, 0, sizeof (server_address));
     server_address.sin_family = AF_INET;
     server_address.sin_addr.s_addr = htonl (INADDR_ANY);
-    server_address.sin_port = htons (portnum);
+    server_address.sin_port = htons (port);
 
     if (bind
 	(sock, (struct sockaddr *) &server_address,
@@ -1285,13 +1287,13 @@ get_port_number (void)
 }
 
 static void
-register_port (int portnum, int abort_if_fail)
+register_port (int port, int abort_if_fail)
 {
 #ifdef HAVE_PMAP_SET
     /* Register our service with the portmapper */
     /* protocol: pmap_set (prognum, versnum, protocol, portp) */
 
-    if (pmap_set (RPC_PROGNUM, RPC_PROGVER, IPPROTO_TCP, portnum))
+    if (pmap_set (RPC_PROGNUM, RPC_PROGVER, IPPROTO_TCP, port))
 	signal (SIGINT, signal_int_handler);
     else {
 	fprintf (stderr, "Cannot register service with portmapper\n");
diff --git a/vfs/samba/configure.ac b/vfs/samba/configure.ac
index 3a9e1fb..a6c5dbe 100644
--- a/vfs/samba/configure.ac
+++ b/vfs/samba/configure.ac
@@ -142,7 +142,7 @@ fi
 AC_CHECK_FUNCS(waitpid getcwd strdup strtoul strerror chown chmod)
 AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset)
 AC_CHECK_FUNCS(memmove vsnprintf snprintf setsid glob pipe crypt16 getauthuid)
-AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent)
+AC_CHECK_FUNCS(sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent)
 AC_CHECK_FUNCS(initgroups select rdchk getgrnam pathconf)
 AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups mktime rename ftruncate)
 AC_CHECK_FUNCS(grantpt dup2 yp_get_default_domain getpwanam)
diff --git a/vfs/samba/lib/time.c b/vfs/samba/lib/time.c
index c76af3b..088d6bc 100644
--- a/vfs/samba/lib/time.c
+++ b/vfs/samba/lib/time.c
@@ -493,11 +493,7 @@ char *http_timestring(time_t t)
   if (!tm)
     slprintf(buf,sizeof(buf)-1,"%ld seconds since the Epoch",(long)t);
   else
-#ifndef HAVE_STRFTIME
-  fstrcpy(buf, asctime(tm));
-#else /* !HAVE_STRFTIME */
   strftime(buf, sizeof(buf)-1, "%a, %d %b %Y %H:%M:%S %Z", tm);
-#endif /* !HAVE_STRFTIME */
   return buf;
 }
 #endif /*0 */
@@ -515,11 +511,7 @@ char *timestring(void )
 	if (!tm) {
 		slprintf(TimeBuf,sizeof(TimeBuf)-1,"%ld seconds since the Epoch",(long)t);
 	} else {
-#ifdef HAVE_STRFTIME
 		strftime(TimeBuf,100,"%Y/%m/%d %H:%M:%S",tm);
-#else
-		fstrcpy(TimeBuf, asctime(tm));
-#endif
 	}
 	return(TimeBuf);
 }
diff --git a/vfs/undelfs.c b/vfs/undelfs.c
index c2c5313..3f45570 100644
--- a/vfs/undelfs.c
+++ b/vfs/undelfs.c
@@ -158,20 +158,20 @@ undelfs_get_path (const char *dirname, char **fsname, char **file)
 }
 
 static int
-undelfs_lsdel_proc(ext2_filsys fs, blk_t *block_nr, int blockcnt, void *private)
+undelfs_lsdel_proc(ext2_filsys _fs, blk_t *block_nr, int blockcnt, void *private)
 {
-    struct lsdel_struct *lsd = (struct lsdel_struct *) private;
+    struct lsdel_struct *_lsd = (struct lsdel_struct *) private;
     (void) blockcnt;
-    lsd->num_blocks++;
+    _lsd->num_blocks++;
     
-    if (*block_nr < fs->super->s_first_data_block ||
-	*block_nr >= fs->super->s_blocks_count) {
-	lsd->bad_blocks++;
+    if (*block_nr < _fs->super->s_first_data_block ||
+	*block_nr >= _fs->super->s_blocks_count) {
+	_lsd->bad_blocks++;
 	return BLOCK_ABORT;
     }
     
-    if (!ext2fs_test_block_bitmap(fs->block_map,*block_nr))
-	lsd->free_blocks++;
+    if (!ext2fs_test_block_bitmap(_fs->block_map,*block_nr))
+	_lsd->free_blocks++;
     
     return 0;
 }
diff --git a/vfs/utilvfs.h b/vfs/utilvfs.h
index 5747ee3..60b7a1a 100644
--- a/vfs/utilvfs.h
+++ b/vfs/utilvfs.h
@@ -11,6 +11,8 @@
 
 #include <sys/stat.h>
 
+#include "../src/global.h"
+
 /* Flags for vfs_split_url() */
 #define URL_ALLOW_ANON 1
 #define URL_NOSLASH 2
diff --git a/vfs/vfs-impl.h b/vfs/vfs-impl.h
index e615647..00c752f 100644
--- a/vfs/vfs-impl.h
+++ b/vfs/vfs-impl.h
@@ -11,6 +11,8 @@
 
 #include <sys/types.h>
 #include <dirent.h>
+#include <stddef.h>
+#include <utime.h>
 
 #include "../src/fs.h"		/* MC_MAXPATHLEN */
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin