diff -ruN mc-4.6.2.orig/debian/patches/all.series mc-4.6.2/debian/patches/all.series --- mc-4.6.2.orig/debian/patches/all.series 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/all.series 2008-11-27 01:00:21.000000000 +0200 @@ -27,7 +27,6 @@ syntax/08_c-vs-cxx.patch syntax/09_spec-syntax.patch syntax/10_vhdl-syntax.patch -syntax/12_asm-syntax.patch syntax/11_mail-syntax.patch syntax/13_procmail-syntax.patch utf8/mc-utf8.patch diff -ruN mc-4.6.2.orig/debian/patches/autgen-run.patch mc-4.6.2/debian/patches/autgen-run.patch --- mc-4.6.2.orig/debian/patches/autgen-run.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/autgen-run.patch 2008-11-27 01:00:21.000000000 +0200 @@ -138964,31 +138964,6 @@ am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) -diff -Nurwd orig/mc-4.6.2~git20080311/m4/codeset.m4~ mc-4.6.2~git20080311/m4/codeset.m4~ ---- orig/mc-4.6.2~git20080311/m4/codeset.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/codeset.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,21 @@ -+# codeset.m4 serial 2 (gettext-0.16) -+dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+AC_DEFUN([AM_LANGINFO_CODESET], -+[ -+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, -+ [AC_TRY_LINK([#include ], -+ [char* cs = nl_langinfo(CODESET); return !cs;], -+ am_cv_langinfo_codeset=yes, -+ am_cv_langinfo_codeset=no) -+ ]) -+ if test $am_cv_langinfo_codeset = yes; then -+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1, -+ [Define if you have and nl_langinfo(CODESET).]) -+ fi -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/iconv.m4 mc-4.6.2~git20080311/m4/iconv.m4 --- orig/mc-4.6.2~git20080311/m4/iconv.m4 2008-06-17 11:55:44.000000000 +0200 +++ mc-4.6.2~git20080311/m4/iconv.m4 2008-06-17 12:00:46.000000000 +0200 @@ -139104,190 +139079,6 @@ fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) -diff -Nurwd orig/mc-4.6.2~git20080311/m4/iconv.m4~ mc-4.6.2~git20080311/m4/iconv.m4~ ---- orig/mc-4.6.2~git20080311/m4/iconv.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/iconv.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,180 @@ -+# iconv.m4 serial AM6 (gettext-0.16.2) -+dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], -+[ -+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. -+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) -+ AC_REQUIRE([AC_LIB_RPATH]) -+ -+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV -+ dnl accordingly. -+ AC_LIB_LINKFLAGS_BODY([iconv]) -+]) -+ -+AC_DEFUN([AM_ICONV_LINK], -+[ -+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and -+ dnl those with the standalone portable GNU libiconv installed). -+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles -+ -+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV -+ dnl accordingly. -+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) -+ -+ dnl Add $INCICONV to CPPFLAGS before performing the following checks, -+ dnl because if the user has installed libiconv and not disabled its use -+ dnl via --without-libiconv-prefix, he wants to use it. The first -+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. -+ am_save_CPPFLAGS="$CPPFLAGS" -+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) -+ -+ AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ -+ am_cv_func_iconv="no, consider installing GNU libiconv" -+ am_cv_lib_iconv=no -+ AC_TRY_LINK([#include -+#include ], -+ [iconv_t cd = iconv_open("",""); -+ iconv(cd,NULL,NULL,NULL,NULL); -+ iconv_close(cd);], -+ am_cv_func_iconv=yes) -+ if test "$am_cv_func_iconv" != yes; then -+ am_save_LIBS="$LIBS" -+ LIBS="$LIBS $LIBICONV" -+ AC_TRY_LINK([#include -+#include ], -+ [iconv_t cd = iconv_open("",""); -+ iconv(cd,NULL,NULL,NULL,NULL); -+ iconv_close(cd);], -+ am_cv_lib_iconv=yes -+ am_cv_func_iconv=yes) -+ LIBS="$am_save_LIBS" -+ fi -+ ]) -+ if test "$am_cv_func_iconv" = yes; then -+ AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ -+ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. -+ am_save_LIBS="$LIBS" -+ if test $am_cv_lib_iconv = yes; then -+ LIBS="$LIBS $LIBICONV" -+ fi -+ AC_TRY_RUN([ -+#include -+#include -+int main () -+{ -+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful -+ returns. */ -+ { -+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); -+ if (cd_utf8_to_88591 != (iconv_t)(-1)) -+ { -+ static const char input[] = "\342\202\254"; /* EURO SIGN */ -+ char buf[10]; -+ const char *inptr = input; -+ size_t inbytesleft = strlen (input); -+ char *outptr = buf; -+ size_t outbytesleft = sizeof (buf); -+ size_t res = iconv (cd_utf8_to_88591, -+ (char **) &inptr, &inbytesleft, -+ &outptr, &outbytesleft); -+ if (res == 0) -+ return 1; -+ } -+ } -+#if 0 /* This bug could be worked around by the caller. */ -+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ -+ { -+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); -+ if (cd_88591_to_utf8 != (iconv_t)(-1)) -+ { -+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; -+ char buf[50]; -+ const char *inptr = input; -+ size_t inbytesleft = strlen (input); -+ char *outptr = buf; -+ size_t outbytesleft = sizeof (buf); -+ size_t res = iconv (cd_88591_to_utf8, -+ (char **) &inptr, &inbytesleft, -+ &outptr, &outbytesleft); -+ if ((int)res > 0) -+ return 1; -+ } -+ } -+#endif -+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is -+ provided. */ -+ if (/* Try standardized names. */ -+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) -+ /* Try IRIX, OSF/1 names. */ -+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) -+ /* Try AIX names. */ -+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) -+ /* Try HP-UX names. */ -+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) -+ return 1; -+ return 0; -+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], -+ [case "$host_os" in -+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; -+ *) am_cv_func_iconv_works="guessing yes" ;; -+ esac]) -+ LIBS="$am_save_LIBS" -+ ]) -+ case "$am_cv_func_iconv_works" in -+ *no) am_func_iconv=no am_cv_lib_iconv=no ;; -+ *) am_func_iconv=yes ;; -+ esac -+ else -+ am_func_iconv=no am_cv_lib_iconv=no -+ fi -+ if test "$am_func_iconv" = yes; then -+ AC_DEFINE(HAVE_ICONV, 1, -+ [Define if you have the iconv() function and it works.]) -+ fi -+ if test "$am_cv_lib_iconv" = yes; then -+ AC_MSG_CHECKING([how to link with libiconv]) -+ AC_MSG_RESULT([$LIBICONV]) -+ else -+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV -+ dnl either. -+ CPPFLAGS="$am_save_CPPFLAGS" -+ LIBICONV= -+ LTLIBICONV= -+ fi -+ AC_SUBST(LIBICONV) -+ AC_SUBST(LTLIBICONV) -+]) -+ -+AC_DEFUN([AM_ICONV], -+[ -+ AM_ICONV_LINK -+ if test "$am_cv_func_iconv" = yes; then -+ AC_MSG_CHECKING([for iconv declaration]) -+ AC_CACHE_VAL(am_cv_proto_iconv, [ -+ AC_TRY_COMPILE([ -+#include -+#include -+extern -+#ifdef __cplusplus -+"C" -+#endif -+#if defined(__STDC__) || defined(__cplusplus) -+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -+#else -+size_t iconv(); -+#endif -+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") -+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) -+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` -+ AC_MSG_RESULT([$]{ac_t:- -+ }[$]am_cv_proto_iconv) -+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, -+ [Define as const if the declaration of iconv() needs const.]) -+ fi -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/intdiv0.m4 mc-4.6.2~git20080311/m4/intdiv0.m4 --- orig/mc-4.6.2~git20080311/m4/intdiv0.m4 2008-06-17 11:55:44.000000000 +0200 +++ mc-4.6.2~git20080311/m4/intdiv0.m4 2008-06-17 12:00:46.000000000 +0200 @@ -139349,94 +139140,6 @@ ]) case "$gt_cv_int_divbyzero_sigfpe" in *yes) value=1;; -diff -Nurwd orig/mc-4.6.2~git20080311/m4/intdiv0.m4~ mc-4.6.2~git20080311/m4/intdiv0.m4~ ---- orig/mc-4.6.2~git20080311/m4/intdiv0.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/intdiv0.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,84 @@ -+# intdiv0.m4 serial 2 (gettext-0.16.2) -+dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+AC_DEFUN([gt_INTDIV0], -+[ -+ AC_REQUIRE([AC_PROG_CC])dnl -+ AC_REQUIRE([AC_CANONICAL_HOST])dnl -+ -+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], -+ gt_cv_int_divbyzero_sigfpe, -+ [ -+ gt_cv_int_divbyzero_sigfpe= -+changequote(,)dnl -+ case "$host_os" in -+ macos* | darwin[6-9]* | darwin[1-9][0-9]*) -+ # On MacOS X 10.2 or newer, just assume the same as when cross- -+ # compiling. If we were to perform the real test, 1 Crash Report -+ # dialog window would pop up. -+ case "$host_cpu" in -+ i[34567]86 | x86_64) -+ gt_cv_int_divbyzero_sigfpe="guessing yes" ;; -+ esac -+ ;; -+ esac -+changequote([,])dnl -+ if test -z "$gt_cv_int_divbyzero_sigfpe"; then -+ AC_TRY_RUN([ -+#include -+#include -+ -+static void -+sigfpe_handler (int sig) -+{ -+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ -+ exit (sig != SIGFPE); -+} -+ -+int x = 1; -+int y = 0; -+int z; -+int nan; -+ -+int main () -+{ -+ signal (SIGFPE, sigfpe_handler); -+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ -+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) -+ signal (SIGTRAP, sigfpe_handler); -+#endif -+/* Linux/SPARC yields signal SIGILL. */ -+#if defined (__sparc__) && defined (__linux__) -+ signal (SIGILL, sigfpe_handler); -+#endif -+ -+ z = x / y; -+ nan = y / y; -+ exit (1); -+} -+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, -+ [ -+ # Guess based on the CPU. -+changequote(,)dnl -+ case "$host_cpu" in -+ alpha* | i[34567]86 | x86_64 | m68k | s390*) -+ gt_cv_int_divbyzero_sigfpe="guessing yes";; -+ *) -+ gt_cv_int_divbyzero_sigfpe="guessing no";; -+ esac -+changequote([,])dnl -+ ]) -+ fi -+ ]) -+ case "$gt_cv_int_divbyzero_sigfpe" in -+ *yes) value=1;; -+ *) value=0;; -+ esac -+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, -+ [Define if integer division by zero raises signal SIGFPE.]) -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/intmax.m4 mc-4.6.2~git20080311/m4/intmax.m4 --- orig/mc-4.6.2~git20080311/m4/intmax.m4 2008-06-17 11:55:44.000000000 +0200 +++ mc-4.6.2~git20080311/m4/intmax.m4 2008-06-17 12:00:46.000000000 +0200 @@ -139458,43 +139161,6 @@ if test $gt_cv_c_intmax_t = yes; then AC_DEFINE(HAVE_INTMAX_T, 1, [Define if you have the 'intmax_t' type in or .]) -diff -Nurwd orig/mc-4.6.2~git20080311/m4/intmax.m4~ mc-4.6.2~git20080311/m4/intmax.m4~ ---- orig/mc-4.6.2~git20080311/m4/intmax.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/intmax.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,33 @@ -+# intmax.m4 serial 3 (gettext-0.16) -+dnl Copyright (C) 2002-2005 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+dnl Test whether the system has the 'intmax_t' type, but don't attempt to -+dnl find a replacement if it is lacking. -+ -+AC_DEFUN([gt_TYPE_INTMAX_T], -+[ -+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) -+ AC_REQUIRE([gl_AC_HEADER_STDINT_H]) -+ AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, -+ [AC_TRY_COMPILE([ -+#include -+#include -+#if HAVE_STDINT_H_WITH_UINTMAX -+#include -+#endif -+#if HAVE_INTTYPES_H_WITH_UINTMAX -+#include -+#endif -+], [intmax_t x = -1; -+ return !x;], -+ gt_cv_c_intmax_t=yes, -+ gt_cv_c_intmax_t=no)]) -+ if test $gt_cv_c_intmax_t = yes; then -+ AC_DEFINE(HAVE_INTMAX_T, 1, -+ [Define if you have the 'intmax_t' type in or .]) -+ fi -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/inttypes_h.m4 mc-4.6.2~git20080311/m4/inttypes_h.m4 --- orig/mc-4.6.2~git20080311/m4/inttypes_h.m4 2008-06-17 11:55:44.000000000 +0200 +++ mc-4.6.2~git20080311/m4/inttypes_h.m4 2008-06-17 12:00:46.000000000 +0200 @@ -139515,36 +139181,6 @@ gl_cv_header_inttypes_h=yes, gl_cv_header_inttypes_h=no)]) if test $gl_cv_header_inttypes_h = yes; then -diff -Nurwd orig/mc-4.6.2~git20080311/m4/inttypes_h.m4~ mc-4.6.2~git20080311/m4/inttypes_h.m4~ ---- orig/mc-4.6.2~git20080311/m4/inttypes_h.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/inttypes_h.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,26 @@ -+# inttypes_h.m4 serial 7 -+dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Paul Eggert. -+ -+# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, -+# doesn't clash with , and declares uintmax_t. -+ -+AC_DEFUN([gl_AC_HEADER_INTTYPES_H], -+[ -+ AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, -+ [AC_TRY_COMPILE( -+ [#include -+#include ], -+ [uintmax_t i = (uintmax_t) -1; return !i;], -+ gl_cv_header_inttypes_h=yes, -+ gl_cv_header_inttypes_h=no)]) -+ if test $gl_cv_header_inttypes_h = yes; then -+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, -+ [Define if exists, doesn't clash with , -+ and declares uintmax_t. ]) -+ fi -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/inttypes-pri.m4 mc-4.6.2~git20080311/m4/inttypes-pri.m4 --- orig/mc-4.6.2~git20080311/m4/inttypes-pri.m4 2008-06-17 11:55:44.000000000 +0200 +++ mc-4.6.2~git20080311/m4/inttypes-pri.m4 2008-06-17 12:00:46.000000000 +0200 @@ -139583,46 +139219,6 @@ fi - AC_SUBST([PRI_MACROS_BROKEN]) ]) -diff -Nurwd orig/mc-4.6.2~git20080311/m4/inttypes-pri.m4~ mc-4.6.2~git20080311/m4/inttypes-pri.m4~ ---- orig/mc-4.6.2~git20080311/m4/inttypes-pri.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/inttypes-pri.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,36 @@ -+# inttypes-pri.m4 serial 4 (gettext-0.16) -+dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+AC_PREREQ(2.52) -+ -+# Define PRI_MACROS_BROKEN if exists and defines the PRI* -+# macros to non-string values. This is the case on AIX 4.3.3. -+ -+AC_DEFUN([gt_INTTYPES_PRI], -+[ -+ AC_CHECK_HEADERS([inttypes.h]) -+ if test $ac_cv_header_inttypes_h = yes; then -+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], -+ gt_cv_inttypes_pri_broken, -+ [ -+ AC_TRY_COMPILE([#include -+#ifdef PRId32 -+char *p = PRId32; -+#endif -+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) -+ ]) -+ fi -+ if test "$gt_cv_inttypes_pri_broken" = yes; then -+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, -+ [Define if exists and defines unusable PRI* macros.]) -+ PRI_MACROS_BROKEN=1 -+ else -+ PRI_MACROS_BROKEN=0 -+ fi -+ AC_SUBST([PRI_MACROS_BROKEN]) -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/isc-posix.m4 mc-4.6.2~git20080311/m4/isc-posix.m4 --- orig/mc-4.6.2~git20080311/m4/isc-posix.m4 1970-01-01 00:00:00.000000000 +0000 +++ mc-4.6.2~git20080311/m4/isc-posix.m4 2008-06-17 12:00:46.000000000 +0200 @@ -140088,719 +139684,6 @@ - fi - AC_SUBST([$1]) -]) -diff -Nurwd orig/mc-4.6.2~git20080311/m4/lib-link.m4~ mc-4.6.2~git20080311/m4/lib-link.m4~ ---- orig/mc-4.6.2~git20080311/m4/lib-link.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/lib-link.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,709 @@ -+# lib-link.m4 serial 13 (gettext-0.16.2) -+dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+AC_PREREQ(2.54) -+ -+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and -+dnl the libraries corresponding to explicit and implicit dependencies. -+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and -+dnl augments the CPPFLAGS variable. -+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname -+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -+AC_DEFUN([AC_LIB_LINKFLAGS], -+[ -+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) -+ AC_REQUIRE([AC_LIB_RPATH]) -+ define([Name],[translit([$1],[./-], [___])]) -+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], -+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) -+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ -+ AC_LIB_LINKFLAGS_BODY([$1], [$2]) -+ ac_cv_lib[]Name[]_libs="$LIB[]NAME" -+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" -+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME" -+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" -+ ]) -+ LIB[]NAME="$ac_cv_lib[]Name[]_libs" -+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" -+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags" -+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" -+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) -+ AC_SUBST([LIB]NAME) -+ AC_SUBST([LTLIB]NAME) -+ AC_SUBST([LIB]NAME[_PREFIX]) -+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the -+ dnl results of this search when this library appears as a dependency. -+ HAVE_LIB[]NAME=yes -+ undefine([Name]) -+ undefine([NAME]) -+]) -+ -+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) -+dnl searches for libname and the libraries corresponding to explicit and -+dnl implicit dependencies, together with the specified include files and -+dnl the ability to compile and link the specified testcode. If found, it -+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and -+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and -+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs -+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. -+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname -+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], -+[ -+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) -+ AC_REQUIRE([AC_LIB_RPATH]) -+ define([Name],[translit([$1],[./-], [___])]) -+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], -+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) -+ -+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME -+ dnl accordingly. -+ AC_LIB_LINKFLAGS_BODY([$1], [$2]) -+ -+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, -+ dnl because if the user has installed lib[]Name and not disabled its use -+ dnl via --without-lib[]Name-prefix, he wants to use it. -+ ac_save_CPPFLAGS="$CPPFLAGS" -+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) -+ -+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ -+ ac_save_LIBS="$LIBS" -+ LIBS="$LIBS $LIB[]NAME" -+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) -+ LIBS="$ac_save_LIBS" -+ ]) -+ if test "$ac_cv_lib[]Name" = yes; then -+ HAVE_LIB[]NAME=yes -+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) -+ AC_MSG_CHECKING([how to link with lib[]$1]) -+ AC_MSG_RESULT([$LIB[]NAME]) -+ else -+ HAVE_LIB[]NAME=no -+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need -+ dnl $INC[]NAME either. -+ CPPFLAGS="$ac_save_CPPFLAGS" -+ LIB[]NAME= -+ LTLIB[]NAME= -+ LIB[]NAME[]_PREFIX= -+ fi -+ AC_SUBST([HAVE_LIB]NAME) -+ AC_SUBST([LIB]NAME) -+ AC_SUBST([LTLIB]NAME) -+ AC_SUBST([LIB]NAME[_PREFIX]) -+ undefine([Name]) -+ undefine([NAME]) -+]) -+ -+dnl Determine the platform dependent parameters needed to use rpath: -+dnl acl_libext, -+dnl acl_shlibext, -+dnl acl_hardcode_libdir_flag_spec, -+dnl acl_hardcode_libdir_separator, -+dnl acl_hardcode_direct, -+dnl acl_hardcode_minus_L. -+AC_DEFUN([AC_LIB_RPATH], -+[ -+ dnl Tell automake >= 1.10 to complain if config.rpath is missing. -+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) -+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS -+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld -+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host -+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir -+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ -+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ -+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh -+ . ./conftest.sh -+ rm -f ./conftest.sh -+ acl_cv_rpath=done -+ ]) -+ wl="$acl_cv_wl" -+ acl_libext="$acl_cv_libext" -+ acl_shlibext="$acl_cv_shlibext" -+ acl_libname_spec="$acl_cv_libname_spec" -+ acl_library_names_spec="$acl_cv_library_names_spec" -+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" -+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" -+ acl_hardcode_direct="$acl_cv_hardcode_direct" -+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" -+ dnl Determine whether the user wants rpath handling at all. -+ AC_ARG_ENABLE(rpath, -+ [ --disable-rpath do not hardcode runtime library paths], -+ :, enable_rpath=yes) -+]) -+ -+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and -+dnl the libraries corresponding to explicit and implicit dependencies. -+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. -+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found -+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -+AC_DEFUN([AC_LIB_LINKFLAGS_BODY], -+[ -+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) -+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], -+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) -+ dnl Autoconf >= 2.61 supports dots in --with options. -+ define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) -+ dnl By default, look in $includedir and $libdir. -+ use_additional=yes -+ AC_LIB_WITH_FINAL_PREFIX([ -+ eval additional_includedir=\"$includedir\" -+ eval additional_libdir=\"$libdir\" -+ ]) -+ AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], -+[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib -+ --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], -+[ -+ if test "X$withval" = "Xno"; then -+ use_additional=no -+ else -+ if test "X$withval" = "X"; then -+ AC_LIB_WITH_FINAL_PREFIX([ -+ eval additional_includedir=\"$includedir\" -+ eval additional_libdir=\"$libdir\" -+ ]) -+ else -+ additional_includedir="$withval/include" -+ additional_libdir="$withval/$acl_libdirstem" -+ fi -+ fi -+]) -+ dnl Search the library and its dependencies in $additional_libdir and -+ dnl $LDFLAGS. Using breadth-first-seach. -+ LIB[]NAME= -+ LTLIB[]NAME= -+ INC[]NAME= -+ LIB[]NAME[]_PREFIX= -+ rpathdirs= -+ ltrpathdirs= -+ names_already_handled= -+ names_next_round='$1 $2' -+ while test -n "$names_next_round"; do -+ names_this_round="$names_next_round" -+ names_next_round= -+ for name in $names_this_round; do -+ already_handled= -+ for n in $names_already_handled; do -+ if test "$n" = "$name"; then -+ already_handled=yes -+ break -+ fi -+ done -+ if test -z "$already_handled"; then -+ names_already_handled="$names_already_handled $name" -+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS -+ dnl or AC_LIB_HAVE_LINKFLAGS call. -+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` -+ eval value=\"\$HAVE_LIB$uppername\" -+ if test -n "$value"; then -+ if test "$value" = yes; then -+ eval value=\"\$LIB$uppername\" -+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" -+ eval value=\"\$LTLIB$uppername\" -+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" -+ else -+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined -+ dnl that this library doesn't exist. So just drop it. -+ : -+ fi -+ else -+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS -+ dnl and the already constructed $LIBNAME/$LTLIBNAME. -+ found_dir= -+ found_la= -+ found_so= -+ found_a= -+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name -+ if test -n "$acl_shlibext"; then -+ shrext=".$acl_shlibext" # typically: shrext=.so -+ else -+ shrext= -+ fi -+ if test $use_additional = yes; then -+ dir="$additional_libdir" -+ dnl The same code as in the loop below: -+ dnl First look for a shared library. -+ if test -n "$acl_shlibext"; then -+ if test -f "$dir/$libname$shrext"; then -+ found_dir="$dir" -+ found_so="$dir/$libname$shrext" -+ else -+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then -+ ver=`(cd "$dir" && \ -+ for f in "$libname$shrext".*; do echo "$f"; done \ -+ | sed -e "s,^$libname$shrext\\\\.,," \ -+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ -+ | sed 1q ) 2>/dev/null` -+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then -+ found_dir="$dir" -+ found_so="$dir/$libname$shrext.$ver" -+ fi -+ else -+ eval library_names=\"$acl_library_names_spec\" -+ for f in $library_names; do -+ if test -f "$dir/$f"; then -+ found_dir="$dir" -+ found_so="$dir/$f" -+ break -+ fi -+ done -+ fi -+ fi -+ fi -+ dnl Then look for a static library. -+ if test "X$found_dir" = "X"; then -+ if test -f "$dir/$libname.$acl_libext"; then -+ found_dir="$dir" -+ found_a="$dir/$libname.$acl_libext" -+ fi -+ fi -+ if test "X$found_dir" != "X"; then -+ if test -f "$dir/$libname.la"; then -+ found_la="$dir/$libname.la" -+ fi -+ fi -+ fi -+ if test "X$found_dir" = "X"; then -+ for x in $LDFLAGS $LTLIB[]NAME; do -+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) -+ case "$x" in -+ -L*) -+ dir=`echo "X$x" | sed -e 's/^X-L//'` -+ dnl First look for a shared library. -+ if test -n "$acl_shlibext"; then -+ if test -f "$dir/$libname$shrext"; then -+ found_dir="$dir" -+ found_so="$dir/$libname$shrext" -+ else -+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then -+ ver=`(cd "$dir" && \ -+ for f in "$libname$shrext".*; do echo "$f"; done \ -+ | sed -e "s,^$libname$shrext\\\\.,," \ -+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ -+ | sed 1q ) 2>/dev/null` -+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then -+ found_dir="$dir" -+ found_so="$dir/$libname$shrext.$ver" -+ fi -+ else -+ eval library_names=\"$acl_library_names_spec\" -+ for f in $library_names; do -+ if test -f "$dir/$f"; then -+ found_dir="$dir" -+ found_so="$dir/$f" -+ break -+ fi -+ done -+ fi -+ fi -+ fi -+ dnl Then look for a static library. -+ if test "X$found_dir" = "X"; then -+ if test -f "$dir/$libname.$acl_libext"; then -+ found_dir="$dir" -+ found_a="$dir/$libname.$acl_libext" -+ fi -+ fi -+ if test "X$found_dir" != "X"; then -+ if test -f "$dir/$libname.la"; then -+ found_la="$dir/$libname.la" -+ fi -+ fi -+ ;; -+ esac -+ if test "X$found_dir" != "X"; then -+ break -+ fi -+ done -+ fi -+ if test "X$found_dir" != "X"; then -+ dnl Found the library. -+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" -+ if test "X$found_so" != "X"; then -+ dnl Linking with a shared library. We attempt to hardcode its -+ dnl directory into the executable's runpath, unless it's the -+ dnl standard /usr/lib. -+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then -+ dnl No hardcoding is needed. -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" -+ else -+ dnl Use an explicit option to hardcode DIR into the resulting -+ dnl binary. -+ dnl Potentially add DIR to ltrpathdirs. -+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. -+ haveit= -+ for x in $ltrpathdirs; do -+ if test "X$x" = "X$found_dir"; then -+ haveit=yes -+ break -+ fi -+ done -+ if test -z "$haveit"; then -+ ltrpathdirs="$ltrpathdirs $found_dir" -+ fi -+ dnl The hardcoding into $LIBNAME is system dependent. -+ if test "$acl_hardcode_direct" = yes; then -+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the -+ dnl resulting binary. -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" -+ else -+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then -+ dnl Use an explicit option to hardcode DIR into the resulting -+ dnl binary. -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" -+ dnl Potentially add DIR to rpathdirs. -+ dnl The rpathdirs will be appended to $LIBNAME at the end. -+ haveit= -+ for x in $rpathdirs; do -+ if test "X$x" = "X$found_dir"; then -+ haveit=yes -+ break -+ fi -+ done -+ if test -z "$haveit"; then -+ rpathdirs="$rpathdirs $found_dir" -+ fi -+ else -+ dnl Rely on "-L$found_dir". -+ dnl But don't add it if it's already contained in the LDFLAGS -+ dnl or the already constructed $LIBNAME -+ haveit= -+ for x in $LDFLAGS $LIB[]NAME; do -+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) -+ if test "X$x" = "X-L$found_dir"; then -+ haveit=yes -+ break -+ fi -+ done -+ if test -z "$haveit"; then -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" -+ fi -+ if test "$acl_hardcode_minus_L" != no; then -+ dnl FIXME: Not sure whether we should use -+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" -+ dnl here. -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" -+ else -+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH -+ dnl here, because this doesn't fit in flags passed to the -+ dnl compiler. So give up. No hardcoding. This affects only -+ dnl very old systems. -+ dnl FIXME: Not sure whether we should use -+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" -+ dnl here. -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" -+ fi -+ fi -+ fi -+ fi -+ else -+ if test "X$found_a" != "X"; then -+ dnl Linking with a static library. -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" -+ else -+ dnl We shouldn't come here, but anyway it's good to have a -+ dnl fallback. -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" -+ fi -+ fi -+ dnl Assume the include files are nearby. -+ additional_includedir= -+ case "$found_dir" in -+ */$acl_libdirstem | */$acl_libdirstem/) -+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` -+ LIB[]NAME[]_PREFIX="$basedir" -+ additional_includedir="$basedir/include" -+ ;; -+ esac -+ if test "X$additional_includedir" != "X"; then -+ dnl Potentially add $additional_includedir to $INCNAME. -+ dnl But don't add it -+ dnl 1. if it's the standard /usr/include, -+ dnl 2. if it's /usr/local/include and we are using GCC on Linux, -+ dnl 3. if it's already present in $CPPFLAGS or the already -+ dnl constructed $INCNAME, -+ dnl 4. if it doesn't exist as a directory. -+ if test "X$additional_includedir" != "X/usr/include"; then -+ haveit= -+ if test "X$additional_includedir" = "X/usr/local/include"; then -+ if test -n "$GCC"; then -+ case $host_os in -+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; -+ esac -+ fi -+ fi -+ if test -z "$haveit"; then -+ for x in $CPPFLAGS $INC[]NAME; do -+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) -+ if test "X$x" = "X-I$additional_includedir"; then -+ haveit=yes -+ break -+ fi -+ done -+ if test -z "$haveit"; then -+ if test -d "$additional_includedir"; then -+ dnl Really add $additional_includedir to $INCNAME. -+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" -+ fi -+ fi -+ fi -+ fi -+ fi -+ dnl Look for dependencies. -+ if test -n "$found_la"; then -+ dnl Read the .la file. It defines the variables -+ dnl dlname, library_names, old_library, dependency_libs, current, -+ dnl age, revision, installed, dlopen, dlpreopen, libdir. -+ save_libdir="$libdir" -+ case "$found_la" in -+ */* | *\\*) . "$found_la" ;; -+ *) . "./$found_la" ;; -+ esac -+ libdir="$save_libdir" -+ dnl We use only dependency_libs. -+ for dep in $dependency_libs; do -+ case "$dep" in -+ -L*) -+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` -+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. -+ dnl But don't add it -+ dnl 1. if it's the standard /usr/lib, -+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux, -+ dnl 3. if it's already present in $LDFLAGS or the already -+ dnl constructed $LIBNAME, -+ dnl 4. if it doesn't exist as a directory. -+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then -+ haveit= -+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then -+ if test -n "$GCC"; then -+ case $host_os in -+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; -+ esac -+ fi -+ fi -+ if test -z "$haveit"; then -+ haveit= -+ for x in $LDFLAGS $LIB[]NAME; do -+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) -+ if test "X$x" = "X-L$additional_libdir"; then -+ haveit=yes -+ break -+ fi -+ done -+ if test -z "$haveit"; then -+ if test -d "$additional_libdir"; then -+ dnl Really add $additional_libdir to $LIBNAME. -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" -+ fi -+ fi -+ haveit= -+ for x in $LDFLAGS $LTLIB[]NAME; do -+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) -+ if test "X$x" = "X-L$additional_libdir"; then -+ haveit=yes -+ break -+ fi -+ done -+ if test -z "$haveit"; then -+ if test -d "$additional_libdir"; then -+ dnl Really add $additional_libdir to $LTLIBNAME. -+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" -+ fi -+ fi -+ fi -+ fi -+ ;; -+ -R*) -+ dir=`echo "X$dep" | sed -e 's/^X-R//'` -+ if test "$enable_rpath" != no; then -+ dnl Potentially add DIR to rpathdirs. -+ dnl The rpathdirs will be appended to $LIBNAME at the end. -+ haveit= -+ for x in $rpathdirs; do -+ if test "X$x" = "X$dir"; then -+ haveit=yes -+ break -+ fi -+ done -+ if test -z "$haveit"; then -+ rpathdirs="$rpathdirs $dir" -+ fi -+ dnl Potentially add DIR to ltrpathdirs. -+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. -+ haveit= -+ for x in $ltrpathdirs; do -+ if test "X$x" = "X$dir"; then -+ haveit=yes -+ break -+ fi -+ done -+ if test -z "$haveit"; then -+ ltrpathdirs="$ltrpathdirs $dir" -+ fi -+ fi -+ ;; -+ -l*) -+ dnl Handle this in the next round. -+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` -+ ;; -+ *.la) -+ dnl Handle this in the next round. Throw away the .la's -+ dnl directory; it is already contained in a preceding -L -+ dnl option. -+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` -+ ;; -+ *) -+ dnl Most likely an immediate library name. -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" -+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" -+ ;; -+ esac -+ done -+ fi -+ else -+ dnl Didn't find the library; assume it is in the system directories -+ dnl known to the linker and runtime loader. (All the system -+ dnl directories known to the linker should also be known to the -+ dnl runtime loader, otherwise the system is severely misconfigured.) -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" -+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" -+ fi -+ fi -+ fi -+ done -+ done -+ if test "X$rpathdirs" != "X"; then -+ if test -n "$acl_hardcode_libdir_separator"; then -+ dnl Weird platform: only the last -rpath option counts, the user must -+ dnl pass all path elements in one option. We can arrange that for a -+ dnl single library, but not when more than one $LIBNAMEs are used. -+ alldirs= -+ for found_dir in $rpathdirs; do -+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" -+ done -+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. -+ acl_save_libdir="$libdir" -+ libdir="$alldirs" -+ eval flag=\"$acl_hardcode_libdir_flag_spec\" -+ libdir="$acl_save_libdir" -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" -+ else -+ dnl The -rpath options are cumulative. -+ for found_dir in $rpathdirs; do -+ acl_save_libdir="$libdir" -+ libdir="$found_dir" -+ eval flag=\"$acl_hardcode_libdir_flag_spec\" -+ libdir="$acl_save_libdir" -+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" -+ done -+ fi -+ fi -+ if test "X$ltrpathdirs" != "X"; then -+ dnl When using libtool, the option that works for both libraries and -+ dnl executables is -R. The -R options are cumulative. -+ for found_dir in $ltrpathdirs; do -+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" -+ done -+ fi -+]) -+ -+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, -+dnl unless already present in VAR. -+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes -+dnl contains two or three consecutive elements that belong together. -+AC_DEFUN([AC_LIB_APPENDTOVAR], -+[ -+ for element in [$2]; do -+ haveit= -+ for x in $[$1]; do -+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) -+ if test "X$x" = "X$element"; then -+ haveit=yes -+ break -+ fi -+ done -+ if test -z "$haveit"; then -+ [$1]="${[$1]}${[$1]:+ }$element" -+ fi -+ done -+]) -+ -+dnl For those cases where a variable contains several -L and -l options -+dnl referring to unknown libraries and directories, this macro determines the -+dnl necessary additional linker options for the runtime path. -+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) -+dnl sets LDADDVAR to linker options needed together with LIBSVALUE. -+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, -+dnl otherwise linking without libtool is assumed. -+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], -+[ -+ AC_REQUIRE([AC_LIB_RPATH]) -+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) -+ $1= -+ if test "$enable_rpath" != no; then -+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then -+ dnl Use an explicit option to hardcode directories into the resulting -+ dnl binary. -+ rpathdirs= -+ next= -+ for opt in $2; do -+ if test -n "$next"; then -+ dir="$next" -+ dnl No need to hardcode the standard /usr/lib. -+ if test "X$dir" != "X/usr/$acl_libdirstem"; then -+ rpathdirs="$rpathdirs $dir" -+ fi -+ next= -+ else -+ case $opt in -+ -L) next=yes ;; -+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` -+ dnl No need to hardcode the standard /usr/lib. -+ if test "X$dir" != "X/usr/$acl_libdirstem"; then -+ rpathdirs="$rpathdirs $dir" -+ fi -+ next= ;; -+ *) next= ;; -+ esac -+ fi -+ done -+ if test "X$rpathdirs" != "X"; then -+ if test -n ""$3""; then -+ dnl libtool is used for linking. Use -R options. -+ for dir in $rpathdirs; do -+ $1="${$1}${$1:+ }-R$dir" -+ done -+ else -+ dnl The linker is used for linking directly. -+ if test -n "$acl_hardcode_libdir_separator"; then -+ dnl Weird platform: only the last -rpath option counts, the user -+ dnl must pass all path elements in one option. -+ alldirs= -+ for dir in $rpathdirs; do -+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" -+ done -+ acl_save_libdir="$libdir" -+ libdir="$alldirs" -+ eval flag=\"$acl_hardcode_libdir_flag_spec\" -+ libdir="$acl_save_libdir" -+ $1="$flag" -+ else -+ dnl The -rpath options are cumulative. -+ for dir in $rpathdirs; do -+ acl_save_libdir="$libdir" -+ libdir="$dir" -+ eval flag=\"$acl_hardcode_libdir_flag_spec\" -+ libdir="$acl_save_libdir" -+ $1="${$1}${$1:+ }$flag" -+ done -+ fi -+ fi -+ fi -+ fi -+ fi -+ AC_SUBST([$1]) -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/lib-prefix.m4 mc-4.6.2~git20080311/m4/lib-prefix.m4 --- orig/mc-4.6.2~git20080311/m4/lib-prefix.m4 2008-06-17 11:55:44.000000000 +0200 +++ mc-4.6.2~git20080311/m4/lib-prefix.m4 2008-06-17 12:00:46.000000000 +0200 @@ -140880,195 +139763,6 @@ - IFS="$acl_save_IFS" - fi -]) -diff -Nurwd orig/mc-4.6.2~git20080311/m4/lib-prefix.m4~ mc-4.6.2~git20080311/m4/lib-prefix.m4~ ---- orig/mc-4.6.2~git20080311/m4/lib-prefix.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/lib-prefix.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,185 @@ -+# lib-prefix.m4 serial 5 (gettext-0.15) -+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and -+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't -+dnl require excessive bracketing. -+ifdef([AC_HELP_STRING], -+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], -+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) -+ -+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed -+dnl to access previously installed libraries. The basic assumption is that -+dnl a user will want packages to use other packages he previously installed -+dnl with the same --prefix option. -+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate -+dnl libraries, but is otherwise very convenient. -+AC_DEFUN([AC_LIB_PREFIX], -+[ -+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) -+ AC_REQUIRE([AC_PROG_CC]) -+ AC_REQUIRE([AC_CANONICAL_HOST]) -+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) -+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) -+ dnl By default, look in $includedir and $libdir. -+ use_additional=yes -+ AC_LIB_WITH_FINAL_PREFIX([ -+ eval additional_includedir=\"$includedir\" -+ eval additional_libdir=\"$libdir\" -+ ]) -+ AC_LIB_ARG_WITH([lib-prefix], -+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib -+ --without-lib-prefix don't search for libraries in includedir and libdir], -+[ -+ if test "X$withval" = "Xno"; then -+ use_additional=no -+ else -+ if test "X$withval" = "X"; then -+ AC_LIB_WITH_FINAL_PREFIX([ -+ eval additional_includedir=\"$includedir\" -+ eval additional_libdir=\"$libdir\" -+ ]) -+ else -+ additional_includedir="$withval/include" -+ additional_libdir="$withval/$acl_libdirstem" -+ fi -+ fi -+]) -+ if test $use_additional = yes; then -+ dnl Potentially add $additional_includedir to $CPPFLAGS. -+ dnl But don't add it -+ dnl 1. if it's the standard /usr/include, -+ dnl 2. if it's already present in $CPPFLAGS, -+ dnl 3. if it's /usr/local/include and we are using GCC on Linux, -+ dnl 4. if it doesn't exist as a directory. -+ if test "X$additional_includedir" != "X/usr/include"; then -+ haveit= -+ for x in $CPPFLAGS; do -+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) -+ if test "X$x" = "X-I$additional_includedir"; then -+ haveit=yes -+ break -+ fi -+ done -+ if test -z "$haveit"; then -+ if test "X$additional_includedir" = "X/usr/local/include"; then -+ if test -n "$GCC"; then -+ case $host_os in -+ linux* | gnu* | k*bsd*-gnu) haveit=yes;; -+ esac -+ fi -+ fi -+ if test -z "$haveit"; then -+ if test -d "$additional_includedir"; then -+ dnl Really add $additional_includedir to $CPPFLAGS. -+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" -+ fi -+ fi -+ fi -+ fi -+ dnl Potentially add $additional_libdir to $LDFLAGS. -+ dnl But don't add it -+ dnl 1. if it's the standard /usr/lib, -+ dnl 2. if it's already present in $LDFLAGS, -+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux, -+ dnl 4. if it doesn't exist as a directory. -+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then -+ haveit= -+ for x in $LDFLAGS; do -+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) -+ if test "X$x" = "X-L$additional_libdir"; then -+ haveit=yes -+ break -+ fi -+ done -+ if test -z "$haveit"; then -+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then -+ if test -n "$GCC"; then -+ case $host_os in -+ linux*) haveit=yes;; -+ esac -+ fi -+ fi -+ if test -z "$haveit"; then -+ if test -d "$additional_libdir"; then -+ dnl Really add $additional_libdir to $LDFLAGS. -+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" -+ fi -+ fi -+ fi -+ fi -+ fi -+]) -+ -+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, -+dnl acl_final_exec_prefix, containing the values to which $prefix and -+dnl $exec_prefix will expand at the end of the configure script. -+AC_DEFUN([AC_LIB_PREPARE_PREFIX], -+[ -+ dnl Unfortunately, prefix and exec_prefix get only finally determined -+ dnl at the end of configure. -+ if test "X$prefix" = "XNONE"; then -+ acl_final_prefix="$ac_default_prefix" -+ else -+ acl_final_prefix="$prefix" -+ fi -+ if test "X$exec_prefix" = "XNONE"; then -+ acl_final_exec_prefix='${prefix}' -+ else -+ acl_final_exec_prefix="$exec_prefix" -+ fi -+ acl_save_prefix="$prefix" -+ prefix="$acl_final_prefix" -+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" -+ prefix="$acl_save_prefix" -+]) -+ -+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the -+dnl variables prefix and exec_prefix bound to the values they will have -+dnl at the end of the configure script. -+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], -+[ -+ acl_save_prefix="$prefix" -+ prefix="$acl_final_prefix" -+ acl_save_exec_prefix="$exec_prefix" -+ exec_prefix="$acl_final_exec_prefix" -+ $1 -+ exec_prefix="$acl_save_exec_prefix" -+ prefix="$acl_save_prefix" -+]) -+ -+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing -+dnl the basename of the libdir, either "lib" or "lib64". -+AC_DEFUN([AC_LIB_PREPARE_MULTILIB], -+[ -+ dnl There is no formal standard regarding lib and lib64. The current -+ dnl practice is that on a system supporting 32-bit and 64-bit instruction -+ dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit -+ dnl libraries go under $prefix/lib. We determine the compiler's default -+ dnl mode by looking at the compiler's library search path. If at least -+ dnl of its elements ends in /lib64 or points to a directory whose absolute -+ dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the -+ dnl default, namely "lib". -+ acl_libdirstem=lib -+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` -+ if test -n "$searchpath"; then -+ acl_save_IFS="${IFS= }"; IFS=":" -+ for searchdir in $searchpath; do -+ if test -d "$searchdir"; then -+ case "$searchdir" in -+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; -+ *) searchdir=`cd "$searchdir" && pwd` -+ case "$searchdir" in -+ */lib64 ) acl_libdirstem=lib64 ;; -+ esac ;; -+ esac -+ fi -+ done -+ IFS="$acl_save_IFS" -+ fi -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/longlong.m4 mc-4.6.2~git20080311/m4/longlong.m4 --- orig/mc-4.6.2~git20080311/m4/longlong.m4 2008-06-17 11:55:44.000000000 +0200 +++ mc-4.6.2~git20080311/m4/longlong.m4 2008-06-17 12:00:46.000000000 +0200 @@ -141152,82 +139846,6 @@ if test $ac_cv_type_long_long = yes; then AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have the 'long long' type.]) -diff -Nurwd orig/mc-4.6.2~git20080311/m4/longlong.m4~ mc-4.6.2~git20080311/m4/longlong.m4~ ---- orig/mc-4.6.2~git20080311/m4/longlong.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/longlong.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,72 @@ -+# longlong.m4 serial 10 -+dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Paul Eggert. -+ -+# Define HAVE_LONG_LONG_INT if 'long long int' works. -+# This fixes a bug in Autoconf 2.60, but can be removed once we -+# assume 2.61 everywhere. -+ -+# Note: If the type 'long long int' exists but is only 32 bits large -+# (as on some very old compilers), HAVE_LONG_LONG_INT will not be -+# defined. In this case you can treat 'long long int' like 'long int'. -+ -+AC_DEFUN([AC_TYPE_LONG_LONG_INT], -+[ -+ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], -+ [AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[long long int ll = 9223372036854775807ll; -+ long long int nll = -9223372036854775807LL; -+ typedef int a[((-9223372036854775807LL < 0 -+ && 0 < 9223372036854775807ll) -+ ? 1 : -1)]; -+ int i = 63;]], -+ [[long long int llmax = 9223372036854775807ll; -+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) -+ | (llmax / ll) | (llmax % ll));]])], -+ [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. -+ dnl If cross compiling, assume the bug isn't important, since -+ dnl nobody cross compiles for this platform as far as we know. -+ AC_RUN_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[@%:@include -+ @%:@ifndef LLONG_MAX -+ @%:@ define HALF \ -+ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) -+ @%:@ define LLONG_MAX (HALF - 1 + HALF) -+ @%:@endif]], -+ [[long long int n = 1; -+ int i; -+ for (i = 0; ; i++) -+ { -+ long long int m = n << i; -+ if (m >> i != n) -+ return 1; -+ if (LLONG_MAX / 2 < m) -+ break; -+ } -+ return 0;]])], -+ [ac_cv_type_long_long_int=yes], -+ [ac_cv_type_long_long_int=no], -+ [ac_cv_type_long_long_int=yes])], -+ [ac_cv_type_long_long_int=no])]) -+ if test $ac_cv_type_long_long_int = yes; then -+ AC_DEFINE([HAVE_LONG_LONG_INT], 1, -+ [Define to 1 if the system has the type `long long int'.]) -+ fi -+]) -+ -+# This macro is obsolescent and should go away soon. -+AC_DEFUN([gl_AC_TYPE_LONG_LONG], -+[ -+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) -+ ac_cv_type_long_long=$ac_cv_type_long_long_int -+ if test $ac_cv_type_long_long = yes; then -+ AC_DEFINE(HAVE_LONG_LONG, 1, -+ [Define if you have the 'long long' type.]) -+ fi -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/Makefile.in mc-4.6.2~git20080311/m4/Makefile.in --- orig/mc-4.6.2~git20080311/m4/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ mc-4.6.2~git20080311/m4/Makefile.in 2008-06-17 12:01:03.000000000 +0200 @@ -141662,54 +140280,6 @@ notposix #endif ], gt_cv_func_printf_posix="guessing no", -diff -Nurwd orig/mc-4.6.2~git20080311/m4/printf-posix.m4~ mc-4.6.2~git20080311/m4/printf-posix.m4~ ---- orig/mc-4.6.2~git20080311/m4/printf-posix.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/printf-posix.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,44 @@ -+# printf-posix.m4 serial 3 (gettext-0.16.2) -+dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+dnl Test whether the printf() function supports POSIX/XSI format strings with -+dnl positions. -+ -+AC_DEFUN([gt_PRINTF_POSIX], -+[ -+ AC_REQUIRE([AC_PROG_CC]) -+ AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], -+ gt_cv_func_printf_posix, -+ [ -+ AC_TRY_RUN([ -+#include -+#include -+/* The string "%2$d %1$d", with dollar characters protected from the shell's -+ dollar expansion (possibly an autoconf bug). */ -+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; -+static char buf[100]; -+int main () -+{ -+ sprintf (buf, format, 33, 55); -+ return (strcmp (buf, "55 33") != 0); -+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, -+ [ -+ AC_EGREP_CPP(notposix, [ -+#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ -+ notposix -+#endif -+ ], gt_cv_func_printf_posix="guessing no", -+ gt_cv_func_printf_posix="guessing yes") -+ ]) -+ ]) -+ case $gt_cv_func_printf_posix in -+ *yes) -+ AC_DEFINE(HAVE_POSIX_PRINTF, 1, -+ [Define if your printf() function supports format strings with positions.]) -+ ;; -+ esac -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/size_max.m4 mc-4.6.2~git20080311/m4/size_max.m4 --- orig/mc-4.6.2~git20080311/m4/size_max.m4 2008-06-17 11:55:44.000000000 +0200 +++ mc-4.6.2~git20080311/m4/size_max.m4 2008-06-17 12:00:46.000000000 +0200 @@ -141800,78 +140370,6 @@ -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) -diff -Nurwd orig/mc-4.6.2~git20080311/m4/size_max.m4~ mc-4.6.2~git20080311/m4/size_max.m4~ ---- orig/mc-4.6.2~git20080311/m4/size_max.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/size_max.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,68 @@ -+# size_max.m4 serial 6 -+dnl Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+AC_DEFUN([gl_SIZE_MAX], -+[ -+ AC_CHECK_HEADERS(stdint.h) -+ dnl First test whether the system already has SIZE_MAX. -+ AC_MSG_CHECKING([for SIZE_MAX]) -+ AC_CACHE_VAL([gl_cv_size_max], [ -+ gl_cv_size_max= -+ AC_EGREP_CPP([Found it], [ -+#include -+#if HAVE_STDINT_H -+#include -+#endif -+#ifdef SIZE_MAX -+Found it -+#endif -+], gl_cv_size_max=yes) -+ if test -z "$gl_cv_size_max"; then -+ dnl Define it ourselves. Here we assume that the type 'size_t' is not wider -+ dnl than the type 'unsigned long'. Try hard to find a definition that can -+ dnl be used in a preprocessor #if, i.e. doesn't contain a cast. -+ AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], -+ [#include -+#include ], size_t_bits_minus_1=) -+ AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], -+ [#include ], fits_in_uint=) -+ if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then -+ if test $fits_in_uint = 1; then -+ dnl Even though SIZE_MAX fits in an unsigned int, it must be of type -+ dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. -+ AC_TRY_COMPILE([#include -+ extern size_t foo; -+ extern unsigned long foo; -+ ], [], fits_in_uint=0) -+ fi -+ dnl We cannot use 'expr' to simplify this expression, because 'expr' -+ dnl works only with 'long' integers in the host environment, while we -+ dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. -+ if test $fits_in_uint = 1; then -+ gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" -+ else -+ gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" -+ fi -+ else -+ dnl Shouldn't happen, but who knows... -+ gl_cv_size_max='((size_t)~(size_t)0)' -+ fi -+ fi -+ ]) -+ AC_MSG_RESULT([$gl_cv_size_max]) -+ if test "$gl_cv_size_max" != yes; then -+ AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], -+ [Define as the maximum value of type 'size_t', if the system doesn't define it.]) -+ fi -+]) -+ -+dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -+dnl Remove this when we can assume autoconf >= 2.61. -+m4_ifdef([AC_COMPUTE_INT], [], [ -+ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/stdint_h.m4 mc-4.6.2~git20080311/m4/stdint_h.m4 --- orig/mc-4.6.2~git20080311/m4/stdint_h.m4 2008-06-17 11:55:44.000000000 +0200 +++ mc-4.6.2~git20080311/m4/stdint_h.m4 2008-06-17 12:00:46.000000000 +0200 @@ -141892,36 +140390,6 @@ gl_cv_header_stdint_h=yes, gl_cv_header_stdint_h=no)]) if test $gl_cv_header_stdint_h = yes; then -diff -Nurwd orig/mc-4.6.2~git20080311/m4/stdint_h.m4~ mc-4.6.2~git20080311/m4/stdint_h.m4~ ---- orig/mc-4.6.2~git20080311/m4/stdint_h.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/stdint_h.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,26 @@ -+# stdint_h.m4 serial 6 -+dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Paul Eggert. -+ -+# Define HAVE_STDINT_H_WITH_UINTMAX if exists, -+# doesn't clash with , and declares uintmax_t. -+ -+AC_DEFUN([gl_AC_HEADER_STDINT_H], -+[ -+ AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, -+ [AC_TRY_COMPILE( -+ [#include -+#include ], -+ [uintmax_t i = (uintmax_t) -1; return !i;], -+ gl_cv_header_stdint_h=yes, -+ gl_cv_header_stdint_h=no)]) -+ if test $gl_cv_header_stdint_h = yes; then -+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, -+ [Define if exists, doesn't clash with , -+ and declares uintmax_t. ]) -+ fi -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/ulonglong.m4 mc-4.6.2~git20080311/m4/ulonglong.m4 --- orig/mc-4.6.2~git20080311/m4/ulonglong.m4 2008-06-17 11:55:44.000000000 +0200 +++ mc-4.6.2~git20080311/m4/ulonglong.m4 2008-06-17 12:00:46.000000000 +0200 @@ -141981,58 +140449,6 @@ if test $ac_cv_type_unsigned_long_long = yes; then AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, [Define if you have the 'unsigned long long' type.]) -diff -Nurwd orig/mc-4.6.2~git20080311/m4/ulonglong.m4~ mc-4.6.2~git20080311/m4/ulonglong.m4~ ---- orig/mc-4.6.2~git20080311/m4/ulonglong.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/ulonglong.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,48 @@ -+# ulonglong.m4 serial 6 -+dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Paul Eggert. -+ -+# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -+# This fixes a bug in Autoconf 2.60, but can be removed once we -+# assume 2.61 everywhere. -+ -+# Note: If the type 'unsigned long long int' exists but is only 32 bits -+# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT -+# will not be defined. In this case you can treat 'unsigned long long int' -+# like 'unsigned long int'. -+ -+AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], -+[ -+ AC_CACHE_CHECK([for unsigned long long int], -+ [ac_cv_type_unsigned_long_long_int], -+ [AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[unsigned long long int ull = 18446744073709551615ULL; -+ typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 -+ ? 1 : -1)]; -+ int i = 63;]], -+ [[unsigned long long int ullmax = 18446744073709551615ull; -+ return (ull << 63 | ull >> 63 | ull << i | ull >> i -+ | ullmax / ull | ullmax % ull);]])], -+ [ac_cv_type_unsigned_long_long_int=yes], -+ [ac_cv_type_unsigned_long_long_int=no])]) -+ if test $ac_cv_type_unsigned_long_long_int = yes; then -+ AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1, -+ [Define to 1 if the system has the type `unsigned long long int'.]) -+ fi -+]) -+ -+# This macro is obsolescent and should go away soon. -+AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], -+[ -+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) -+ ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int -+ if test $ac_cv_type_unsigned_long_long = yes; then -+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, -+ [Define if you have the 'unsigned long long' type.]) -+ fi -+]) diff -Nurwd orig/mc-4.6.2~git20080311/m4/wint_t.m4 mc-4.6.2~git20080311/m4/wint_t.m4 --- orig/mc-4.6.2~git20080311/m4/wint_t.m4 2008-06-17 11:55:44.000000000 +0200 +++ mc-4.6.2~git20080311/m4/wint_t.m4 2008-06-17 12:00:46.000000000 +0200 @@ -142061,38 +140477,6 @@ wint_t foo = (wchar_t)'\0';], , gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) if test $gt_cv_c_wint_t = yes; then -diff -Nurwd orig/mc-4.6.2~git20080311/m4/wint_t.m4~ mc-4.6.2~git20080311/m4/wint_t.m4~ ---- orig/mc-4.6.2~git20080311/m4/wint_t.m4~ 1970-01-01 00:00:00.000000000 +0000 -+++ mc-4.6.2~git20080311/m4/wint_t.m4~ 2008-06-17 11:59:19.000000000 +0200 -@@ -0,0 +1,28 @@ -+# wint_t.m4 serial 2 (gettext-0.16.2) -+dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+dnl Test whether has the 'wint_t' type. -+dnl Prerequisite: AC_PROG_CC -+ -+AC_DEFUN([gt_TYPE_WINT_T], -+[ -+ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, -+ [AC_TRY_COMPILE([ -+/* Tru64 with Desktop Toolkit C has a bug: must be included before -+ . -+ BSD/OS 4.0.1 has a bug: , and must be included -+ before . */ -+#include -+#include -+#include -+#include -+ wint_t foo = (wchar_t)'\0';], , -+ gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) -+ if test $gt_cv_c_wint_t = yes; then -+ AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) -+ fi -+]) diff -Nurwd orig/mc-4.6.2~git20080311/Makefile.in mc-4.6.2~git20080311/Makefile.in --- orig/mc-4.6.2~git20080311/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ mc-4.6.2~git20080311/Makefile.in 2008-06-17 12:01:04.000000000 +0200 @@ -143375,6 +141759,7 @@ +src/recode.c +src/screen.c +src/selcodepage.c ++src/selmnt.c +src/slint.c +src/subshell.c +src/textconf.c @@ -144113,7 +142498,7 @@ + util.c util.h utilunix.c view.c view.h vfsdummy.h widget.c \ + widget.h win.c win.h wtools.c wtools.h unixcompat.h x11conn.h \ + x11conn.c ecs.h ecs.c charsets.c charsets.h selcodepage.c \ -+ selcodepage.h recode.c recode.h ++ selcodepage.h recode.c recode.h selmnt.c selmnt.h +am__objects_1 = achown.$(OBJEXT) background.$(OBJEXT) boxes.$(OBJEXT) \ + chmod.$(OBJEXT) chown.$(OBJEXT) cmd.$(OBJEXT) color.$(OBJEXT) \ + command.$(OBJEXT) complete.$(OBJEXT) cons.handler.$(OBJEXT) \ @@ -144134,7 +142519,7 @@ + view.$(OBJEXT) widget.$(OBJEXT) win.$(OBJEXT) wtools.$(OBJEXT) \ + x11conn.$(OBJEXT) ecs.$(OBJEXT) +am__objects_2 = charsets.$(OBJEXT) selcodepage.$(OBJEXT) \ -+ recode.$(OBJEXT) ++ recode.$(OBJEXT) selmnt.$(OBJEXT) +@CHARSET_FALSE@am_mc_OBJECTS = $(am__objects_1) +@CHARSET_TRUE@am_mc_OBJECTS = $(am__objects_1) $(am__objects_2) +mc_OBJECTS = $(am_mc_OBJECTS) @@ -144311,8 +142696,8 @@ +top_srcdir = @top_srcdir@ +AM_CFLAGS = $(GLIB_CFLAGS) +pkglibexecdir = $(libexecdir)/@PACKAGE@ -+@CONS_SAVER_FALSE@AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" -+@CONS_SAVER_TRUE@AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" \ ++@CONS_SAVER_FALSE@AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\" ++@CONS_SAVER_TRUE@AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\" \ +@CONS_SAVER_TRUE@ -DSAVERDIR=\""$(pkglibexecdir)"\" + +man2hlp_LDADD = $(GLIB_LIBS) @@ -144327,7 +142712,7 @@ + $(INTLLIBS) $(GLIB_LIBS) $(MCLIBS) $(LIBICONV) + +CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h \ -+ recode.c recode.h ++ recode.c recode.h selmnt.c selmnt.h + +SRCS = achown.c achown.h background.c background.h boxes.c boxes.h \ + chmod.c chmod.h chown.c chown.h cmd.c cmd.h color.c color.h \ @@ -144349,7 +142734,7 @@ + tree.c tree.h treestore.c treestore.h tty.c tty.h user.c user.h \ + util.c util.h utilunix.c view.c view.h vfsdummy.h widget.c \ + widget.h win.c win.h wtools.c wtools.h unixcompat.h \ -+ x11conn.h x11conn.c ecs.h ecs.c ++ x11conn.h x11conn.c ecs.h ecs.c selmnt.c selmnt.h + +@CHARSET_FALSE@mc_SOURCES = $(SRCS) +@CHARSET_TRUE@mc_SOURCES = $(SRCS) $(CHARSET_SRC) @@ -145057,9 +143442,9 @@ +SYNTAXFILES = \ + Syntax \ + ada95.syntax \ -+ asm.syntax \ + aspx.syntax \ + assembler.syntax \ ++ awk.syntax \ + cxx.syntax \ + c.syntax \ + changelog.syntax \ @@ -145095,8 +143480,10 @@ + php.syntax \ + po.syntax \ + povray.syntax \ ++ ebuild.syntax \ + python.syntax \ + ruby.syntax \ ++ nemerle.syntax \ + sh.syntax \ + smalltalk.syntax \ + slang.syntax \ @@ -145541,7 +143928,7 @@ +EXTFS_MISC = README extfs.ini sfs.ini + +# Scripts hat don't need adaptation to the local system -+EXTFS_CONST = bpp rpm trpm srpm u7z ++EXTFS_CONST = bpp rpm trpm srpm u7z ucab + +# Scripts that need adaptation to the local system - source files +EXTFS_IN = \ diff -ruN mc-4.6.2.orig/debian/patches/mc.ext/01_tar_forgot_arg.patch mc-4.6.2/debian/patches/mc.ext/01_tar_forgot_arg.patch --- mc-4.6.2.orig/debian/patches/mc.ext/01_tar_forgot_arg.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/mc.ext/01_tar_forgot_arg.patch 2008-11-27 01:00:21.000000000 +0200 @@ -4,7 +4,7 @@ +++ b/lib/mc.ext.in @@ -132,7 +132,7 @@ regex/\.(qp[rk])$ # tar - regex/\.(tar|TAR)$ + regex/\.[tT][aA][rR]$ Open=%cd %p#utar - View=%view{ascii} tar tvvf %f + View=%view{ascii} tar tvvf - %f diff -ruN mc-4.6.2.orig/debian/patches/mc.ext/02_use_arj.patch mc-4.6.2/debian/patches/mc.ext/02_use_arj.patch --- mc-4.6.2.orig/debian/patches/mc.ext/02_use_arj.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/mc.ext/02_use_arj.patch 2008-11-27 01:00:21.000000000 +0200 @@ -4,10 +4,10 @@ +++ b/lib/mc.ext.in @@ -142,7 +142,7 @@ type/^LHa\ .*archive # arj - regex/\.a(rj|[0-9][0-9])$ + regex/\.[aA]([rR][jJ]|[0-9][0-9])$ Open=%cd %p#uarj - View=%view{ascii} unarj l %f + View=%view{ascii} arj l %f - # ha - regex/\.([Hh][Aa])$ + # cab + regex/\.([cC][aA][bB])$ diff -ruN mc-4.6.2.orig/debian/patches/mc.ext/05_gimp_remote.patch mc-4.6.2/debian/patches/mc.ext/05_gimp_remote.patch --- mc-4.6.2.orig/debian/patches/mc.ext/05_gimp_remote.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/mc.ext/05_gimp_remote.patch 2008-11-27 01:00:21.000000000 +0200 @@ -5,9 +5,9 @@ @@ -339,7 +339,7 @@ type/^Netpbm Include=image - shell/.xcf + regex/\.([xX][cC][fF])$ - Open=(gimp %f &) + Open=(gimp-remote %f &) - shell/.xbm + regex/\.([xX][bB][mM])$ Open=bitmap %f diff -ruN mc-4.6.2.orig/debian/patches/mc.ext/10_run_mailcap.patch mc-4.6.2/debian/patches/mc.ext/10_run_mailcap.patch --- mc-4.6.2.orig/debian/patches/mc.ext/10_run_mailcap.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/mc.ext/10_run_mailcap.patch 2008-11-27 01:00:21.000000000 +0200 @@ -110,24 +110,14 @@ Include=image type/^PC\ bitmap -@@ -364,14 +373,15 @@ +@@ -364,6 +373,6 @@ Open=(gimp-remote %f &) - shell/.xbm + regex/\.([xX][bB][mM])$ - Open=bitmap %f -+ Include=image - - shell/.xpm - Include=image - View=sxpm %f - - include/image -- Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi -+ Open=see %f & -+ #Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi - View=%view{ascii} identify %f - #View=%view{ascii} asciiview %f ++ Include=image + regex/\.([xX][pP][mM])$ @@ -379,25 +389,30 @@ ### Sound files ### @@ -165,7 +155,7 @@ regex/\.([wW][mM][aA])$ Open=mplayer -vo null %f -@@ -440,10 +455,12 @@ +@@ -440,6 +455,7 @@ Include=video regex/\.([rR][aA]?[mM])$ @@ -174,12 +164,6 @@ + #Open=(realplay %f >/dev/null 2>&1 &) include/video -- Open=(mplayer %f >/dev/null 2>&1 &) -+ Open=see %f & -+ #Open=(mplayer %f >/dev/null 2>&1 &) - #Open=(gtv %f >/dev/null 2>&1 &) - #Open=(xanim %f >/dev/null 2>&1 &) - @@ -452,12 +469,14 @@ # Postscript diff -ruN mc-4.6.2.orig/debian/patches/syntax/02_improving_nroff_filematch.patch mc-4.6.2/debian/patches/syntax/02_improving_nroff_filematch.patch --- mc-4.6.2.orig/debian/patches/syntax/02_improving_nroff_filematch.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/syntax/02_improving_nroff_filematch.patch 2008-11-27 01:00:21.000000000 +0200 @@ -2,8 +2,8 @@ --- mc-4.6.2~pre1/syntax/Syntax 2007-08-27 08:56:47.000000000 +0200 +++ mc-4.6.2~pre1.patched/syntax/Syntax 2008-01-24 23:52:28.000000000 +0100 @@ -46,9 +46,10 @@ - file ..\*\\.(rb|RB)$ Ruby\sProgram ^#!.\*([\s/]ruby|@RUBY@) - include ruby.syntax + file ..\*\\.n$ Nemerle\sProgram + include nemerle.syntax -file ..\*\\.(man|[0-9n]|[0-9]x)$ NROFF\sSource +file ..\*\\.(man|[0-9n]|[0-9](x|ncurses|ssl|p|pm|menu|form|vga|t|td))$ NROFF\sSource diff -ruN mc-4.6.2.orig/debian/patches/syntax/03_cxx.syntax.patch mc-4.6.2/debian/patches/syntax/03_cxx.syntax.patch --- mc-4.6.2.orig/debian/patches/syntax/03_cxx.syntax.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/syntax/03_cxx.syntax.patch 2008-11-27 01:00:21.000000000 +0200 @@ -15,7 +15,7 @@ index 0000000..7deef6d --- /dev/null +++ b/syntax/cxx.syntax -@@ -0,0 +1,128 @@ +@@ -0,0 +1,165 @@ +context default + keyword whole auto yellow + keyword whole break yellow @@ -57,9 +57,9 @@ + keyword whole inline yellow + keyword whole new yellow + keyword whole operator yellow -+ keyword whole private yellow -+ keyword whole protected yellow -+ keyword whole public yellow ++ keyword whole private brightred ++ keyword whole protected brightred ++ keyword whole public brightred + keyword whole this yellow + keyword whole throw yellow + keyword whole template yellow @@ -82,6 +82,43 @@ + keyword whole ... yellow + keyword whole linestart \{\s\t\}\[\s\t\]#*\n brightmagenta + ++ keyword whole Q_D brightred ++ keyword whole Q_Q brightred ++ keyword whole Q_ENUMS brightred ++ keyword whole Q_OBJECT brightred ++ keyword whole Q_PROPERTY brightred ++ keyword whole Q_CLASSINFO brightred ++ keyword whole Q_DECLARE_METATYPE brightred ++ keyword whole Q_SLOTS brightred ++ keyword whole Q_SIGNALS brightred ++ keyword whole Q_PRIVATE_SLOT brightred ++ keyword whole Q_DISABLE_COPY brightred ++ keyword whole Q_INVOKABLE brightred ++ keyword whole Q_SCRIPTABLE brightred ++ keyword whole Q_GADGET brightred ++ keyword whole Q_SETS brightred ++ keyword whole Q_FLAGS brightred ++ keyword whole Q_OVERRIDE brightred ++ keyword whole Q_INTERFACES brightred ++ keyword whole Q_NOREPLY brightred ++ ++ keyword whole signals brightred ++ keyword whole slots brightred ++ ++ keyword whole SIGNAL brightred ++ keyword whole SLOT brightred ++ ++ keyword whole foreach yellow ++ ++ keyword whole 0\{xX\}\{0123456789abcdefABCDEF\}\[0123456789abcdefABCDEF\] brightgreen ++ keyword whole \{0123456789\}\[0123456789\] brightgreen ++ keyword whole \[0123456789\]\.\{0123456789\}\[0123456789\] brightgreen ++ keyword whole \{0123456789\}\[0123456789\]\.\[0123456789\] brightgreen ++ keyword whole \{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen ++ keyword whole \{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen ++ keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen ++ keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen ++ + keyword /\* brown + keyword \*/ brown + keyword // brown diff -ruN mc-4.6.2.orig/debian/patches/syntax/08_c-vs-cxx.patch mc-4.6.2/debian/patches/syntax/08_c-vs-cxx.patch --- mc-4.6.2.orig/debian/patches/syntax/08_c-vs-cxx.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/syntax/08_c-vs-cxx.patch 2008-11-27 01:00:21.000000000 +0200 @@ -22,7 +22,7 @@ +file ..\*\\.c$ C\sProgram include c.syntax -+file ..\*\\.([hC]|CC|cxx|cc|cpp|CPP|CXX|hxx|h\.in)$ C/C\+\+\sProgram ++file ..\*\\.([hHCc]|CC|cxx|cc|cpp|moc|CPP|CXX|hxx|hpp|HPP|h\.in)$ C/C\+\+\sProgram +include cxx.syntax + file ..\*\\.d$ D\sProgram diff -ruN mc-4.6.2.orig/debian/patches/syntax/12_asm-syntax.patch mc-4.6.2/debian/patches/syntax/12_asm-syntax.patch --- mc-4.6.2.orig/debian/patches/syntax/12_asm-syntax.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/syntax/12_asm-syntax.patch 2008-11-27 01:00:21.000000000 +0200 @@ -6,6 +6,7 @@ SYNTAXFILES = \ Syntax \ ada95.syntax \ + awk.syntax \ + asm.syntax \ aspx.syntax \ assembler.syntax \ diff -ruN mc-4.6.2.orig/debian/patches/syntax/13_procmail-syntax.patch mc-4.6.2/debian/patches/syntax/13_procmail-syntax.patch --- mc-4.6.2.orig/debian/patches/syntax/13_procmail-syntax.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/syntax/13_procmail-syntax.patch 2008-11-27 01:00:21.000000000 +0200 @@ -1,14 +1,13 @@ diff -Nurwd mc-4.6.2~git20080311/syntax/Makefile.am orig/mc-4.6.2~git20080311/syntax/Makefile.am --- mc-4.6.2~git20080311/syntax/Makefile.am 2008-06-17 14:19:01.000000000 +0200 +++ orig/mc-4.6.2~git20080311/syntax/Makefile.am 2008-06-17 14:18:19.000000000 +0200 -@@ -39,6 +39,7 @@ - php.syntax \ +@@ -39,5 +39,6 @@ po.syntax \ povray.syntax \ + ebuild.syntax \ + procmail.syntax \ python.syntax \ ruby.syntax \ - sh.syntax \ diff -Nurwd mc-4.6.2~git20080311/syntax/procmail.syntax orig/mc-4.6.2~git20080311/syntax/procmail.syntax --- mc-4.6.2~git20080311/syntax/procmail.syntax 1970-01-01 00:00:00.000000000 +0000 +++ orig/mc-4.6.2~git20080311/syntax/procmail.syntax 2008-06-17 14:16:58.000000000 +0200 @@ -288,8 +287,8 @@ --- mc-4.6.2~git20080311/syntax/Syntax 2008-06-17 14:19:01.000000000 +0200 +++ orig/mc-4.6.2~git20080311/syntax/Syntax 2008-06-17 14:17:58.000000000 +0200 @@ -182,5 +182,8 @@ - file ..\*\\.(S|asm)$ Assembler\sSource - include asm.syntax + file Don_t_match_me Mail\sfolder ^(From|Return-(P|p)ath:|From:|Date:)\s + include mail.syntax +file \.procmailrc$ Procmail\sRC\sFile ^#/usr/bin/procmail +include procmail.syntax diff -ruN mc-4.6.2.orig/debian/patches/utf8/mc-utf8-look-and-feel.patch mc-4.6.2/debian/patches/utf8/mc-utf8-look-and-feel.patch --- mc-4.6.2.orig/debian/patches/utf8/mc-utf8-look-and-feel.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/utf8/mc-utf8-look-and-feel.patch 2008-11-27 01:00:21.000000000 +0200 @@ -9,8 +9,8 @@ +/* Is the LANG UTF-8 ? */ +gboolean is_utf8 = FALSE; + - /* mc_home: The home of MC */ - char *mc_home = NULL; + /* The xterm title */ + char *xterm_title_str = NULL; @@ -2141,6 +2144,16 @@ /* if on, it displays the information that files have been moved to ~/.mc */ diff -ruN mc-4.6.2.orig/debian/patches/utf8/mc-utf8.patch mc-4.6.2/debian/patches/utf8/mc-utf8.patch --- mc-4.6.2.orig/debian/patches/utf8/mc-utf8.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/utf8/mc-utf8.patch 2008-11-27 01:00:21.000000000 +0200 @@ -23,81 +23,6 @@ if test x$with_screen = xslang; then AC_DEFINE(HAVE_SYSTEM_SLANG, 1, ---- mc/src/layout.c.utf8 2006-11-10 01:22:30.000000000 +0100 -+++ mc/src/layout.c 2007-01-04 16:20:56.000000000 +0100 -@@ -366,36 +366,36 @@ init_layout (void) - - while (i--) { - s_split_direction[i] = _(s_split_direction[i]); -- l1 = strlen (s_split_direction[i]) + 7; -+ l1 = mbstrlen (s_split_direction[i]) + 7; - if (l1 > first_width) - first_width = l1; - } - - for (i = 0; i <= 8; i++) { - check_options[i].text = _(check_options[i].text); -- l1 = strlen (check_options[i].text) + 7; -+ l1 = mbstrlen (check_options[i].text) + 7; - if (l1 > first_width) - first_width = l1; - } - -- l1 = strlen (title1) + 1; -+ l1 = mbstrlen (title1) + 1; - if (l1 > first_width) - first_width = l1; - -- l1 = strlen (title2) + 1; -+ l1 = mbstrlen (title2) + 1; - if (l1 > first_width) - first_width = l1; - - -- second_width = strlen (title3) + 1; -+ second_width = mbstrlen (title3) + 1; - for (i = 0; i < 6; i++) { - check_options[i].text = _(check_options[i].text); -- l1 = strlen (check_options[i].text) + 7; -+ l1 = mbstrlen (check_options[i].text) + 7; - if (l1 > second_width) - second_width = l1; - } - if (console_flag) { -- l1 = strlen (output_lines_label) + 13; -+ l1 = mbstrlen (output_lines_label) + 13; - if (l1 > second_width) - second_width = l1; - } -@@ -409,14 +409,14 @@ init_layout (void) - * - * Now the last thing to do - properly space buttons... - */ -- l1 = 11 + strlen (ok_button) /* 14 - all brackets and inner space */ -- +strlen (save_button) /* notice: it is 3 char less because */ -- +strlen (cancel_button); /* of '&' char in button text */ -+ l1 = 11 + mbstrlen (ok_button) /* 14 - all brackets and inner space */ -+ +mbstrlen (save_button) /* notice: it is 3 char less because */ -+ +mbstrlen (cancel_button); /* of '&' char in button text */ - - i = (first_width + second_width - l1) / 4; - b1 = 5 + i; -- b2 = b1 + strlen (ok_button) + i + 6; -- b3 = b2 + strlen (save_button) + i + 4; -+ b2 = b1 + mbstrlen (ok_button) + i + 6; -+ b3 = b2 + mbstrlen (save_button) + i + 4; - - i18n_layt_flag = 1; - } -@@ -684,7 +684,7 @@ setup_panels (void) - panel_do_cols (0); - panel_do_cols (1); - -- promptl = strlen (prompt); -+ promptl = mbstrlen (prompt); - - widget_set_size (&the_menubar->widget, 0, 0, 1, COLS); - --- mc/src/tty.c.utf8 2006-05-23 16:20:39.000000000 +0200 +++ mc/src/tty.c 2007-01-04 16:20:56.000000000 +0100 @@ -134,10 +134,12 @@ tty_print_char(int c) diff -ruN mc-4.6.2.orig/debian/patches/utf8/recode.patch mc-4.6.2/debian/patches/utf8/recode.patch --- mc-4.6.2.orig/debian/patches/utf8/recode.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/utf8/recode.patch 2008-11-27 01:00:21.000000000 +0200 @@ -813,7 +813,7 @@ directory = *new_dir ? new_dir : home_dir; + ret_panel=panel; - if (mc_chdir (directory) == -1) { + if (strchr(directory,'\n') || mc_chdir (directory) == -1) { strcpy (panel->cwd, olddir); g_free (olddir); @@ -808,6 +811,10 @@ @@ -848,7 +848,7 @@ -CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h +CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h \ -+ recode.c recode.h ++ recode.c recode.h selmnt.c selmnt.h SRCS = achown.c achown.h background.c background.h boxes.c boxes.h \ chmod.c chmod.h chown.c chown.h cmd.c cmd.h color.c color.h \ @@ -1234,8 +1234,8 @@ +#ifdef HAVE_CHARSET + { XCTRL('t'), mark_file }, /* was 'fnc_c_cmd' */ +#endif - { ALT('o'), chdir_other_panel }, - { ALT('i'), sync_other_panel }, + { ALT('i'), chdir_other_panel }, + { ALT('o'), sync_other_panel }, { ALT('l'), chdir_to_readlink }, Index: mc-4.6.2~git20080311/src/screen.h =================================================================== diff -ruN mc-4.6.2.orig/debian/patches/vfs/07_srpm_support.patch mc-4.6.2/debian/patches/vfs/07_srpm_support.patch --- mc-4.6.2.orig/debian/patches/vfs/07_srpm_support.patch 2008-11-23 13:49:38.000000000 +0200 +++ mc-4.6.2/debian/patches/vfs/07_srpm_support.patch 2008-11-27 01:00:21.000000000 +0200 @@ -15,583 +15,6 @@ Open=%cd %p#rpm View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f -diff --git a/lib/mc.ext.in.orig b/lib/mc.ext.in.orig -new file mode 100644 -index 0000000..dfe72bb ---- /dev/null -+++ b/lib/mc.ext.in.orig -@@ -0,0 +1,571 @@ -+# Midnight Commander 3.0 extension file -+# Warning: Structure of this file has changed completely with version 3.0 -+# -+# All lines starting with # or empty lines are thrown away. -+# Lines starting in the first column should have following format: -+# -+# keyword/descNL, i.e. everything after keyword/ until new line is desc -+# -+# keyword can be: -+# -+# shell (desc is, when starting with a dot, any extension (no wildcars), -+# i.e. matches all the files *desc . Example: .tar matches *.tar; -+# if it doesn't start with a dot, it matches only a file of that name) -+# -+# regex (desc is an extended regular expression) -+# Please note that we are using the GNU regex library and thus -+# \| matches the literal | and | has special meaning (or) and -+# () have special meaning and \( \) stand for literal ( ). -+# -+# type (file matches this if `file %f` matches regular expression desc -+# (the filename: part from `file %f` is removed)) -+# -+# directory (matches any directory matching regular expression desc) -+# -+# include (matches an include directive) -+# -+# default (matches any file no matter what desc is) -+# -+# Other lines should start with a space or tab and should be in the format: -+# -+# keyword=commandNL (with no spaces around =), where keyword should be: -+# -+# Open (if the user presses Enter or doubleclicks it), -+# -+# View (F3), Edit (F4) -+# -+# Include is the keyword used to add any further entries from an include/ -+# section -+# -+# command is any one-line shell command, with the following substitutions: -+# -+# %% -> % character -+# %p -> name of the current file (without path, but pwd is its path) -+# %f -> name of the current file. Unlike %p, if file is located on a -+# non-local virtual filesystem, i.e. either tarfs, mcfs or ftpfs, -+# then the file will be temporarily copied into a local directory -+# and %f will be the full path to this local temporal file. -+# If you don't want to get a local copy and want to get the -+# virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then -+# use %d/%p instead of %f. -+# %d -> name of the current directory (pwd, without trailing slash) -+# %s -> "selected files", i.e. space separated list of tagged files if any -+# or name of the current file -+# %t -> list of tagged files -+# %u -> list of tagged files (they'll be untaged after the command) -+# -+# (If these 6 letters are in uppercase, they refer to the other panel. -+# But you shouldn't have to use it in this file.) -+# -+# -+# %cd -> the rest is a path mc should change into (cd won't work, since it's -+# a child process). %cd handles even vfs names. -+# -+# %view -> the command you type will be piped into mc's internal file viewer -+# if you type only the %view and no command, viewer will load %f file -+# instead (i.e. no piping, so it is different to %view cat %f) -+# %view may be directly followed by {} with a list of any of -+# ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for -+# text using backspace for bold and underscore) and unform -+# (no highlighting for nroff sequences) separated by commas. -+# -+# %var -> You use it like this: %var{VAR:default}. This macro will expand -+# to the value of the VAR variable in the environment if it's set -+# otherwise the value in default will be used. This is similar to -+# the Bourne shell ${VAR-default} construct. -+# -+# Rules are applied from top to bottom, thus the order is important. -+# If some actions are missing, search continues as if this target didn't -+# match (i.e. if a file matches the first and second entry and View action -+# is missing in the first one, then on pressing F3 the View action from -+# the second entry will be used. default should catch all the actions. -+# -+# Any new entries you develop for you are always welcome if they are -+# useful on more than one system. You can send your modifications -+# by e-mail to mc-devel@gnome.org -+ -+ -+### Changes ### -+# -+# Reorganization: 2000-05-01 Michal Svec -+ -+ -+### TODO ### -+# -+# Postscript Open: ps2svga [gs -DEVICE=jpeg|zgv or something] -+# Images asciiview -+# -+# All X Apps [Nothing/Warning] if no DISPLAY -+# Not found [Default/Warning] -+# Empty Output [Default/Warning] -+# Edit: CopyOut+EDIT+CopyIn -+# Security Check gzip/bzip EDIT (mktemp) -+# -+# Maybe: Open/XOpen/GOpen/KOpen/... for Console/X/GNOME/KDE/etc. -+ -+ -+### Archives ### -+ -+# .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk -+regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$ -+ 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 - -+ -+regex/\.t(ar\.bz2|bz|b2)$ -+ Open=%cd %p#utar -+ View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf - -+ -+# .tar.lzma, .tlz -+regex/\.t(ar\.lzma|lz)$ -+ Open=%cd %p#utar -+ View=%view{ascii} lzma -dc %f 2>/dev/null | tar tvvf - -+ -+# .tar.F - used in QNX -+regex/\.tar\.F$ -+ # Open=%cd %p#utar -+ View=%view{ascii} freeze -dc %f 2>/dev/null | tar tvvf - -+ -+# .qpr/.qpk - QNX Neutrino package installer files -+regex/\.(qp[rk])$ -+ Open=%cd %p#utar -+ View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf - -+ -+# tar -+regex/\.(tar|TAR)$ -+ Open=%cd %p#utar -+ View=%view{ascii} tar tvvf %f -+ -+# lha -+type/^LHa\ .*archive -+ Open=%cd %p#ulha -+ View=%view{ascii} lha l %f -+ -+# arj -+regex/\.a(rj|[0-9][0-9])$ -+ Open=%cd %p#uarj -+ View=%view{ascii} unarj l %f -+ -+# ha -+regex/\.([Hh][Aa])$ -+ Open=%cd %p#uha -+ View=%view{ascii} ha lf %f -+ -+# rar -+regex/\.[rR]([aA][rR]|[0-9][0-9])$ -+ Open=%cd %p#urar -+ View=%view{ascii} rar v -c- %f -+ -+# ALZip -+regex/\.(alz|ALZ)$ -+ Open=%cd %p#ualz -+ View=%view{ascii} unalz -l %f -+ -+# cpio -+shell/.cpio.Z -+ Open=%cd %p#ucpio -+ View=%view{ascii} gzip -dc '%f' | cpio -itv 2>/dev/null -+ -+shell/.cpio.gz -+ Open=%cd %p#ucpio -+ View=%view{ascii} gzip -dc '%f' | cpio -itv 2>/dev/null -+ -+shell/.cpio -+ Open=%cd %p#ucpio -+ View=%view{ascii} cpio -itv <'%f' 2>/dev/null -+ -+# ls-lR -+regex/(^|\.)ls-?lR(\.g?z|Z|bz2)?$ -+ Open=%cd %p#lslR -+ -+# patch -+regex/\.(diff|patch)(\.(bz2|gz|Z))?$ -+ Open=%cd %p#patchfs -+ -+# ar library -+regex/\.s?a$ -+ Open=%cd %p#uar -+ #Open=%view{ascii} ar tv %f -+ View=%view{ascii} file %f && nm %f -+ -+# trpm -+regex/\.trpm$ -+ Open=%cd %p#trpm -+ View=%view{ascii} rpm -qivl --scripts `basename %p .trpm` -+ -+# RPM packages (SuSE uses *.spm for source packages) -+regex/\.(rpm|spm)$ -+ Open=%cd %p#rpm -+ View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f -+ -+# deb -+regex/\.u?deb$ -+ Open=%cd %p#deb -+ View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f -+ -+# ISO9660 -+regex/\.iso$ -+ Open=%cd %p#iso9660 -+ View=%view{ascii} isoinfo -l -i %f -+ -+# 7zip archives (they are not man pages) -+shell/.7z -+ Open=%cd %p#u7z -+ View=%view{ascii} 7za l %f 2>/dev/null -+ -+# Mailboxes -+type/^ASCII\ mail\ text -+ Open=%cd %p#mailfs -+ -+ -+### Sources ### -+ -+# C -+shell/.c -+ Open=%var{EDITOR:vi} %f -+ -+# Fortran -+shell/.f -+ Open=%var{EDITOR:vi} %f -+ -+# Header -+regex/\.(h|hpp)$ -+ Open=%var{EDITOR:vi} %f -+ -+# Object -+type/^ELF -+ #Open=%var{PAGER:more} %f -+ View=%view{ascii} file %f && nm %f -+ -+# Asm -+shell/.s -+ Open=%var{EDITOR:vi} %f -+ -+# C++ -+regex/\.(C|cc|cpp)$ -+ Open=%var{EDITOR:vi} %f -+ -+ -+### Documentation ### -+ -+# Texinfo -+regex/\.(te?xi|texinfo)$ -+ -+# GNU Info page -+type/^Info\ text -+ Open=info -f %f -+ -+shell/.info -+ Open=info -f %f -+ -+# Manual page -+# Exception - .so libraries are not manual pages -+regex/\.(so|so\.[0-9\.]*)$ -+ View=%view{ascii} file %f && nm %f -+ -+regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$ -+ Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) nroff @MAN_FLAGS@ @MANDOC@ %f ;; esac | %var{PAGER:more} -+ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) nroff @MAN_FLAGS@ @MANDOC@ %f ;; esac -+ -+# Perl pod page -+shell/.pod -+ Open=pod2man %f | nroff @MAN_FLAGS@ @MANDOC@ | %var{PAGER:more} -+ View=%view{ascii,nroff} pod2man %f | nroff @MAN_FLAGS@ @MANDOC@ -+ -+# Troff with me macros. -+# Exception - "read.me" is not a nroff file. -+shell/read.me -+ Open= -+ View= -+ -+shell/.me -+ Open=nroff @MAN_FLAGS@ -me %f | %var{PAGER:more} -+ View=%view{ascii,nroff} nroff @MAN_FLAGS@ -me %f -+ -+# Troff with ms macros. -+shell/.ms -+ Open=nroff @MAN_FLAGS@ -ms %f | %var{PAGER:more} -+ View=%view{ascii,nroff} nroff @MAN_FLAGS@ -ms %f -+ -+# Manual page - compressed -+regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$ -+ Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more} -+ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac -+ -+regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$ -+ Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more} -+ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac -+ -+regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$ -+ Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more} -+ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac -+ -+regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$ -+ Open=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more} -+ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac -+ -+ -+### Images ### -+ -+type/^GIF -+ Include=image -+ -+type/^JPEG -+ Include=image -+ -+type/^PC\ bitmap -+ Include=image -+ -+type/^PNG -+ Include=image -+ -+type/^TIFF -+ Include=image -+ -+type/^PBM -+ Include=image -+ -+type/^PGM -+ Include=image -+ -+type/^PPM -+ Include=image -+ -+type/^Netpbm -+ Include=image -+ -+shell/.xcf -+ Open=(gimp %f &) -+ -+shell/.xbm -+ Open=bitmap %f -+ -+shell/.xpm -+ Include=image -+ View=sxpm %f -+ -+include/image -+ Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi -+ View=%view{ascii} identify %f -+ #View=%view{ascii} asciiview %f -+ -+ -+### Sound files ### -+ -+regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$ -+ Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi -+ -+regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$ -+ Open=mikmod %f -+ #Open=tracker %f -+ -+regex/\.([wW][aA][wW]22)$ -+ Open=vplay -s 22 %f -+ -+regex/\.([mM][pP]3)$ -+ Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi -+ View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p' -+ -+regex/\.([oO][gG][gG])$ -+ Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi -+ View=%view{ascii} ogginfo %s -+ -+regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$ -+ Open=timidity %f -+ -+regex/\.([wW][mM][aA])$ -+ Open=mplayer -vo null %f -+ View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f -+ -+ -+### Play lists ### -+ -+regex/\.([mM]3[uU]|[pP][lL][sS])$ -+ Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi -+ -+ -+### Video ### -+ -+regex/\.([aA][vV][iI])$ -+ Include=video -+ -+regex/\.([aA][sS][fFxX])$ -+ Include=video -+ -+regex/\.([dD][iI][vV][xX])$ -+ Include=video -+ -+regex/\.([mM][oO][vV]|[qQ][tT])$ -+ Include=video -+ -+regex/\.([mM][pP]4|[mM][pP][eE]?[gG])$ -+ Include=video -+ -+regex/\.([vV][oO][bB])$ -+ Include=video -+ -+regex/\.([wW][mM][vV])$ -+ Include=video -+ -+regex/\.([fF][lL][iIcCvV])$ -+ Include=video -+ -+regex/\.([oO][gG][mM])$ -+ Include=video -+ -+regex/\.([rR][aA]?[mM])$ -+ Open=(realplay %f >/dev/null 2>&1 &) -+ -+include/video -+ Open=(mplayer %f >/dev/null 2>&1 &) -+ #Open=(gtv %f >/dev/null 2>&1 &) -+ #Open=(xanim %f >/dev/null 2>&1 &) -+ -+ -+### Documents ### -+ -+# Postscript -+type/^PostScript -+ Open=(gv %f &) -+ View=%view{ascii} ps2ascii %f -+ -+# PDF -+type/^PDF -+ Open=(xpdf %f &) -+ #Open=(acroread %f &) -+ #Open=(ghostview %f &) -+ View=%view{ascii} pdftotext %f - -+ -+# The following code very ugly and should not be taken as example. -+# It should be cleaned up when the new format of mc.ext is developed. -+ -+# 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 -+ View=%view{ascii} lynx -dump -force_html %f -+ -+# StarOffice 5.2 -+shell/.sdw -+ Open=(ooffice %f &) -+ -+# StarOffice 6 and OpenOffice.org formats -+regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$ -+ Open=(ooffice %f &) -+ View=%view{ascii} unzip -p %f content.xml | o3totxt -+ -+# AbiWord -+shell/.abw -+ Open=(abiword %f &) -+ -+# Microsoft Word Document -+regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$ -+ Open=(abiword %f >/dev/null 2>&1 &) -+ View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f -+type/^Microsoft\ Word -+ Open=(abiword %f >/dev/null 2>&1 &) -+ View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f -+ -+# RTF document -+regex/\.([rR][tT][fF])$ -+ Open=(abiword %f >/dev/null 2>&1 &) -+ -+# Microsoft Excel Worksheet -+regex/\.([xX][lL][sSwW])$ -+ Open=(gnumeric %f >/dev/null 2>&1 &) -+ View=%view{ascii} xls2csv %f || strings %f -+type/^Microsoft\ Excel -+ Open=(gnumeric %f >/dev/null 2>&1 &) -+ View=%view{ascii} xls2csv %f || strings %f -+ -+# Use OpenOffice.org to open any MS Office documents -+type/^Microsoft\ Office\ Document -+ Open=(ooffice %f &) -+ -+# Framemaker -+type/^FrameMaker -+ Open=fmclient -f %f -+ -+# DVI -+regex/\.([dD][vV][iI])$ -+ Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi -+ View=%view{ascii} dvi2tty %f -+ -+# TeX -+regex/\.([Tt][Ee][Xx])$ -+ Open=%var{EDITOR:vi} %f -+ -+ -+### Miscellaneous ### -+ -+# Makefile -+regex/[Mm]akefile$ -+ Open=make -f %f %{Enter parameters} -+ -+# Imakefile -+shell/Imakefile -+ Open=xmkmf -a -+ -+# Makefile.PL (MakeMaker) -+regex/^Makefile.(PL|pl)$ -+ Open=%var{PERL:perl} %f -+ -+# dbf -+regex/\.([dD][bB][fF])$ -+ Open=%view{ascii} dbview %f -+ View=%view{ascii} dbview -b %f -+ -+# REXX script -+regex/\.(rexx?|cmd)$ -+ Open=rexx %f %{Enter parameters};echo "Press ENTER";read y -+ -+ -+### Plain compressed files ### -+ -+# zip -+type/^([Zz][Ii][Pp])\ archive -+ Open=%cd %p#uzip -+ View=%view{ascii} unzip -v %f -+ -+# zoo -+regex/\.([Zz][Oo][Oo])$ -+ Open=%cd %p#uzoo -+ View=%view{ascii} zoo l %f -+ -+# gzip -+type/^gzip -+ Open=gzip -dc %f | %var{PAGER:more} -+ View=%view{ascii} gzip -dc %f 2>/dev/null -+ -+# bzip2 -+type/^bzip2 -+ Open=bzip2 -dc %f | %var{PAGER:more} -+ View=%view{ascii} bzip2 -dc %f 2>/dev/null -+ -+# bzip -+type/^bzip -+ Open=bzip -dc %f | %var{PAGER:more} -+ View=%view{ascii} bzip -dc %f 2>/dev/null -+ -+# compress -+type/^compress -+ Open=gzip -dc %f | %var{PAGER:more} -+ View=%view{ascii} gzip -dc %f 2>/dev/null -+ -+# lzma -+regex/\.lzma$ -+ Open=lzma -dc %f | %var{PAGER:more} -+ View=%view{ascii} lzma -dc %f 2>/dev/null -+ -+ -+### Default ### -+ -+# Default target for anything not described above -+default/* -+ Open= -+ View= -+ -+ -+### EOF ### diff --git a/vfs/extfs/Makefile.am b/vfs/extfs/Makefile.am index e7efbe4..ee12065 100644 --- a/vfs/extfs/Makefile.am @@ -600,8 +23,8 @@ EXTFS_MISC = README extfs.ini sfs.ini # Scripts hat don't need adaptation to the local system --EXTFS_CONST = bpp rpm trpm u7z -+EXTFS_CONST = bpp rpm trpm srpm u7z +-EXTFS_CONST = bpp rpm trpm u7z ucab ++EXTFS_CONST = bpp rpm trpm srpm u7z ucab # Scripts that need adaptation to the local system - source files EXTFS_IN = \ diff -ruN mc-4.6.2.orig/doc/mc.1.in mc-4.6.2/doc/mc.1.in --- mc-4.6.2.orig/doc/mc.1.in 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/doc/mc.1.in 2008-11-27 01:00:21.000000000 +0200 @@ -3033,7 +3033,9 @@ dhotnormal, dhotfocus. Help colors are: helpnormal, helpitalic, helpbold, helplink, helpslink. Viewer color is: viewunderline. Special highlighting colors are: executable, directory, link, stalelink, device, -special, core. Editor colors are: editnormal, editbold, editmarked. +special, core. Filetype highlighting colors are: hidden, temp, doc, +archive, source, media, graph, database. Editor colors are: editnormal, +editbold, editmarked. .PP .I input determines the color of input lines used in query dialogs. @@ -3091,6 +3093,25 @@ .I core is for core files. .PP +Also filetype highlight colors determine how files displayed depending +on file type such as (below are colors named as filetypes): +.I hidden +is used for hidden files and directories that begin with dot; +.I temp +is used for temporary files; +.I doc +is used for document and text files; +.I archive +is used for archive files; +.I source +is used for files with source codes; +.I media +is used for multimedia files; +.I graph +is used for files with graphic data; +.I database +is used for database files. +.PP The possible colors are: black, gray, red, brightred, green, brightgreen, brown, yellow, blue, brightblue, magenta, brightmagenta, cyan, brightcyan, lightgray and white. And there is a special keyword diff -ruN mc-4.6.2.orig/doc/ru/mc.1.in mc-4.6.2/doc/ru/mc.1.in --- mc-4.6.2.orig/doc/ru/mc.1.in 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/doc/ru/mc.1.in 2008-11-27 01:00:21.000000000 +0200 @@ -3351,8 +3351,9 @@ dnormal, dfocus, dhotnormal, dhotfocus; ã×ÅÔÁ × ÏËÎÅ ÐÏÄÓËÁÚËÉ: helpnormal, helpitalic, helpbold, helplink, helpslink; × ÏËÎÅ ÐÒÏÇÒÁÍÍÙ ÐÒÏÓÍÏÔÒÁ: viewunderline; ÓÐÅÃÉÁÌØÎÙÅ ÐÏÄÓ×ÅÔËÉ: executable, directory, -link, device, special, core; × ÏËÎÅ ÒÅÄÁËÔÏÒÁ: editnormal, editbold, -editmarked. +link, device, special, core; ÐÏÄÓ×ÅÔËÁ ÆÁÊÌÏ× ÐÏ ÔÉÐÁÍ: hidden, temp, +doc, archive, source, media, graph, database; × ÏËÎÅ ÒÅÄÁËÔÏÒÁ: +editnormal, editbold, editmarked. .PP ã×ÅÔÁ ÚÁÄÁ×ÁÔØ ÎÅ ÏÂÑÚÁÔÅÌØÎÏ. ã×ÅÔ ËÁËÏÇÏ ÉÍÅÎÎÏ ÐÏÌÑ ÏÐÒÅÄÅÌÑÅÔÓÑ ËÁÖÄÙÍ ËÌÀÞÅ×ÙÍ ÓÌÏ×ÏÍ, ÍÏÖÎÏ ÐÏÎÑÔØ ÉÚ ÐÅÒÅ×ÏÄÁ ÜÔÏÇÏ ËÌÀÞÅ×ÏÇÏ ÓÌÏ×Á. @@ -3416,6 +3417,25 @@ .I core \- ÄÌÑ ÆÁÊÌÏ× Ó ÄÁÍÐÁÍÉ (core). .PP +áÎÁÌÏÇÉÞÎÏ ÐÏÄÓ×ÅÔËÁ ÆÁÊÌÏ× ÐÏ ÔÉÐÁÍ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ÐÏÄÓ×ÅÔËÉ ÆÁÊÌÏ× +× ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ÉÈ ÒÁÓÛÉÒÅÎÉÑ: +.I hidden +ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ÓËÒÙÔÙÈ ÆÁÊÌÏ× É ËÁÔÁÌÏÇÏ×, ËÏÔÏÒÙÅ ÎÁÞÉÎÁÀÔÓÑ Ó ÔÏÞËÉ; +.I temp +\- ÄÌÑ ×ÒÅÍÅÎÎÙÈ ÆÁÊÌÏ×; +.I doc +\- ÄÌÑ ÆÁÊÌÏ× ÄÏËÕÍÅÎÔÏ×; +.I archive +\- ÄÌÑ ÆÁÊÌÏ× ÁÒÈÉ×Ï×; +.I source +\- ÄÌÑ ÆÁÊÌÏ× ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ×; +.I media +\- ÄÌÑ ÍÕÌØÔÉÍÅÄÉÁ-ÆÁÊÌÏ×; +.I graph +\- ÄÌÑ ÇÒÁÆÉÞÅÓËÉÈ ÆÁÊÌÏ×; +.I database +\- ÄÌÑ ÆÁÊÌÏ× ÂÁÚ ÄÁÎÎÙÈ. +.PP ÷ÏÚÍÏÖÎÙÅ Ã×ÅÔÁ: black, gray, red, brightred, green, brightgreen, brown, yellow, blue, brightblue, magenta, brightmagenta, cyan, brightcyan, lightgray É white. diff -ruN mc-4.6.2.orig/lib/mc.ext.in mc-4.6.2/lib/mc.ext.in --- mc-4.6.2.orig/lib/mc.ext.in 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/lib/mc.ext.in 2008-11-27 01:00:21.000000000 +0200 @@ -107,20 +107,20 @@ ### Archives ### # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk -regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$ +regex/\.t([gp]?z|ar\.g?[zZ])$|\.([iI][pP][kK])$ Open=%cd %p#utar View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf - -regex/\.tar\.bz$ +regex/\.[tT][aA][rR]\.[bB][zZ]$ # Open=%cd %p#utar View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf - -regex/\.t(ar\.bz2|bz|b2)$ +regex/\.[tT]([aA][rR]\.[bB][zZ]2|[bB][zZ]|[bB]2)$ Open=%cd %p#utar View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf - # .tar.F - used in QNX -regex/\.tar\.F$ +regex/\.[tT][aA][rR]\.F$ # Open=%cd %p#utar View=%view{ascii} freeze -dc %f 2>/dev/null | tar tvvf - @@ -130,7 +130,7 @@ View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf - # tar -regex/\.(tar|TAR)$ +regex/\.[tT][aA][rR]$ Open=%cd %p#utar View=%view{ascii} tar tvvf %f @@ -140,10 +140,15 @@ View=%view{ascii} lha l %f # arj -regex/\.a(rj|[0-9][0-9])$ +regex/\.[aA]([rR][jJ]|[0-9][0-9])$ Open=%cd %p#uarj View=%view{ascii} unarj l %f +# cab +regex/\.([cC][aA][bB])$ + Open=%cd %p#ucab + View=%view{ascii} cabextract -l %f + # ha regex/\.([Hh][Aa])$ Open=%cd %p#uha @@ -152,7 +157,7 @@ # rar regex/\.[rR]([aA][rR]|[0-9][0-9])$ Open=%cd %p#urar - View=%view{ascii} rar v -c- %f + View=%view{ascii} unrar v -c- %f # ALZip regex/\.(alz|ALZ)$ @@ -207,9 +212,9 @@ View=%view{ascii} isoinfo -l -i %f # 7zip archives (they are not man pages) -shell/.7z - Open=%cd %p#u7z +regex/\.(7z|7Z)$ View=%view{ascii} 7za l %f 2>/dev/null + Open=%cd %p#u7z # Mailboxes type/^ASCII\ mail\ text @@ -304,12 +309,18 @@ type/^GIF Include=image +type/^GIMP XCF +Include=image + type/^JPEG Include=image type/^PC\ bitmap Include=image +type/^PCX +Include=image + type/^PNG Include=image @@ -328,18 +339,18 @@ type/^Netpbm Include=image -shell/.xcf +regex/\.([xX][cC][fF])$ Open=(gimp %f &) -shell/.xbm +regex/\.([xX][bB][mM])$ Open=bitmap %f -shell/.xpm +regex/\.([xX][pP][mM])$ Include=image View=sxpm %f include/image - Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi + Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f > /dev/null 2>&1 &); fi View=%view{ascii} identify %f #View=%view{ascii} asciiview %f @@ -371,12 +382,21 @@ Open=mplayer -vo null %f View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f +regex/\.([fF][lL][aA][cC])$ + Open=if [ "$DISPLAY" = "" ]; then mplayer %f; else (totem %f &); fi + View=%view{ascii} metaflac --list --except-block-type=SEEKTABLE %s + ### Play lists ### regex/\.([mM]3[uU]|[pP][lL][sS])$ Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi +regex/\.([kK][aA][fF][fF][eE][iI][nN][eE])$ + Open=if [ -n "$DISPLAY" ]; then (kaffeine %f >/dev/null 2>&1 &); fi + +regex/\.([kK]3[bB])$ + Open=if [ -n "$DISPLAY" ]; then (k3b %f >/dev/null 2>&1 &); fi ### Video ### @@ -411,7 +431,7 @@ Open=(realplay %f >/dev/null 2>&1 &) include/video - Open=(mplayer %f >/dev/null 2>&1 &) + Open=if [ -n "$DISPLAY" ]; then (gmplayer %f >/dev/null 2>&1 &); else mplayer -vo fb %f 2>/dev/null; fi #Open=(gtv %f >/dev/null 2>&1 &) #Open=(xanim %f >/dev/null 2>&1 &) @@ -438,6 +458,10 @@ 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 View=%view{ascii} lynx -dump -force_html %f +# Qt ui +regex/\.([uU][iI])$ + Open=(designer %f &) > /dev/null 2>/dev/null + # StarOffice 5.2 shell/.sdw Open=(ooffice %f &) @@ -546,6 +570,20 @@ View=%view{ascii} gzip -dc %f 2>/dev/null +# checksum files +regex/\.([sS][fF][vV])$ + Open=cksfv -f %f + +regex/\.([mM][dD]5)$ + Open=%view{ascii}md5sum -c %f + +regex/\.([dD][jJ][vV][uU])$ + View=%view{ascii} djvudump %f 2>/dev/null + Open=(evince %f &) + +regex/\.([iI][cC][oO])$ + Open=(gqview %f &) + ### Default ### # Default target for anything not described above diff -ruN mc-4.6.2.orig/src/boxes.c mc-4.6.2/src/boxes.c --- mc-4.6.2.orig/src/boxes.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/boxes.c 2008-11-27 01:00:21.000000000 +0200 @@ -644,6 +644,72 @@ #endif /* HAVE_CHARSET */ +/* +* File highlighting setup dialog +*/ +#define FILEHLY 20 +#define FILEHLX 56 + +static char *ret_ftmp; +static char *ret_fdoc; +static char *ret_farch; +static char *ret_fsrc; +static char *ret_fmedia; +static char *ret_fgraph; +static char *ret_fdbase; + +static QuickWidget filehl_widgets [] = { +{ quick_button, 30, FILEHLX, FILEHLY - 3, FILEHLY, N_("&Cancel"), 0, B_CANCEL, 0, 0, "button-cancel" }, +{ quick_button, 12, FILEHLX, FILEHLY - 3, FILEHLY, N_("&Ok"), 0, B_ENTER, 0, 0, "button-ok" }, +{ quick_input, 4, FILEHLX, 15, FILEHLY, "", 48, 0, 0, &ret_fdbase, "input-ft-dbase"}, +{ quick_label, 4, FILEHLX, 14, FILEHLY, N_("Databases"), 0, 0, 0, 0, "label-ft-dbase" }, +{ quick_input, 4, FILEHLX, 13, FILEHLY, "", 48, 0, 0, &ret_fgraph, "input-ft-graph"}, +{ quick_label, 4, FILEHLX, 12, FILEHLY, N_("Graphics"), 0, 0, 0, 0, "label-ft-graph" }, +{ quick_input, 4, FILEHLX, 11, FILEHLY, "", 48, 0, 0, &ret_fmedia, "input-ft-media" }, +{ quick_label, 4, FILEHLX, 10, FILEHLY, N_("Multimedia"), 0, 0, 0, 0, "label-ft-media" }, +{ quick_input, 4, FILEHLX, 9, FILEHLY, "", 48, 0, 0, &ret_fsrc, "input-ft-src" }, +{ quick_label, 4, FILEHLX, 8, FILEHLY, N_("Sources"), 0, 0, 0, 0, "label-ft-src" }, +{ quick_input, 4, FILEHLX, 7, FILEHLY, "", 48, 0, 0, &ret_farch, "input-ft-arch" }, +{ quick_label, 4, FILEHLX, 6, FILEHLY, N_("Archives"), 0, 0, 0, 0, "label-ft-arch" }, +{ quick_input, 4, FILEHLX, 5, FILEHLY, "", 48, 0, 0, &ret_fdoc, "input-ft-doc" }, +{ quick_label, 4, FILEHLX, 4, FILEHLY, N_("Text/Doc Files"), 0, 0, 0, 0, "label-ft-doc" }, +{ quick_input, 4, FILEHLX, 3, FILEHLY, "", 48, 0, 0, &ret_ftmp, "input-ft-tmp" }, +{ quick_label, 4, FILEHLX, 2, FILEHLY, N_("Temp Files"), 0, 0, 0, 0, "label-ft-tmp" }, +{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +}; + +static QuickDialog filehl_dlg = +{ FILEHLX, FILEHLY, -1, -1, N_(" File highlighting "), "[File highlighting]", filehl_widgets, 0 }; + +void +file_highlighting_box (void) +{ + filehl_widgets [2].text = file_types.fdbase; + filehl_widgets [4].text = file_types.fgraph; + filehl_widgets [6].text = file_types.fmedia; + filehl_widgets [8].text = file_types.fsrc; + filehl_widgets [10].text = file_types.farch; + filehl_widgets [12].text = file_types.fdoc; + filehl_widgets [14].text = file_types.ftmp; + + if (quick_dialog (&filehl_dlg) != B_CANCEL) { + g_free(file_types.ftmp); + file_types.ftmp = ret_ftmp; + g_free(file_types.fdoc); + file_types.fdoc = ret_fdoc; + g_free(file_types.farch); + file_types.farch = ret_farch; + g_free(file_types.fsrc); + file_types.fsrc = ret_fsrc; + g_free(file_types.fmedia); + file_types.fmedia = ret_fmedia; + g_free(file_types.fgraph); + file_types.fgraph = ret_fgraph; + g_free(file_types.fdbase); + file_types.fdbase = ret_fdbase; + } +} +//end File highlighting setup dialog #define TREE_Y 20 #define TREE_X 60 diff -ruN mc-4.6.2.orig/src/boxes.h mc-4.6.2/src/boxes.h --- mc-4.6.2.orig/src/boxes.h 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/boxes.h 2008-11-27 01:00:21.000000000 +0200 @@ -10,6 +10,7 @@ int *case_sensitive); void confirm_box (void); void display_bits_box (void); +void file_highlighting_box (void); void configure_vfs (void); void jobs_cmd (void); char *cd_dialog (void); diff -ruN mc-4.6.2.orig/src/cmd.c mc-4.6.2/src/cmd.c --- mc-4.6.2.orig/src/cmd.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/cmd.c 2008-11-27 01:00:21.000000000 +0200 @@ -86,6 +86,7 @@ if (plain_view) { + panel_dnotify_full_lock(1); int changed_hex_mode = 0; int changed_nroff_flag = 0; int changed_magic_flag = 0; @@ -110,9 +111,11 @@ if (changed_magic_flag && !altered_magic_flag) default_magic_flag = 1; repaint_screen (); + panel_dnotify_full_lock(0); return move_dir; } if (internal) { + panel_dnotify_full_lock(1); char view_entry[BUF_TINY]; if (start_line != 0) @@ -125,6 +128,7 @@ mc_internal_viewer (NULL, filename, &move_dir, start_line); repaint_screen (); } + panel_dnotify_full_lock(0); } else { if (!viewer) { viewer = getenv ("VIEWER"); @@ -133,7 +137,9 @@ if (!viewer) viewer = "view"; } + panel_dnotify_full_lock(1); execute_with_vfs_arg (viewer, filename); + panel_dnotify_full_lock(0); } return move_dir; } @@ -267,9 +273,11 @@ #ifdef USE_INTERNAL_EDIT if (use_internal_edit){ + panel_dnotify_full_lock(1); edit_file (what, start_line); update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); + panel_dnotify_full_lock(0); return; } #endif /* USE_INTERNAL_EDIT */ @@ -278,9 +286,12 @@ if (!editor) editor = get_default_editor (); } + + panel_dnotify_full_lock(1); execute_with_vfs_arg (editor, what); update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); + panel_dnotify_full_lock(0); } static void @@ -306,41 +317,49 @@ void copy_cmd (void) { + panel_dnotify_full_lock(1); save_cwds_stat (); if (panel_operate (current_panel, OP_COPY, 0)) { update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); } + panel_dnotify_full_lock(0); } /* Invoked by F6. Move/rename, default to the other panel, ignore marks. */ void ren_cmd (void) { + panel_dnotify_full_lock(1); save_cwds_stat (); if (panel_operate (current_panel, OP_MOVE, 0)){ update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); } + panel_dnotify_full_lock(0); } /* Invoked by F15. Copy, default to the same panel, ignore marks. */ void copy_cmd_local (void) { + panel_dnotify_full_lock(1); save_cwds_stat (); if (panel_operate (current_panel, OP_COPY, 1)){ update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); } + panel_dnotify_full_lock(0); } /* Invoked by F16. Move/rename, default to the same panel. */ void ren_cmd_local (void) { + panel_dnotify_full_lock(1); save_cwds_stat (); if (panel_operate (current_panel, OP_MOVE, 1)){ update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); } + panel_dnotify_full_lock(0); } void @@ -359,6 +378,7 @@ else absdir = concat_dir_and_file (current_panel->cwd, dir); + panel_dnotify_full_lock(1); save_cwds_stat (); if (my_mkdir (absdir, 0777) == 0) { update_panels (UP_OPTIMIZE, dir); @@ -370,27 +390,32 @@ g_free (absdir); g_free (dir); + panel_dnotify_full_lock(0); } void delete_cmd (void) { + panel_dnotify_full_lock(1); save_cwds_stat (); if (panel_operate (current_panel, OP_DELETE, 0)){ update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); } + panel_dnotify_full_lock(0); } /* Invoked by F18. Remove selected file, regardless of marked files. */ void delete_cmd_local (void) { + panel_dnotify_full_lock(1); save_cwds_stat (); if (panel_operate (current_panel, OP_DELETE, 1)){ update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); } + panel_dnotify_full_lock(0); } void find_cmd (void) @@ -450,6 +475,11 @@ else flag = UP_ONLY_CURRENT; +#ifdef __linux__ + panel_dnotify_reset(left_panel); + panel_dnotify_reset(right_panel); +#endif + update_panels (UP_RELOAD|flag, UP_KEEPSEL); repaint_screen (); } @@ -1277,7 +1307,7 @@ set_display_type (current_panel == left_panel ? 1 : 0, view_quick); } -static void +void switch_to_listing (int panel_index) { if (get_display_type (panel_index) != view_listing) diff -ruN mc-4.6.2.orig/src/cmd.h mc-4.6.2/src/cmd.h --- mc-4.6.2.orig/src/cmd.h 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/cmd.h 2008-11-27 01:00:21.000000000 +0200 @@ -1,6 +1,7 @@ #ifndef MC_CMD_H #define MC_CMD_H +void switch_to_listing (int); void netlink_cmd (void); void ftplink_cmd (void); void fishlink_cmd (void); diff -ruN mc-4.6.2.orig/src/color.c mc-4.6.2/src/color.c --- mc-4.6.2.orig/src/color.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/color.c 2008-11-27 01:00:21.000000000 +0200 @@ -91,13 +91,24 @@ { "special=", 0, 0 }, /* sockets, fifo */ { "core=", 0, 0 }, /* core files */ /* 29 */ - { 0, 0, 0 }, /* not usable (DEFAULT_COLOR_INDEX) *//* 30 */ + /* colors for specific file types */ + + { "hidden=", 0, 0 }, /* hidden files */ /*30*/ + { "temp=", 0, 0 }, /* temp file type */ /*31*/ + { "doc=", 0, 0 }, /* doc file type */ /*32*/ + { "archive=", 0, 0 }, /* archive file type */ /*33*/ + { "source=", 0, 0 }, /* sources file type */ /*34*/ + { "media=", 0, 0 }, /* multimedia file type */ /*35*/ + { "graph=", 0, 0 }, /* graphics file type */ /*36*/ + { "database=", 0, 0 }, /* database file type */ /*37*/ + + { 0, 0, 0 }, /* not usable (DEFAULT_COLOR_INDEX) *//* 38 */ { 0, 0, 0 }, /* unused */ { 0, 0, 0 }, /* not usable (A_REVERSE) */ { 0, 0, 0 }, /* not usable (A_REVERSE_BOLD) */ -/* editor colors start at 34 */ - { "editnormal=", 0, 0 }, /* normal */ /* 34 */ +/* editor colors start at 42 */ + { "editnormal=", 0, 0 }, /* normal */ /* 42 */ { "editbold=", 0, 0 }, /* search->found */ { "editmarked=", 0, 0 }, /* marked/selected */ { "editwhitespace=", 0, 0 }, /* whitespace */ @@ -163,6 +174,14 @@ "device=brightmagenta,blue:" "core=red,blue:" "special=black,blue:" +"hidden=black,blue:" +"temp=gray,blue:" +"doc=brown,blue:" +"archive=brightmagenta,blue:" +"source=cyan,blue:" +"media=green,blue:" +"graph=brightcyan,blue:" +"database=brightred,blue:" "editnormal=lightgray,blue:" "editbold=yellow,blue:" "editmarked=black,cyan:" @@ -260,6 +279,10 @@ extern char *command_line_colors; configure_colors_string (default_colors); + + if (!getuid()) + configure_colors_string ("errors=yellow,red"); + configure_colors_string (setup_color_string); configure_colors_string (term_color_string); configure_colors_string (getenv ("MC_COLOR_TABLE")); @@ -267,7 +290,7 @@ } #ifndef HAVE_SLANG -#define MAX_PAIRS 64 +#define MAX_PAIRS 84 int attr_pairs [MAX_PAIRS]; #endif diff -ruN mc-4.6.2.orig/src/color.h mc-4.6.2/src/color.h --- mc-4.6.2.orig/src/color.h 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/color.h 2008-11-27 01:00:21.000000000 +0200 @@ -65,9 +65,18 @@ #define SPECIAL_COLOR IF_COLOR (28, 0) #define CORE_COLOR IF_COLOR (29, 0) +/* colors for specific files */ +#define HIDDEN_COLOR IF_COLOR (30, 0) +#define TEMP_COLOR IF_COLOR (31, 0) +#define DOC_COLOR IF_COLOR (32, 0) +#define ARCH_COLOR IF_COLOR (33, 0) +#define SRC_COLOR IF_COLOR (34, 0) +#define MEDIA_COLOR IF_COLOR (35, 0) +#define GRAPH_COLOR IF_COLOR (36, 0) +#define DBASE_COLOR IF_COLOR (37, 0) /* For the default color any unused index may be chosen. */ -#define DEFAULT_COLOR_INDEX 30 +#define DEFAULT_COLOR_INDEX 38 #define DEFAULT_COLOR IF_COLOR (DEFAULT_COLOR_INDEX, 0) /* @@ -75,15 +84,15 @@ * respectively * Last is defined to view color. */ -#define EDITOR_NORMAL_COLOR_INDEX 34 +#define EDITOR_NORMAL_COLOR_INDEX 42 #define EDITOR_NORMAL_COLOR IF_COLOR (EDITOR_NORMAL_COLOR_INDEX, 0) -#define EDITOR_BOLD_COLOR IF_COLOR (35, A_BOLD) -#define EDITOR_MARKED_COLOR IF_COLOR (36, A_REVERSE) +#define EDITOR_BOLD_COLOR IF_COLOR (43, A_BOLD) +#define EDITOR_MARKED_COLOR IF_COLOR (44, A_REVERSE) #define EDITOR_WHITESPACE_COLOR IF_COLOR (37, 0 /* irrelevant */) /* Error dialog colors */ -#define ERROR_HOT_NORMAL IF_COLOR (38, 0) -#define ERROR_HOT_FOCUS IF_COLOR (39, 0) +#define ERROR_HOT_NORMAL IF_COLOR (45, 0) +#define ERROR_HOT_FOCUS IF_COLOR (46, 0) #ifdef HAVE_SLANG # define CTYPE const char * @@ -91,6 +100,19 @@ # define CTYPE int #endif +/* File Types for file highlighting */ +struct file_types_t { + char *ftmp; + char *fdoc; + char *farch; + char *fsrc; + char *fmedia; + char *fgraph; + char *fdbase; +}; + +extern struct file_types_t file_types; + void init_colors (void); void done_colors (void); void mc_init_pair (int index, CTYPE foreground, CTYPE background); diff -ruN mc-4.6.2.orig/src/command.c mc-4.6.2/src/command.c --- mc-4.6.2.orig/src/command.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/command.c 2008-11-27 01:00:21.000000000 +0200 @@ -215,6 +215,11 @@ size_t i, j, cmd_len; if (!vfs_current_is_local ()) { + if (strcmp (cmd, "exit") == 0) { + quiet_quit_cmd (); + return MSG_HANDLED; + } + message (1, MSG_ERROR, _ (" Cannot execute commands on non-local filesystems")); diff -ruN mc-4.6.2.orig/src/dir.c mc-4.6.2/src/dir.c --- mc-4.6.2.orig/src/dir.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/dir.c 2008-11-27 01:00:21.000000000 +0200 @@ -23,7 +23,9 @@ #include #include +#include #include +#include #include "global.h" #include "tty.h" @@ -46,6 +48,8 @@ /* Are the files sorted case sensitively? */ static int case_sensitive = OS_SORT_CASE_SENSITIVE_DEFAULT; +extern int panel_dnotify_handler_set; + #define MY_ISDIR(x) ( (S_ISDIR (x->st.st_mode) || x->f.link_to_dir) ? 1 : 0) sort_orders_t sort_orders [SORT_TYPES_TOTAL] = { @@ -382,13 +386,24 @@ int do_load_dir (const char *path, dir_list *list, sortfn *sort, int reverse, - int case_sensitive, const char *filter) + int case_sensitive, const char *filter, + int *dn_fd, char *dn_dir, void (*dn_hd)(int, siginfo_t *, void *)) { DIR *dirp; struct dirent *dp; int status, link_to_dir, stale_link; int next_free = 0; struct stat st; + struct sigaction act; + +#ifdef __linux__ + /* Dnotify stuff */ + if(*dn_fd != -1) + { + close(*dn_fd); + *dn_fd = -1; + } +#endif /* ".." (if any) must be the first entry in the list */ if (set_zero_dir (list) == 0) @@ -400,6 +415,28 @@ message (1, MSG_ERROR, _("Cannot read directory contents")); return next_free; } + +#ifdef __linux__ + /* Dnotify stuff */ + *dn_fd = open(path, O_RDONLY); + + if(*dn_fd != -1) + { + if(!panel_dnotify_handler_set) + { + panel_dnotify_handler_set = 1; + act.sa_sigaction = dn_hd; + sigemptyset(&act.sa_mask); + act.sa_flags = SA_SIGINFO; + sigaction(SIGRTMIN + 1, &act, NULL); + } + + fcntl(*dn_fd, F_SETSIG, SIGRTMIN + 1); + fcntl(*dn_fd, F_NOTIFY, DN_MODIFY|DN_CREATE|DN_RENAME|DN_DELETE|DN_ATTRIB|DN_MULTISHOT); + strncpy(dn_dir, path, MC_MAXPATHLEN); + } +#endif + tree_store_start_check (path); /* Do not add a ".." entry to the root directory */ if (!strcmp (path, "/")) @@ -433,6 +470,7 @@ mc_closedir (dirp); tree_store_end_check (); + return next_free; } diff -ruN mc-4.6.2.orig/src/dir.h mc-4.6.2/src/dir.h --- mc-4.6.2.orig/src/dir.h 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/dir.h 2008-11-27 01:00:21.000000000 +0200 @@ -31,7 +31,7 @@ typedef int sortfn (const void *, const void *); int do_load_dir (const char *path, dir_list * list, sortfn * sort, int reverse, - int case_sensitive, const char *filter); + int case_sensitive, const char *filter, int *dn_fd, char *dn_dir, void (*dn_hd)(int, siginfo_t *, void *)); void do_sort (dir_list * list, sortfn * sort, int top, int reverse, int case_sensitive); int do_reload_dir (const char *path, dir_list * list, sortfn * sort, int count, diff -ruN mc-4.6.2.orig/src/execute.c mc-4.6.2/src/execute.c --- mc-4.6.2.orig/src/execute.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/execute.c 2008-11-27 01:00:21.000000000 +0200 @@ -24,6 +24,7 @@ #include "win.h" #include "key.h" #include "main.h" +#include "panel.h" #include "cons.saver.h" #include "subshell.h" #include "layout.h" @@ -31,7 +32,6 @@ #include "wtools.h" #include "execute.h" - static void edition_post_exec (void) { @@ -214,6 +214,8 @@ char **new_dir_p; #endif /* HAVE_SUBSHELL_SUPPORT */ + panel_dnotify_full_lock(1); + channels_down (); disable_mouse (); if (clear_before_exec) @@ -262,7 +264,10 @@ /* Prevent screen flash when user did 'exit' or 'logout' within subshell */ if (quit) + { + panel_dnotify_full_lock(0); return; + } enable_mouse (); channels_up (); @@ -284,6 +289,7 @@ update_panels (UP_OPTIMIZE, UP_KEEPSEL); update_xterm_title_path (); do_refresh (); + panel_dnotify_full_lock(0); } diff -ruN mc-4.6.2.orig/src/file.c mc-4.6.2/src/file.c --- mc-4.6.2.orig/src/file.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/file.c 2008-11-27 01:00:21.000000000 +0200 @@ -740,7 +740,12 @@ return_status = file_progress_show (ctx, n_read_total + ctx->do_reget, file_size); } - mc_refresh (); + + if (winch_flag) + change_screen_size (); + else + mc_refresh(); + if (return_status != FILE_CONT) goto ret; } diff -ruN mc-4.6.2.orig/src/filegui.c mc-4.6.2/src/filegui.c --- mc-4.6.2.orig/src/filegui.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/filegui.c 2008-11-27 01:00:21.000000000 +0200 @@ -53,6 +53,13 @@ #include #include +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) +#include +#include +#elif defined(linux) || defined(__linux__) +#include +#endif + #include "global.h" #include "setup.h" /* verbose */ #include "dialog.h" /* do_refresh() */ @@ -854,6 +861,36 @@ #endif /* !ENABLE_NLS */ } +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) + +#ifndef NO_FILE_OPT_FS +#define NO_FILE_OPT_FS ":msdosfs:hpfs:ntfs:smbfs:nwfs:udf:procfs:linprocfs:" +#endif //NO_FILE_OPT_FS + +#elif defined(linux) || defined(__linux__) + +#ifndef MSDOS_SUPER_MAGIC +#define MSDOS_SUPER_MAGIC 0x4d44 +#endif //MSDOS_SUPER_MAGIC + +#ifndef NTFS_SB_MAGIC +#define NTFS_SB_MAGIC 0x5346544e +#endif //NTFS_SB_MAGIC + +#ifndef PROC_SUPER_MAGIC +#define PROC_SUPER_MAGIC 0x9fa0 +#endif //PROC_SUPER_MAGIC + +#ifndef SMB_SUPER_MAGIC +#define SMB_SUPER_MAGIC 0x517B +#endif //SMB_SUPER_MAGIC + +#ifndef NCP_SUPER_MAGIC +#define NCP_SUPER_MAGIC 0x564c +#endif //NCP_SUPER_MAGIC + +#endif + char * file_mask_dialog (FileOpContext *ctx, FileOperation operation, const char *text, const char *def_text, int only_one, int *do_background) @@ -862,6 +899,7 @@ char *source_mask, *orig_mask, *dest_dir, *tmpdest; const char *error; char *def_text_secure; + static struct statfs stfs; struct stat buf; int val; QuickDialog Quick_input; @@ -875,6 +913,23 @@ /* Set up the result pointers */ +#if 0 + if (statfs(def_text, &stfs) == 0) { + +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) + if (strstr(NO_FILE_OPT_FS, stfs.f_fstypename)) { +#elif defined(linux) || defined(__linux__) + if (stfs.f_type==MSDOS_SUPER_MAGIC || + stfs.f_type==NTFS_SB_MAGIC || + stfs.f_type==SMB_SUPER_MAGIC || + stfs.f_type==NCP_SUPER_MAGIC) { +#endif + + ctx->op_preserve=0; + } + } +#endif + fmd_widgets[FMCB12].result = &ctx->op_preserve; fmd_widgets[FMCB11].result = &ctx->follow_links; fmd_widgets[FMCB22].result = &ctx->stable_symlinks; diff -ruN mc-4.6.2.orig/src/layout.c mc-4.6.2/src/layout.c --- mc-4.6.2.orig/src/layout.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/layout.c 2008-11-27 01:00:21.000000000 +0200 @@ -97,6 +97,9 @@ /* Set to show current working dir in xterm window title */ int xterm_title = 1; +/* Set to show free space on device assigned to current directory */ +int free_space = 1; + /* The starting line for the output of the subprogram */ int output_start_y = 0; @@ -126,8 +129,10 @@ static int _keybar_visible; static int _message_visible; static int _xterm_title; +static int _free_space; static int _permission_mode; static int _filetype_mode; +static int _colorize_hidden_mode; static int height; @@ -135,7 +140,7 @@ #define MINWIDTH 12 #define MINHEIGHT 5 -#define BY 12 +#define BY 14 #define B_2LEFT B_USER #define B_2RIGHT (B_USER + 1) @@ -157,6 +162,7 @@ WCheck *widget; } check_options [] = { { N_("&Xterm window title"), &xterm_title, 0 }, + { N_("Show free sp&Ace"), &free_space, 0 }, { N_("h&Intbar visible"), &message_visible, 0 }, { N_("&Keybar visible"), &keybar_visible, 0 }, { N_("command &Prompt"), &command_prompt, 0 }, @@ -165,6 +171,7 @@ { N_("&Equal split"), &equal_split, 0 }, { N_("pe&Rmissions"), &permission_mode, 0 }, { N_("&File types"), &filetype_mode, 0 }, + { N_("&Hidden files"), &colorize_hidden_mode,0 }, { 0, 0, 0 } }; @@ -227,8 +234,8 @@ if (_equal_split){ /* Turn equal split off */ _equal_split = 0; - check_options [6].widget->state = check_options [6].widget->state & ~C_BOOL; - dlg_select_widget (check_options [6].widget); + check_options [7].widget->state = check_options [7].widget->state & ~C_BOOL; + dlg_select_widget (check_options [7].widget); dlg_select_widget (bleft_widget); } _first_panel_size++; @@ -242,8 +249,8 @@ if (_equal_split){ /* Turn equal split off */ _equal_split = 0; - check_options [6].widget->state = check_options [6].widget->state & ~C_BOOL; - dlg_select_widget (check_options [6].widget); + check_options [7].widget->state = check_options [7].widget->state & ~C_BOOL; + dlg_select_widget (check_options [7].widget); dlg_select_widget (bright_widget); } _first_panel_size--; @@ -298,14 +305,16 @@ return MSG_HANDLED; case DLG_POST_KEY: - _filetype_mode = check_options [8].widget->state & C_BOOL; - _permission_mode = check_options [7].widget->state & C_BOOL; - _equal_split = check_options [6].widget->state & C_BOOL; - _menubar_visible = check_options [5].widget->state & C_BOOL; + _colorize_hidden_mode = check_options [10].widget->state & C_BOOL; + _filetype_mode = check_options [9].widget->state & C_BOOL; + _permission_mode = check_options [8].widget->state & C_BOOL; + _equal_split = check_options [7].widget->state & C_BOOL; + _menubar_visible = check_options [6].widget->state & C_BOOL; _command_prompt = check_options [4].widget->state & C_BOOL; - _keybar_visible = check_options [2].widget->state & C_BOOL; - _message_visible = check_options [1].widget->state & C_BOOL; + _keybar_visible = check_options [3].widget->state & C_BOOL; + _message_visible = check_options [2].widget->state & C_BOOL; _xterm_title = check_options [0].widget->state & C_BOOL; + _free_space = check_options [1].widget->state & C_BOOL; if (console_flag){ int minimum; if (_output_lines < 0) @@ -367,36 +376,36 @@ while (i--) { s_split_direction[i] = _(s_split_direction[i]); - l1 = strlen (s_split_direction[i]) + 7; + l1 = mbstrlen (s_split_direction[i]) + 7; if (l1 > first_width) first_width = l1; } - for (i = 0; i <= 8; i++) { + for (i = 0; i <= 10; i++) { check_options[i].text = _(check_options[i].text); - l1 = strlen (check_options[i].text) + 7; + l1 = mbstrlen (check_options[i].text) + 7; if (l1 > first_width) first_width = l1; } - l1 = strlen (title1) + 1; + l1 = mbstrlen (title1) + 1; if (l1 > first_width) first_width = l1; - l1 = strlen (title2) + 1; + l1 = mbstrlen (title2) + 1; if (l1 > first_width) first_width = l1; - second_width = strlen (title3) + 1; - for (i = 0; i < 6; i++) { + second_width = mbstrlen (title3) + 1; + for (i = 0; i < 7; i++) { check_options[i].text = _(check_options[i].text); - l1 = strlen (check_options[i].text) + 7; + l1 = mbstrlen (check_options[i].text) + 7; if (l1 > second_width) second_width = l1; } if (console_flag) { - l1 = strlen (output_lines_label) + 13; + l1 = mbstrlen (output_lines_label) + 13; if (l1 > second_width) second_width = l1; } @@ -410,27 +419,27 @@ * * Now the last thing to do - properly space buttons... */ - l1 = 11 + strlen (ok_button) /* 14 - all brackets and inner space */ - +strlen (save_button) /* notice: it is 3 char less because */ - +strlen (cancel_button); /* of '&' char in button text */ + l1 = 11 + mbstrlen (ok_button) /* 14 - all brackets and inner space */ + +mbstrlen (save_button) /* notice: it is 3 char less because */ + +mbstrlen (cancel_button); /* of '&' char in button text */ i = (first_width + second_width - l1) / 4; b1 = 5 + i; - b2 = b1 + strlen (ok_button) + i + 6; - b3 = b2 + strlen (save_button) + i + 4; + b2 = b1 + mbstrlen (ok_button) + i + 6; + b3 = b2 + mbstrlen (save_button) + i + 4; i18n_layt_flag = 1; } layout_dlg = - create_dlg (0, 0, 15, first_width + second_width + 9, + create_dlg (0, 0, 17, first_width + second_width + 9, dialog_colors, layout_callback, "[Layout]", _("Layout"), DLG_CENTER | DLG_REVERSE); add_widget (layout_dlg, groupbox_new (4, 2, first_width, 6, title1)); - add_widget (layout_dlg, groupbox_new (4, 8, first_width, 4, title2)); + add_widget (layout_dlg, groupbox_new (4, 8, first_width, 6, title2)); add_widget (layout_dlg, - groupbox_new (5 + first_width, 2, second_width, 10, + groupbox_new (5 + first_width, 2, second_width, 12, title3)); add_widget (layout_dlg, @@ -452,16 +461,21 @@ } #define XTRACT(i) *check_options[i].variable, check_options[i].text - for (i = 0; i < 6; i++) { + for (i = 0; i < 7; i++) { check_options[i].widget = - check_new (8 - i, 7 + first_width, XTRACT (i)); + check_new (9 - i, 8 + first_width, XTRACT (i)); add_widget (layout_dlg, check_options[i].widget); } + check_options[10].widget = check_new (12, 6, XTRACT (10)); + add_widget (layout_dlg, check_options[10].widget); + check_options[9].widget = check_new (11, 6, XTRACT (9)); + add_widget (layout_dlg, check_options[9].widget); check_options[8].widget = check_new (10, 6, XTRACT (8)); add_widget (layout_dlg, check_options[8].widget); check_options[7].widget = check_new (9, 6, XTRACT (7)); add_widget (layout_dlg, check_options[7].widget); + _colorize_hidden_mode = colorize_hidden_mode; _filetype_mode = filetype_mode; _permission_mode = permission_mode; _equal_split = equal_split; @@ -470,28 +484,27 @@ _keybar_visible = keybar_visible; _message_visible = message_visible; _xterm_title = xterm_title; + _free_space = free_space; bright_widget = button_new (6, 15, B_2RIGHT, NARROW_BUTTON, "&>", b2right_cback); add_widget (layout_dlg, bright_widget); bleft_widget = button_new (6, 9, B_2LEFT, NARROW_BUTTON, "&<", b2left_cback); add_widget (layout_dlg, bleft_widget); - check_options[6].widget = check_new (5, 6, XTRACT (6)); + check_options[7].widget = check_new (5, 6, XTRACT (7)); old_first_panel_size = -1; old_horizontal_split = -1; old_output_lines = -1; _first_panel_size = first_panel_size; _output_lines = output_lines; - add_widget (layout_dlg, check_options[6].widget); + add_widget (layout_dlg, check_options[7].widget); radio_widget = radio_new (3, 6, 2, s_split_direction); add_widget (layout_dlg, radio_widget); radio_widget->sel = horizontal_split; } -static void -layout_change (void) -{ +void layout_change(void) { setup_panels (); /* re-init the menu, because perhaps there was a change in the way how the panel are split (horizontal/vertical). */ @@ -681,7 +694,7 @@ panel_do_cols (0); panel_do_cols (1); - promptl = strlen (prompt); + promptl = mbstrlen (prompt); widget_set_size (&the_menubar->widget, 0, 0, 1, COLS); diff -ruN mc-4.6.2.orig/src/layout.h mc-4.6.2/src/layout.h --- mc-4.6.2.orig/src/layout.h 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/layout.h 2008-11-27 01:00:21.000000000 +0200 @@ -8,6 +8,7 @@ void init_curses (void); void done_screen (void); void setup_panels (void); +void layout_change(void); void destroy_panels (void); void move_resize_panel (void); void flag_winch (int dummy); @@ -39,6 +40,7 @@ extern int output_start_y; extern int message_visible; extern int xterm_title; +extern int free_space; extern int horizontal_split; extern int nice_rotating_dash; diff -ruN mc-4.6.2.orig/src/main.c mc-4.6.2/src/main.c --- mc-4.6.2.orig/src/main.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/main.c 2008-11-27 01:00:21.000000000 +0200 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -61,6 +62,7 @@ #include "listmode.h" #include "execute.h" #include "ext.h" /* For flush_extension_file() */ +#include "mountlist.h" /* my_statfs */ /* Listbox for the command history feature */ #include "widget.h" @@ -90,6 +92,8 @@ #include "popt.h" +#include "selmnt.h" + /* When the modes are active, left_panel, right_panel and tree_panel */ /* Point to a proper data structure. You should check with the functions */ /* get_current_type and get_other_type the types of the panels before using */ @@ -231,6 +235,12 @@ /* We need to paint it after CONSOLE_RESTORE, see: load_prompt */ int update_prompt = 0; +/* Old current working directory for displaying free space */ +char *old_cwd = NULL; + +/* Used to figure out how many free space we have */ +struct my_statfs myfs_stats; + /* The home directory */ const char *home_dir = NULL; @@ -276,7 +286,10 @@ /* The user's shell */ const char *shell = NULL; -/* mc_home: The home of MC */ +/* The xterm title */ +char *xterm_title_str = NULL; + +/* mc_home: The home of MC - /etc/mc or defined by MC_DATADIR */ char *mc_home = NULL; char cmd_buf[512]; @@ -319,7 +332,7 @@ mc_chdir (current_panel->cwd); } -static void +void update_one_panel_widget (WPanel *panel, int force_update, const char *current_file) { @@ -406,6 +419,7 @@ panel = (WPanel *) get_panel_widget (get_other_index ()); mc_chdir (panel->cwd); + show_free_space(current_panel); } /* Save current stat of directories to avoid reloading the panels */ @@ -436,7 +450,7 @@ do_update_prompt (void) { if (update_prompt) { - printf ("%s", subshell_prompt); + printf ("\n\r%s", subshell_prompt); fflush (stdout); update_prompt = 0; } @@ -461,6 +475,41 @@ } } +void +show_free_space(WPanel *panel) +{ + if (!show_mini_info) + return; + + /* Don't try to stat non-local fs */ + if (!free_space || !vfs_file_is_local(panel->cwd)) + return; + + if (old_cwd == NULL || strcmp(old_cwd, panel->cwd) != 0) { + char rpath[PATH_MAX]; + + init_my_statfs(); + g_free(old_cwd); + old_cwd = g_strdup(panel->cwd); + + if (mc_realpath (panel->cwd, rpath) == NULL) + return; + my_statfs (&myfs_stats, rpath); + } + + if (myfs_stats.avail > 0 || myfs_stats.total > 0) { + char buffer1 [6], buffer2[6], *tmp; + size_trunc_len (buffer1, 5, myfs_stats.avail, 1); + size_trunc_len (buffer2, 5, myfs_stats.total, 1); + tmp = g_strdup_printf (_("%s (%d%%) of %s"), buffer1, myfs_stats.total > 0 ? + (int)(100 * (double)myfs_stats.avail / myfs_stats.total) : 0, + buffer2); + widget_move (&panel->widget, panel->widget.lines-1, panel->widget.cols-2-strlen(tmp)); + addstr (tmp); + g_free (tmp); + } +} + static int quit_cmd_internal (int quiet) { @@ -561,7 +610,7 @@ * Changes the current directory of the panel. * Don't record change in the directory history. */ -static int +int _do_panel_cd (WPanel *panel, const char *new_dir, enum cd_enum cd_type) { const char *directory; @@ -587,7 +636,7 @@ } directory = *new_dir ? new_dir : home_dir; - if (mc_chdir (directory) == -1) { + if (strchr(directory,'\n') || mc_chdir (directory) == -1) { strcpy (panel->cwd, olddir); g_free (olddir); g_free (translated_url); @@ -609,7 +658,8 @@ panel_clean_dir (panel); panel->count = do_load_dir (panel->cwd, &panel->dir, panel->sort_type, - panel->reverse, panel->case_sensitive, panel->filter); + panel->reverse, panel->case_sensitive, panel->filter, + &panel->dnotify_fd, panel->dnotify_dir, panel_dnotify_handler); try_to_select (panel, get_parent_dir_name (panel->cwd, olddir)); load_hint (0); panel->dirty = 1; @@ -919,6 +969,7 @@ {' ', N_("c&Onfirmation..."), 'O', confirm_box}, {' ', N_("&Display bits..."), 'D', display_bits_box}, {' ', N_("learn &Keys..."), 'K', learn_keys}, + {' ', N_("file &Highlighting..."),'H', file_highlighting_box}, #ifdef USE_VFS {' ', N_("&Virtual FS..."), 'V', configure_vfs}, #endif /* !USE_VFS */ @@ -1019,6 +1070,13 @@ { show_dot_files = !show_dot_files; update_panels (UP_RELOAD, UP_KEEPSEL); + do_refresh(); +} + +void toggle_horiz_vert_layout(void) { + horizontal_split = !horizontal_split; + layout_change(); + do_refresh(); } /* @@ -1261,6 +1319,8 @@ } static const key_map default_map[] = { + {KEY_F (11), select_mnt_left }, + {KEY_F (12), select_mnt_right }, {KEY_F (19), menu_last_selected_cmd}, {KEY_F (20), quiet_quit_cmd}, @@ -1293,6 +1353,12 @@ /* Swap panels */ {XCTRL ('u'), swap_cmd}, + /* Toggle Hidden Files */ + {ALT ('.'), toggle_show_hidden}, + + /* Toggle Horizontal/Vertical layout */ + {ALT (','), toggle_horiz_vert_layout}, + /* View output */ {XCTRL ('o'), view_other_cmd}, @@ -1434,6 +1500,15 @@ save_hotlist (); done_screen (); vfs_add_current_stamps (); + + /* Free file highlighting variables */ + g_free(file_types.ftmp); + g_free(file_types.fdoc); + g_free(file_types.farch); + g_free(file_types.fsrc); + g_free(file_types.fmedia); + g_free(file_types.fgraph); + g_free(file_types.fdbase); } /* This should be called after destroy_dlg since panel widgets @@ -1607,16 +1682,30 @@ update_xterm_title_path (void) { char *p, *s; + char h[64]; + struct passwd *pw; if (xterm_flag && xterm_title) { + if ( xterm_title_str ) g_free (xterm_title_str); p = s = g_strdup (strip_home_and_password (current_panel->cwd)); + if ( !gethostname (h, 64) ) { + h[63] = '\0'; /* Be sure the hostname is NUL terminated */ + s = g_strdup_printf ("%s:%s", h, s); + g_free (p); + p = s; + } + if ( (pw = getpwuid(getuid())) ) { + s = g_strdup_printf ("%s@%s", pw->pw_name, s); + g_free (p); + p = s; + } do { if (!is_printable ((unsigned char) *s)) *s = '?'; } while (*++s); fprintf (stdout, "\33]0;mc - %s\7", p); fflush (stdout); - g_free (p); + xterm_title_str = p; } } @@ -1884,7 +1973,9 @@ " Menus: menu, menuhot, menusel, menuhotsel\n" " Editor: editnormal, editbold, editmarked\n" " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n" - " File types: directory, executable, link, stalelink, device, special, core\n" + " File types: directory, executable, link, stalelink, device, special,\n" + " core, hidden, temp, doc, archive, source, media, graph,\n" + " database\n" "\n" "Colors:\n" " black, gray, red, brightred, green, brightgreen, brown,\n" " yellow, blue, brightblue, magenta, brightmagenta, cyan,\n" diff -ruN mc-4.6.2.orig/src/main.h mc-4.6.2/src/main.h --- mc-4.6.2.orig/src/main.h 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/main.h 2008-11-27 01:00:21.000000000 +0200 @@ -100,6 +100,7 @@ int load_prompt (int, void *); void save_cwds_stat (void); void quiet_quit_cmd (void); /* For cmd.c and command.c */ +void show_free_space(WPanel *panel); void touch_bar (void); void update_xterm_title_path (void); diff -ruN mc-4.6.2.orig/src/Makefile.am mc-4.6.2/src/Makefile.am --- mc-4.6.2.orig/src/Makefile.am 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/Makefile.am 2008-11-27 01:00:21.000000000 +0200 @@ -8,9 +8,9 @@ if CONS_SAVER pkglibexec_PROGRAMS = cons.saver AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" \ - -DSAVERDIR=\""$(pkglibexecdir)"\" + -DSAVERDIR=\""$(pkglibexecdir)"\" -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\" else -AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" +AM_CPPFLAGS = -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" -DSYSCONFDIR=\""$(sysconfdir)/@PACKAGE@/"\" endif noinst_PROGRAMS = man2hlp @@ -63,7 +63,7 @@ tree.c tree.h treestore.c treestore.h tty.c tty.h user.c user.h \ util.c util.h utilunix.c view.c view.h vfsdummy.h widget.c \ widget.h win.c win.h wtools.c wtools.h unixcompat.h \ - x11conn.h x11conn.c ecs.h ecs.c + x11conn.h x11conn.c ecs.h ecs.c selmnt.c selmnt.h if CHARSET mc_SOURCES = $(SRCS) $(CHARSET_SRC) diff -ruN mc-4.6.2.orig/src/mountlist.c mc-4.6.2/src/mountlist.c --- mc-4.6.2.orig/src/mountlist.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/mountlist.c 2008-11-27 01:00:21.000000000 +0200 @@ -123,30 +123,9 @@ # define HAVE_INFOMOUNT #endif -/* A mount table entry. */ -struct mount_entry -{ - char *me_devname; /* Device node pathname, including "/dev/". */ - char *me_mountdir; /* Mount point directory pathname. */ - char *me_type; /* "nfs", "4.2", etc. */ - dev_t me_dev; /* Device number of me_mountdir. */ - struct mount_entry *me_next; -}; - -struct fs_usage -{ - long fsu_blocks; /* Total blocks. */ - long fsu_bfree; /* Free blocks available to superuser. */ - long fsu_bavail; /* Free blocks available to non-superuser. */ - long fsu_files; /* Total file nodes. */ - long fsu_ffree; /* Free file nodes. */ -}; - -static int get_fs_usage (char *path, struct fs_usage *fsp); - #ifdef HAVE_INFOMOUNT_LIST -static struct mount_entry *mount_list = NULL; +struct mount_entry *mount_list = NULL; #ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ /* Return the value of the hexadecimal number represented by CP. @@ -292,7 +271,7 @@ If ALL_FS is zero, do not return entries for filesystems that are automounter (dummy) entries. */ -static struct mount_entry * +struct mount_entry * read_filesystem_list (int need_fs_type, int all_fs) { struct mount_entry *mlist; @@ -610,7 +589,7 @@ ** this hack. */ -static struct mount_entry * +struct mount_entry * read_filesystem_list(int need_fs_type, int all_fs) { struct _disk_entry de; @@ -801,7 +780,7 @@ the filesystem on which PATH resides. Return 0 if successful, -1 if not. */ -static int +int get_fs_usage (char *path, struct fs_usage *fsp) { #ifdef STAT_STATFS3_OSF1 diff -ruN mc-4.6.2.orig/src/mountlist.h mc-4.6.2/src/mountlist.h --- mc-4.6.2.orig/src/mountlist.h 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/mountlist.h 2008-11-27 01:00:21.000000000 +0200 @@ -33,4 +33,28 @@ void init_my_statfs (void); void my_statfs (struct my_statfs *myfs_stats, const char *path); +/* A mount table entry. */ +struct mount_entry +{ + char *me_devname; /* Device node pathname, including "/dev/". */ + char *me_mountdir; /* Mount point directory pathname. */ + char *me_type; /* "nfs", "4.2", etc. */ + dev_t me_dev; /* Device number of me_mountdir. */ + struct mount_entry *me_next; +}; + +struct mount_entry * +read_filesystem_list (int need_fs_type, int all_fs); + +struct fs_usage +{ + long fsu_blocks; /* Total blocks. */ + long fsu_bfree; /* Free blocks available to superuser. */ + long fsu_bavail; /* Free blocks available to non-superuser. */ + long fsu_files; /* Total file nodes. */ + long fsu_ffree; /* Free file nodes. */ +}; + +int get_fs_usage (char *path, struct fs_usage *fsp); + #endif diff -ruN mc-4.6.2.orig/src/panel.h mc-4.6.2/src/panel.h --- mc-4.6.2.orig/src/panel.h 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/panel.h 2008-11-27 01:00:21.000000000 +0200 @@ -1,6 +1,8 @@ #ifndef MC_PANEL_H #define MC_PANEL_H +#include + #include "dir.h" /* dir_list */ #include "dialog.h" /* Widget */ @@ -69,6 +71,9 @@ char *panel_name; /* The panel name */ struct stat dir_stat; /* Stat of current dir: used by execute () */ + char dnotify_dir[MC_MAXPATHLEN];/* DNotify Directory */ + int dnotify_fd; + int searching; char search_buffer [256]; } WPanel; @@ -79,6 +84,7 @@ extern int torben_fj_mode; extern int permission_mode; extern int filetype_mode; +extern int colorize_hidden_mode; extern int show_mini_info; extern int panel_scroll_pages; extern int fast_reload; @@ -112,4 +118,13 @@ void directory_history_prev (WPanel *panel); void directory_history_list (WPanel *panel); +#ifdef __linux__ +void panel_dnotify_reset(WPanel *panel); +void panel_dnotify_handler(int sig, siginfo_t *si, void *data); +void update_one_panel_widget (WPanel *panel, int force_update, + const char *current_file); +#endif + +void panel_dnotify_full_lock(int); + #endif diff -ruN mc-4.6.2.orig/src/screen.c mc-4.6.2/src/screen.c --- mc-4.6.2.orig/src/screen.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/screen.c 2008-11-27 01:00:21.000000000 +0200 @@ -25,9 +25,14 @@ #include #include #include +#include #include +#include +#include +#include + #include "global.h" #include "tty.h" #include "dir.h" @@ -104,9 +109,19 @@ /* If 1 - then add per file type hilighting */ int filetype_mode = 1; +/* If 1 - then hidden files will be highlighted as normal files */ +int colorize_hidden_mode = 0; + /* The hook list for the select file function */ Hook *select_file_hook = 0; +/* File Types for file highlighting */ +struct file_types_t file_types; + +int panel_dnotify_handler_set = 0; + +int panel_dnotify_full_lock_flag = 0; + static cb_ret_t panel_callback (Widget *, widget_msg_t msg, int parm); static int panel_event (Gpm_Event *event, void *); static void paint_frame (WPanel *panel); @@ -488,23 +503,75 @@ } static int +is_file_type(char *extension, char *file_type) +{ + char *ft; + char *buf; + char *ext; + +/* skip empty file types */ + if (!file_type || !*file_type) + return 0; + + buf = ft = g_strdup(file_type); + while (buf) + { + ext = +#if defined(SUNOS) || defined(SOLARIS) || defined(SUNOS41x) || defined(SUNOS5x) + sunos_get_token(&buf, ","); +#else + strsep(&buf, ","); +#endif + if (!strcasecmp(extension, ext)) + { + g_free(ft); + return 1; + } + } + g_free(ft); + return 0; +} + +static int + file_compute_color (int attr, file_entry *fe) { + int color; + switch (attr) { case SELECTED: - return (SELECTED_COLOR); + color = SELECTED_COLOR; + break; case MARKED: - return (MARKED_COLOR); + color = MARKED_COLOR; + break; case MARKED_SELECTED: - return (MARKED_SELECTED_COLOR); + color = MARKED_SELECTED_COLOR; + break; case STATUS: - return (NORMAL_COLOR); + color = NORMAL_COLOR; + break; case NORMAL: default: - if (!filetype_mode) - return (NORMAL_COLOR); + color = file_entry_color(fe); } + + return color; +} + +int +file_entry_color (file_entry *fe) +{ + char *ext = extension(fe->fname); + + if (filetype_mode) + { + + if (fe->fname[0]=='.' && strcmp(fe->fname, "..") && colorize_hidden_mode==0) + return (HIDDEN_COLOR); + else + /* if filetype_mode == true */ if (S_ISDIR (fe->st.st_mode)) return (DIRECTORY_COLOR); @@ -534,8 +601,46 @@ else if (fe->fname && (!strcmp (fe->fname, "core") || !strcmp (extension (fe->fname), "core"))) return (CORE_COLOR); - + else + { /* file-extentions groups colorizing */ + int tmpi; + char *new_ext = g_malloc(strlen(ext)+3); + for(tmpi=0;tmpi <= strlen(ext);tmpi++) + new_ext[tmpi] = tolower(ext[tmpi]); + + if (is_file_type(new_ext, file_types.ftmp)) { + g_free(new_ext); + return (TEMP_COLOR); + } else if (is_file_type(new_ext, file_types.fdoc)) { + g_free(new_ext); + return (DOC_COLOR); + } else if (is_file_type(new_ext, file_types.farch)) { + g_free(new_ext); + return (ARCH_COLOR); + } else if (is_file_type(new_ext, file_types.fsrc)) { + g_free(new_ext); + return (SRC_COLOR); + } else if (is_file_type(new_ext, file_types.fmedia)) { + g_free(new_ext); + return (MEDIA_COLOR); + } else if (is_file_type(new_ext, file_types.fgraph)) { + g_free(new_ext); + return (GRAPH_COLOR); + } else if (is_file_type(new_ext, file_types.fdbase)) { + g_free(new_ext); + return (DBASE_COLOR); + } + g_free(new_ext); + } return (NORMAL_COLOR); + } else { + /* if filetype_mode == false */ + if (fe->fname[0]=='.' && strcmp(fe->fname, "..") && colorize_hidden_mode==1) + return (HIDDEN_COLOR); + else + return (NORMAL_COLOR); + } + } /* Formats the file number file_index of panel in the buffer dest */ @@ -668,6 +773,7 @@ attrset (INPUT_COLOR); tty_printf ("/%-*s", panel->widget.cols-3, panel->search_buffer); attrset (NORMAL_COLOR); + show_free_space (panel); return; } @@ -699,6 +805,7 @@ } else cols -= 2; tty_printf (p, cols, buffer); + show_free_space (panel); return; } @@ -718,11 +825,13 @@ name_trunc (link_target, panel->widget.cols - 5)); } else tty_printf ("%-*s", panel->widget.cols - 2, _("")); + show_free_space (panel); return; } /* Default behavior */ repaint_file (panel, panel->selected, 0, STATUS, 1); + show_free_space (panel); return; } @@ -762,6 +871,7 @@ hline ((slow_terminal ? '-' : ACS_HLINE) | NORMAL_COLOR, panel->widget.cols - 2); #endif /* !HAVE_SLANG */ + show_free_space (panel); } static void @@ -987,6 +1097,114 @@ panel->format_modified = 1; } +#ifdef __linux__ +static void +panel_dnotify_lock_helper(WPanel *panel) +{ + if(panel->dnotify_fd == -1) + return; + + /* ignore 2... */ + if(panel_dnotify_full_lock_flag == 1) + fcntl(panel->dnotify_fd, F_NOTIFY, 0); + else if(!panel_dnotify_full_lock_flag) + fcntl(panel->dnotify_fd, F_NOTIFY, DN_MODIFY|DN_CREATE|DN_RENAME|DN_DELETE|DN_ATTRIB|DN_MULTISHOT); +} +#endif + +void panel_dnotify_full_lock(int lock) +{ +#ifdef __linux__ + if(lock) + panel_dnotify_full_lock_flag++; + else + panel_dnotify_full_lock_flag--; + + panel_dnotify_lock_helper(left_panel); + panel_dnotify_lock_helper(right_panel); +#endif +} + +#ifdef __linux__ +void panel_dnotify_reset(WPanel *panel) +{ + int panel_type = (current_panel == panel) ? get_current_type() : get_other_type(); + + if(panel_type != view_listing) + return; + + if(panel->dnotify_fd != -1) + close(panel->dnotify_fd); + + panel->dnotify_fd = open(panel->cwd, O_RDONLY); + + if(panel->dnotify_fd != -1) + { + fcntl(panel->dnotify_fd, F_SETSIG, SIGRTMIN + 1); + fcntl(panel->dnotify_fd, F_NOTIFY, DN_MODIFY|DN_CREATE|DN_RENAME|DN_DELETE|DN_ATTRIB|DN_MULTISHOT); + strncpy(panel->dnotify_dir, panel->cwd, MC_MAXPATHLEN); + } +} + +void panel_dnotify_handler(int sig, siginfo_t *si, void *data) +{ + if(panel_dnotify_full_lock_flag) + return; +/* + static time_t tm = 0; + time_t t = time(NULL); + + if(t - tm >= 1) + tm = t; + else + return; +*/ + int left_panel_type, right_panel_type; + + if(current_panel == left_panel) + { + left_panel_type = get_current_type(); + right_panel_type = get_other_type(); + } + else + { + right_panel_type = get_current_type(); + left_panel_type = get_other_type(); + } + + if(si->si_fd == left_panel->dnotify_fd && left_panel_type == view_listing) + { + if(strcmp(left_panel->cwd, left_panel->dnotify_dir)) + { +/* + close(left_panel->dnotify_fd); + left_panel->dnotify_fd = -1; +*/ + left_panel->dnotify_dir[0] = '\0'; + return; + } + + update_one_panel_widget(left_panel, UP_RELOAD, UP_KEEPSEL); + repaint_screen(); + } + else if(si->si_fd == right_panel->dnotify_fd && right_panel_type == view_listing) + { + if(strcmp(right_panel->cwd, right_panel->dnotify_dir)) + { +/* + close(right_panel->dnotify_fd); + right_panel->dnotify_fd = -1; +*/ + right_panel->dnotify_dir[0] = '\0'; + return; + } + + update_one_panel_widget(right_panel, UP_RELOAD, UP_KEEPSEL); + repaint_screen(); + } +} +#endif + /* Panel creation */ /* The parameter specifies the name of the panel for setup retieving */ WPanel * @@ -1029,6 +1247,10 @@ panel->status_format = 0; panel->format_modified = 1; + /* dnotify stuff */ + panel->dnotify_fd = -1; + panel->dnotify_dir[0] = '\0'; + panel->panel_name = g_strdup (panel_name); panel->user_format = g_strdup (DEFAULT_USER_FORMAT); @@ -1054,7 +1276,8 @@ /* Load the default format */ panel->count = do_load_dir (panel->cwd, &panel->dir, panel->sort_type, - panel->reverse, panel->case_sensitive, panel->filter); + panel->reverse, panel->case_sensitive, panel->filter, + &panel->dnotify_fd, panel->dnotify_dir, panel_dnotify_handler); return panel; } @@ -2159,8 +2382,8 @@ { XCTRL('s'), start_search }, /* C-s like emacs */ { ALT('s'), start_search }, /* M-s not like emacs */ { XCTRL('t'), mark_file }, - { ALT('o'), chdir_other_panel }, - { ALT('i'), sync_other_panel }, + { ALT('i'), chdir_other_panel }, + { ALT('o'), sync_other_panel }, { ALT('l'), chdir_to_readlink }, { ALT('H'), directory_history_list }, { KEY_F(13), cmd_view_simple }, @@ -2272,6 +2495,8 @@ buttonbar_set_label (h, 7, _("Mkdir"), mkdir_cmd); buttonbar_set_label (h, 8, _("Delete"), delete_cmd); buttonbar_redraw (h); + attrset (NORMAL_COLOR); + show_free_space (panel); return MSG_HANDLED; case WIDGET_UNFOCUS: @@ -2283,6 +2508,7 @@ panel->active = 0; show_dir (panel); unselect_item (panel); + show_free_space (panel); return MSG_HANDLED; case WIDGET_KEY: diff -ruN mc-4.6.2.orig/src/selcodepage.c mc-4.6.2/src/selcodepage.c --- mc-4.6.2.orig/src/selcodepage.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/selcodepage.c 2008-11-27 01:00:21.000000000 +0200 @@ -38,7 +38,7 @@ int source_codepage = -1; int display_codepage = -1; -static unsigned char +unsigned char get_hotkey (int n) { return (n <= 9) ? '0' + n : 'a' + n - 10; diff -ruN mc-4.6.2.orig/src/selmnt.c mc-4.6.2/src/selmnt.c --- mc-4.6.2.orig/src/selmnt.c 1970-01-01 03:00:00.000000000 +0300 +++ mc-4.6.2/src/selmnt.c 2008-11-27 01:00:21.000000000 +0200 @@ -0,0 +1,449 @@ +#include +#include +#include +#include + +#include "global.h" +#include "color.h" +#include "util.h" +#include "mountlist.h" +#include "panel.h" +#include "main.h" +#include "dialog.h" + +#include "wtools.h" +#include "widget.h" + +#include "cmd.h" +#include "tty.h" + +#include "selmnt.h" + +#ifdef HAVE_SLANG +# include "myslang.h" +#endif + +// uncomment to retrieve FS usage statistics (may be slow) +//#define MNT_USE_GET_FS_USAGE + +extern unsigned char get_hotkey(int); + +int mc_cd_mountpoint_and_dir = 0; + +extern struct mount_entry *mount_list; +extern void listbox_select_by_number (struct WListbox *l, int n); + +#ifdef __BEOS__ +struct mount_entry *read_filesystem_list (int need_fs_type, int all_fs); + +struct mount_entry *read_filesystem_list (int need_fs_type, int all_fs) +{ + static struct mount_entry *me = NULL; + + if (me) + { + if (me->me_devname) free(me->me_devname); + if (me->me_mountdir) free(me->me_mountdir); + if (me->me_type) free(me->me_type); + return (NULL); + } + else + me = (struct mount_entry *)malloc(sizeof(struct mount_entry)); + + + me->me_devname = strdup("//"); + me->me_mountdir = strdup("//"); + me->me_type = strdup("unknown"); + + return (me); +} +#endif /*__BEOS__*/ +//------------------ functions + +/* Returns the number of the item selected */ +int run_custom_listbox (Listbox *l) +{ + int val; + + run_dlg (l->dlg); + if (l->dlg->ret_value == B_CANCEL) + val = -1; + else + val = l->list->pos; + destroy_dlg (l->dlg); + free (l); + return val; +} + +//------------------ create own listbox window + +static cb_ret_t custom_listbox_callback (struct Dlg_head * h, dlg_msg_t Msg, int Par) +{ + switch (Msg) + { + case DLG_KEY: + case DLG_DRAW: + attrset (COLOR_NORMAL); + dlg_erase (h); + + draw_box (h, 0, 0, h->lines, h->cols); + attrset (COLOR_HOT_NORMAL); + if (h->title){ + dlg_move (h, 0, (h->cols-strlen (h->title))/2); + addstr (h->title); + } + break; + + default:; + } + return 0; +} + +static void +dialog_repaint (struct Dlg_head *h, int back, int title_fore) +{ + attrset (back); + dlg_erase (h); + draw_box (h, 1, 1, h->lines - 2, h->cols - 2); + attrset (title_fore); + if (h->title){ + dlg_move (h, 1, (h->cols-strlen (h->title))/2); + addstr (h->title); + } +} + +static void +listbox_refresh (Dlg_head *h) +{ + dialog_repaint (h, COLOR_NORMAL, COLOR_HOT_NORMAL); +} + +static void +x_set_dialog_title (Dlg_head *h, char *title) +{ + h->title = strdup(title); +} + +static +void *xmalloc (int size, const char *msg) +{ + void *m = malloc (size); + + if (!m){ + fprintf (stderr, "memory exhausted (%s)\n", msg); + exit (1); + } + return m; +} + +Listbox *create_custom_listbox_window (WPanel *panel, int cols, int lines, char *title, char *help) +{ + int x, y, w, h; + int widget_x, widget_y; + Listbox *listbox = (Listbox *)xmalloc(sizeof (Listbox), "create_custom_listbox_window"); + + widget_x = panel->widget.x ; + widget_y = panel->widget.y ; + + y = widget_y; + h = lines+2; + + if (h <= y || y > LINES - 6) + { + h = min(h, y - 1); + y -= h; + } + else + { + y++; + h = min(h, LINES - y); + } + + x = widget_x; + + if ((w = cols + 4) + x > COLS) + { + w = min(w,COLS); + } + + x = widget_x + (panel->widget.cols - w)/2; +// additional checking + x = x > 0 ? x : widget_x + 3; + y = widget_y + (panel->widget.lines - h)/2; + +////////////////////////////// +// Create components + + listbox->dlg = create_dlg (y, x, h, w, dialog_colors, custom_listbox_callback, + help, "listbox", DLG_NONE); + + x_set_dialog_title (listbox->dlg, title); + + listbox->list = listbox_new (1, 1, w - 2, h - 2, 0); + + add_widget (listbox->dlg, listbox->list); + listbox_refresh(listbox->dlg); + + return listbox; +} + +//------------------ show mounts list +static +int show_mnt (Mountp *mntpoints, WPanel *panel) +{ + Mountp *mz, *mhi; + int menu_lines, i, maxlen=5, count = 0; + Listbox* listbox; + mz = mntpoints; + + if (!mz) + return 0; + + while (mz->prev) /* goto first */ + mz = mz->prev; + + mhi = mz; + + while (mhi) + { + if ((i = strlen (mhi->mpoint) + + (mc_cd_mountpoint_and_dir ? 6:4) + + ((mhi->path && mc_cd_mountpoint_and_dir) ? strlen(mhi->path) : 0)) > maxlen) + maxlen = i; + + count++; + mhi = mhi->next; + } + +// count = number of elements +// maxlen = maximum long of mountpoint menu item name + + menu_lines = count; + + /* Create listbox */ + listbox = create_custom_listbox_window (panel, maxlen, menu_lines," Mountpoints ", "Mountpoints"); + + i=0; + + while (mz) { + static char buffer[4096]; +// sprintf( buffer, "%s (%d/%d)", mz->mpoint, mz->total/1024, mz->avail/1024 ); //for example! +// sprintf( buffer, "%s", mz->mpoint); + + if (mc_cd_mountpoint_and_dir && mz->path) + snprintf(buffer, sizeof(buffer), "%c %s [%s]", get_hotkey(i), mz->mpoint, mz->path); + else + snprintf(buffer, sizeof(buffer),"%c %s", get_hotkey(i), mz->mpoint); + + LISTBOX_APPEND_TEXT( listbox, get_hotkey(i), buffer, NULL ); + + mz = mz->next; + i++; + } + + /* Select the default entry */ + listbox_select_by_number( listbox->list, 0 ); + + return run_listbox( listbox ); +} + +//------------------ init Mountp +// First - we need helper, that must identify our last dir in this mountpoint +// from dir_history + +static +char *path_from_history (WPanel *panel, char *mountpoint) +{ + GList *hd, *d; + + hd = panel->dir_history; + + if ( !hd ) + return NULL; + + if ( ! strcmp (mountpoint,PATH_SEP_STR) ) + return NULL; + + d = hd = g_list_first(hd); + + while((d = g_list_next (d))) + hd = d; + + do + { + if (strcmp(mountpoint, (char *)(hd->data))) + if (!strncmp(mountpoint, (char *)(hd->data), strlen(mountpoint))) + return (char *)(hd->data); + + hd = g_list_previous(hd); + } + while (hd); + + return NULL; +} + +Mountp *init_mountp ( WPanel *panel ) +{ + int lockm = 0; + Mountp *mounts = NULL; + struct mount_entry *temp = NULL; + struct mount_entry *it = NULL; + +#ifdef MNT_USE_GET_FS_USAGE + struct fs_usage fs_use; +#endif + + it = temp = read_filesystem_list(0,0); + + if(!temp) + return NULL; + + while(temp) + { + if(!strncmp(temp->me_mountdir, "/dev/", 5) + || !strncmp(temp->me_mountdir, "/sys/", 5) + || !strncmp(temp->me_mountdir, "/lib/", 5) + || !strncmp(temp->me_mountdir, "/proc/", 6)) + { + temp = temp->me_next; + continue; + } + + if (!mounts) + { +#ifdef MNT_USE_GET_FS_USAGE + get_fs_usage (temp->me_mountdir, &fs_use); +#endif + mounts = malloc (sizeof (Mountp)); + memset (mounts, 0, sizeof (Mountp)); + + mounts->mpoint = strdup (temp->me_mountdir); + mounts->path = mc_cd_mountpoint_and_dir ? strdup(path_from_history (panel, temp->me_mountdir)) : NULL; + mounts->name = strdup (temp->me_devname); + +#ifdef MNT_USE_GET_FS_USAGE + mounts->avail = getuid () ? fs_use.fsu_bavail/2 : fs_use.fsu_bfree/2; + mounts->total = fs_use.fsu_blocks/2; +#endif + lockm = 1; + } + + if (mounts->next) + { + if(mounts->next->mpoint) { free (mounts->next->mpoint); mounts->next->mpoint = 0; } + if(mounts->next->name) { free (mounts->next->name); mounts->next->name = 0; } + } + else + { + mounts->next = malloc(sizeof (Mountp)); + memset (mounts->next, 0, sizeof (Mountp)); + mounts->next->prev = mounts; + } + + if (lockm != 1) + { +#ifdef MNT_USE_GET_FS_USAGE + get_fs_usage (temp->me_mountdir, &fs_use); +#endif + + mounts = mounts->next; + mounts->mpoint = strdup (temp->me_mountdir); + mounts->name = strdup (temp->me_devname); + mounts->path = mc_cd_mountpoint_and_dir ? strdup(path_from_history (panel, temp->me_mountdir)) : NULL; +#ifdef MNT_USE_GET_FS_USAGE + mounts->avail = getuid () ? fs_use.fsu_bavail/2 : fs_use.fsu_bfree/2; + mounts->total = fs_use.fsu_blocks/2; +#endif + } + + lockm = 0; + temp = temp->me_next; + } + + /* free memory */ + if(it) + { + temp = it; + + while(temp) + { + free(temp->me_type); + free(temp->me_mountdir); + free(temp->me_devname); + + it = temp; + temp = temp->me_next; + free(it); + } + } + + return mounts; /* must be freed! */ +} + + +static int select_mountpoint( WPanel *panel ) +{ + int i, inta; + char *s = NULL; + Mountp *mount_ls = init_mountp(panel); + Mountp *tmp = mount_ls; + + if(mount_ls && (mount_ls->prev || mount_ls->next)) + { + inta = show_mnt (mount_ls, panel); + + if (inta != -1) + { + while (mount_ls->prev) /* goto first */ + mount_ls = mount_ls->prev; + + for (i=0; inext) + mount_ls = mount_ls->next; + + // resulting dirname + if (mc_cd_mountpoint_and_dir && mount_ls->path) + s = mount_ls->path; + else if (mount_ls->mpoint) + s = mount_ls->mpoint; + } + + if (s) /* execute CD */ + do_panel_cd (panel, s, cd_exact); + else /* execute command */ + { } + + /* free mem */ + while(tmp->prev) + tmp = tmp->prev; + + mount_ls = tmp; + + while(mount_ls) + { + free(mount_ls->path); + free(mount_ls->name); + free(mount_ls->mpoint); + + tmp = mount_ls; + mount_ls = mount_ls->next; + free(tmp); + } + } + + return 1; +} + +//------------------ programming interfaces +void select_mnt_left ( void ) +{ + switch_to_listing ( 0 ); + select_mountpoint ( left_panel ); +} + + +void select_mnt_right ( void ) +{ + switch_to_listing ( 1 ); + select_mountpoint ( right_panel ); +} diff -ruN mc-4.6.2.orig/src/selmnt.h mc-4.6.2/src/selmnt.h --- mc-4.6.2.orig/src/selmnt.h 1970-01-01 03:00:00.000000000 +0300 +++ mc-4.6.2/src/selmnt.h 2008-11-27 01:00:21.000000000 +0200 @@ -0,0 +1,22 @@ +#ifndef __SELMNT_H__ +#define __SELMNT_H__ + +extern int mc_cd_mountpoint_and_dir; + +typedef struct mountp_list { + + struct mountp_list *prev; + struct mountp_list *next; + + char *name; // name of entry device, [/dev/]'hda8' + char *path; // local path after mountpoint dir, [/mnt/hda/8]'/mp3' (plan to get last from history by regexp) + char *mpoint; // mountpoint, '/mnt/hda/8' + int total; // total size of FS + int avail; // free size of FS +} Mountp; + +Mountp *init_mountp ( WPanel *panel ); +void select_mnt_left ( void ); +void select_mnt_right ( void ); + +#endif /* __SELMNT_H__ */ diff -ruN mc-4.6.2.orig/src/setup.c mc-4.6.2/src/setup.c --- mc-4.6.2.orig/src/setup.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/setup.c 2008-11-27 01:00:21.000000000 +0200 @@ -42,6 +42,7 @@ #include "win.h" /* lookup_key */ #include "cmd.h" #include "file.h" /* safe_delete */ +#include "color.h" /* safe_delete */ #ifdef USE_VFS #include "../vfs/gc.h" @@ -60,7 +61,6 @@ # include "../edit/edit.h" #endif - extern char *find_ignore_dirs; extern int num_history_items_recorded; @@ -135,6 +135,8 @@ { "show_mini_info", &show_mini_info }, { "permission_mode", &permission_mode }, { "filetype_mode", &filetype_mode }, + { "colorize_hidden_mode", &colorize_hidden_mode }, + { "free_space", &free_space }, { 0, 0 } }; @@ -369,6 +371,15 @@ ftpfs_proxy_host, profile); #endif /* USE_VFS && USE_NETCODE */ + /* Save file highlighting info */ + save_string ("File Types", "temp", file_types.ftmp, profile_name); + save_string ("File Types", "doc", file_types.fdoc, profile_name); + save_string ("File Types", "archive", file_types.farch, profile_name); + save_string ("File Types", "source", file_types.fsrc, profile_name); + save_string ("File Types", "media", file_types.fmedia, profile_name); + save_string ("File Types", "graphics", file_types.fgraph, profile_name); + save_string ("File Types", "database", file_types.fdbase, profile_name); + #ifdef HAVE_CHARSET save_string( "Misc", "display_codepage", get_codepage_id( display_codepage ), profile_name ); @@ -458,10 +469,10 @@ static char * do_load_string (const char *s, const char *ss, const char *def) { - char *buffer = g_malloc (BUF_SMALL); + char *buffer = g_malloc (BUF_MEDIUM); char *p; - load_string (s, ss, def, buffer, BUF_SMALL); + load_string (s, ss, def, buffer, BUF_MEDIUM); p = g_strdup (buffer); g_free (buffer); @@ -558,6 +569,22 @@ load_string ("Colors", "color_terminals", "", color_terminal_string, sizeof (color_terminal_string)); + /* Load file highlighting info */ + file_types.ftmp = do_load_string ("File Types", "temp", + "tmp,$$$,~,bak"); + file_types.fdoc = do_load_string ("File Types", "doc", + "txt,doc,rtf,diz,ctl,me,ps,pdf,xml,xsd,xslt,dtd,html,shtml,htm,mail,msg,lsm,po,nroff,man,tex,sgml,css,text,letter"); + file_types.farch = do_load_string ("File Types", "archive", + "gz,bz2,tar,tgz,rpm,Z,rar,zip,arj,cab,lzh,lha,zoo,arc,ark"); + file_types.fsrc = do_load_string ("File Types", "source", + "c,h,cc,hh,cpp,hpp,asm,py,pl,pm,inc,cgi,php,phps,js,java,jav,jasm,sh,bash,diff,patch,pas,tcl,tk,awk,m4,st,mak,sl,ada,caml,ml,mli,mly,mll,mlp,sas,prg"); + file_types.fmedia = do_load_string ("File Types", "media", + "mp2,mp3,mpg,ogg,mpeg,wav,avi,asf,mov,mol,mpl,xm,mod,it,med,mid,midi,s3m,umx"); + file_types.fgraph = do_load_string ("File Types", "graphics", + "jpg,jpeg,gif,png,tif,pcx,bmp,xpm,xbm,eps,pic,rle,ico,wmf,omf,ai,cdr"); + file_types.fdbase = do_load_string ("File Types", "database", + "dbf,mdn,db,mdb,dat,fox,dbx,mdx,sql,mssql,msql,ssql,pgsql,xls,cdx,dbi"); + /* Load the directory history */ /* directory_history_load (); */ /* Remove the temporal entries */ diff -ruN mc-4.6.2.orig/src/subshell.c mc-4.6.2/src/subshell.c --- mc-4.6.2.orig/src/subshell.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/subshell.c 2008-11-27 01:00:21.000000000 +0200 @@ -794,12 +794,14 @@ p_current_panel_cwd = current_panel->cwd; bPathNotEq = strcmp (p_subshell_cwd, p_current_panel_cwd); } - - if (bPathNotEq && strcmp (current_panel->cwd, ".")) { +/* + if (bPathNotEq && strcmp (current_panel->cwd, ".")) + { char *cwd = strip_password (g_strdup (current_panel->cwd), 1); fprintf (stderr, _("Warning: Cannot change to %s.\n"), cwd); g_free (cwd); } +*/ } if (reset_prompt) @@ -887,6 +889,7 @@ struct timeval wtime; /* Maximum time we wait for the subshell */ struct timeval *wptr; + char lastChar = 0; // for remove stupid 'The shell is already running a command' /* we wait up to 10 seconds if fail_on_error, forever otherwise */ wtime.tv_sec = 10; @@ -984,12 +987,19 @@ for (i = 0; i < bytes; ++i) if (pty_buffer[i] == subshell_switch_key) { write_all (subshell_pty, pty_buffer, i); - if (subshell_ready) + if (subshell_ready){ subshell_state = INACTIVE; + } else { + if (lastChar != 0xd ){ + subshell_ready = TRUE; + subshell_state = INACTIVE; + } + } return TRUE; } write_all (subshell_pty, pty_buffer, bytes); + lastChar = (char) pty_buffer[bytes-1]; subshell_ready = FALSE; } else { return FALSE; diff -ruN mc-4.6.2.orig/src/util.c mc-4.6.2/src/util.c --- mc-4.6.2.orig/src/util.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/util.c 2008-11-27 01:00:21.000000000 +0200 @@ -711,6 +711,11 @@ if (hintfile != hintfile_base) g_free (hintfile_base); + if (!data) { + g_free(hintfile); + return NULL; + } + if (allocated_filename) *allocated_filename = hintfile; else diff -ruN mc-4.6.2.orig/src/view.c mc-4.6.2/src/view.c --- mc-4.6.2.orig/src/view.c 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/src/view.c 2008-11-27 01:00:21.000000000 +0200 @@ -33,16 +33,9 @@ #endif #include -#include +#include /* isupper() */ #include -#include -#include #include -#include - -#include -#include -#include #include "global.h" #include "tty.h" @@ -50,17 +43,14 @@ #include "dialog.h" /* Needed by widget.h */ #include "widget.h" /* Needed for buttonbar_new */ #include "color.h" -#include "mouse.h" -#include "help.h" -#include "key.h" /* For mi_getch() */ +#include "help.h" /* interactive_display() */ +#include "key.h" /* is_idle() */ #include "layout.h" -#include "setup.h" -#include "wtools.h" /* For query_set_sel() */ -#include "dir.h" +#include "setup.h" /* verbose */ +#include "wtools.h" #include "panel.h" /* Needed for current_panel and other_panel */ -#include "win.h" -#include "execute.h" -#include "main.h" /* slow_terminal */ +#include "win.h" /* check_movenemt_keys() */ +#include "execute.h" /* exec_shell() */ #include "view.h" #include "charsets.h" @@ -1030,10 +1020,12 @@ coord.cc_offset = offset; view_ccache_lookup (view, &coord, CCACHE_LINECOL); - *ret_line = coord.cc_line; - *ret_column = (view->text_nroff_mode) - ? coord.cc_nroff_column - : coord.cc_column; + if (ret_line) + *ret_line = coord.cc_line; + if (ret_column) + *ret_column = (view->text_nroff_mode) + ? coord.cc_nroff_column + : coord.cc_column; } /* {{{ Cursor Movement }}} */ @@ -1140,8 +1132,8 @@ } else if (view->text_wrap_mode) { /* do nothing */ } else { - offset_type line, column; - view_offset_to_coord (view, &line, &column, view->dpy_start); + offset_type line; + view_offset_to_coord (view, &line, NULL, view->dpy_start); view_coord_to_offset (view, &(view->dpy_start), line, 0); view->dpy_text_column = 0; } @@ -1164,9 +1156,9 @@ } else if (view->text_wrap_mode) { /* nothing to do */ } else { - offset_type line, col; + offset_type line; - view_offset_to_coord (view, &line, &col, view->dpy_start); + view_offset_to_coord (view, &line, NULL, view->dpy_start); view_coord_to_offset (view, &(view->dpy_start), line, OFFSETTYPE_MAX); } view_movement_fixups (view, FALSE); @@ -2726,21 +2718,31 @@ static void view_moveto_line_cmd (WView *view) { - char *answer, *answer_end, prompt[BUF_SMALL]; - offset_type line, col; + char *answer, *error, prompt[BUF_SMALL]; + offset_type cline; /* current line*/ + + static offset_type line = 1; /* line as typed, saved as default */ + char s[32]; - view_offset_to_coord (view, &line, &col, view->dpy_start); + view_offset_to_coord (view, &cline, NULL, view->dpy_start); g_snprintf (prompt, sizeof (prompt), _(" The current line number is %d.\n" - " Enter the new line number:"), (int) (line + 1)); - answer = input_dialog (_(" Goto line "), prompt, ""); + " Enter the new line number:"), (int) (cline + 1)); + g_snprintf (s, sizeof (s), "%ld", line); + answer = input_dialog (_(" Goto line "), prompt, s); if (answer != NULL && answer[0] != '\0') { errno = 0; - line = strtoul (answer, &answer_end, 10); - if (*answer_end == '\0' && errno == 0 && line >= 1) - view_moveto (view, line - 1, 0); + offset_type l = strtoul (answer, &error, 10); + + if (*error == '\0' && errno == 0) { + line = l; /* save typed value */ + + if (l >= 1) + view_moveto (view, l - 1, 0); + } } + g_free (answer); view->dirty++; view_update (view); @@ -2749,24 +2751,27 @@ static void view_moveto_addr_cmd (WView *view) { - char *line, *error, prompt[BUF_SMALL]; - offset_type addr; + char *answer, *error, prompt[BUF_SMALL]; + + static offset_type addr = 0; /* line as typed, saved as default */ + char s[32]; g_snprintf (prompt, sizeof (prompt), _(" The current address is 0x%lx.\n" " Enter the new address:"), view->hex_cursor); - line = input_dialog (_(" Goto Address "), prompt, ""); - if (line != NULL) { - if (*line != '\0') { - addr = strtoul (line, &error, 0); - if ((*error == '\0') && get_byte (view, addr) != -1) { - view_moveto_offset (view, addr); - } else { - message (D_ERROR, _("Warning"), _(" Invalid address ")); - } - } - g_free (line); + g_snprintf (s, sizeof (s), "0x%lx", addr); + answer = input_dialog (_(" Goto Address "), prompt, s); + if (answer != NULL && *answer != '\0') { + offset_type a = strtoul (answer, &error, 0); + + if ((*error == '\0') && get_byte (view, a) != -1) { + addr = a; /* save typed value */ + view_moveto_offset (view, a); + } else + message (D_ERROR, _("Warning"), _(" Invalid address ")); } + + g_free (answer); view->dirty++; view_update (view); } @@ -3071,6 +3076,10 @@ case XCTRL ('f'): view_move_right (view, 1); return MSG_HANDLED; + + case ALT ('l'): /* as in editor */ + view_moveto_addr_cmd (view); + return MSG_HANDLED; } if (view->hexedit_mode @@ -3198,7 +3207,12 @@ view_ccache_dump (view); return MSG_HANDLED; #endif + + case ALT ('l'): /* as in editor */ + view_moveto_line_cmd (view); + return MSG_HANDLED; } + if (c >= '0' && c <= '9') view->marker = c - '0'; diff -ruN mc-4.6.2.orig/syntax/awk.syntax mc-4.6.2/syntax/awk.syntax --- mc-4.6.2.orig/syntax/awk.syntax 1970-01-01 03:00:00.000000000 +0300 +++ mc-4.6.2/syntax/awk.syntax 2008-11-27 01:00:21.000000000 +0200 @@ -0,0 +1,129 @@ +# AWK syntax by Olegarch +# Possible *.AWK +# GPL v2 +# +# (c) 2003 +# + +context default + + keyword whole linestart #!\[\s\]/bin/\[msg\]awk yellow magenta + keyword whole linestart #!\[\s\]/usr/bin/\[msg\]awk yellow magenta +# Keywords + keyword whole return white/26 + keyword whole print white/26 + keyword whole printf white/26 + keyword whole if white/26 + keyword whole else white/26 + keyword whole while white/26 + keyword whole for white/26 + keyword whole in white/26 + keyword whole do white/26 + keyword whole break white/26 + keyword whole continue white/26 + keyword whole next white/26 + keyword whole exit white/26 + keyword whole close white/26 + keyword whole system white/26 + keyword whole getline white/26 +# Builtin functions: + keyword whole atan2 white black + keyword whole cos white black + keyword whole exp white black + keyword whole int white black + keyword whole log white black + keyword whole rand white black + keyword whole sin white black + keyword whole sqrt white black + keyword whole srand white black + keyword whole gsub white black + keyword whole index white black + keyword whole length white black + keyword whole match white black + keyword whole split white black + keyword whole sprintf white black + keyword whole sub white black + keyword whole substr white black +# Gawk builtin functions: + keyword whole fflush white black + keyword whole gensub white black + keyword whole tolower white black + keyword whole toupper white black + keyword whole systime white black + keyword whole strftime white black +# Builtin variables: + keyword whole ARGC brightblue + keyword whole ARGV brightblue + keyword whole FILENAME brightblue + keyword whole FNR brightblue + keyword whole FS brightblue + keyword whole NF brightblue + keyword whole NR brightblue + keyword whole OFMT brightblue + keyword whole OFS brightblue + keyword whole ORS brightblue + keyword whole RLENGTH brightblue + keyword whole RS brightblue + keyword whole RSTART brightblue + keyword whole SUBSEP brightblue +# Gawk builtin variables: + keyword whole ARGIND brightblue + keyword whole ERRNO brightblue + keyword whole RT brightblue + keyword whole IGNORECASE brightblue + keyword whole FIELDWIDTHS brightblue + + keyword '\s' brightgreen/16 + keyword '+' brightgreen/16 + keyword > yellow/24 + keyword < yellow/24 + keyword \+ yellow/24 + keyword - yellow/24 + keyword \* yellow/24 + keyword % yellow/24 + keyword = yellow/24 + keyword != yellow/24 + keyword == yellow/24 + keyword { white/25 + keyword } white/25 + keyword ( white/25 + keyword ) white/25 + keyword [*] magenta + keyword , white/25 + keyword : white/25 + keyword ; lightgray/19 + keyword $\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\] brightred/18 +# Begin/End: + keyword whole BEGIN red + keyword whole END red +# Function keyword: + keyword whole function brightmagenta +# Hex constant: + keyword 0\{xX\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\] magenta/6 +# Tab: \t +# keyword linestart \t lightgray/13 blue/6 + +# Sed: +keyword linestart /^ red +keyword linestart /^# red +context /^#*/ red + +# Comments: +context linestart # \n brown +context linestart $ \n brown + +# String: +context " " green/6 + keyword \\" brightgreen/16 + keyword \\\n brightgreen/16 + keyword %% brightgreen/16 + keyword %\[#0\s-\+,\]\[0123456789\]\[.\]\[0123456789\]\[L\]\{eEfgGoxX\} brightgreen/16 + keyword %\[0\s-\+,\]\[0123456789\]\[.\]\[0123456789\]\[hl\]\{diu\} brightgreen/16 + keyword %\[hl\]n brightgreen/16 + keyword %\[.\]\[0123456789\]s brightgreen/16 + keyword %[*] brightgreen/16 + keyword %c brightgreen/16 + keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen/16 + keyword \\\\ brightgreen/16 + keyword \\' brightgreen/16 + keyword \\\{abtnvfr\} brightgreen/16 diff -ruN mc-4.6.2.orig/syntax/css.syntax mc-4.6.2/syntax/css.syntax --- mc-4.6.2.orig/syntax/css.syntax 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/syntax/css.syntax 2008-11-27 01:00:21.000000000 +0200 @@ -32,6 +32,86 @@ keyword whole option white keyword whole optgroup white + keyword whole QAbstractSpinBox white + keyword whole QAbstractScrollArea white + keyword whole QCheckBox white + keyword whole QColumnView white + keyword whole QComboBox white + keyword whole QDateEdit white + keyword whole QDateTimeEdit white + keyword whole QDialog white + keyword whole QDialogButtonBox white + keyword whole QDockWidget white + keyword whole QDoubleSpinBox white + keyword whole QFrame white + keyword whole QGroupBox white + keyword whole QHeaderView white + keyword whole QLabel white + keyword whole QLineEdit white + keyword whole QListView white + keyword whole QListWidget white + keyword whole QMainWindow white + keyword whole QMenu white + keyword whole QMenuBar white + keyword whole QMessageBox white + keyword whole QProgressBar white + keyword whole QPushButton white + keyword whole QRadioButton white + keyword whole QScrollBar white + keyword whole QSizeGrip white + keyword whole QSlider white + keyword whole QSpinBox white + keyword whole QSplitter white + keyword whole QStatusBar white + keyword whole QTabBar white + keyword whole QTabWidget white + keyword whole QTableView white + keyword whole QTableWidget white + keyword whole QTextEdit white + keyword whole QTimeEdit white + keyword whole QToolBar white + keyword whole QToolButton white + keyword whole QToolBox white + keyword whole QToolTip white + keyword whole QTreeView white + keyword whole QTreeWidget white + keyword whole QWidget white + + keyword \:\:add-line white + keyword \:\:add-page white + keyword \:\:branch white + keyword \:\:chunk white + keyword \:\:close-button white + keyword \:\:down-arrow white + keyword \:\:down-button white + keyword \:\:drop-down white + keyword \:\:float-button white + keyword \:\:groove white + keyword \:\:indicator white + keyword \:\:handle white + keyword \:\:icon white + keyword \:\:item white + keyword \:\:left-arrow white + keyword \:\:left-corner white + keyword \:\:menu-arrow white + keyword \:\:menu-button white + keyword \:\:menu-indicator white + keyword \:\:right-arrow white + keyword \:\:pane white + keyword \:\:right-corner white + keyword \:\:scroller white + keyword \:\:section white + keyword \:\:separator white + keyword \:\:sub-line white + keyword \:\:sub-page white + keyword \:\:tab white + keyword \:\:tab-bar white + keyword \:\:tear white + keyword \:\:tear-off white + keyword \:\:text white + keyword \:\:title white + keyword \:\:up-arrow white + keyword \:\:up-button white keyword \:active brightmagenta keyword \:after brightmagenta @@ -43,107 +123,155 @@ keyword \:focus brightmagenta keyword \:lang brightmagenta keyword \:link brightmagenta - keyword \:hover brightmagenta - - keyword whole background-attachment yellow - keyword whole background-color yellow - keyword whole background-image yellow - keyword whole background-position yellow - keyword whole background-repeat yellow - keyword whole background yellow - keyword whole bidi-override yellow - keyword whole border-bottom yellow - keyword whole border-bottom-color yellow - keyword whole border-bottom-style yellow - keyword whole border-bottom-width yellow - keyword whole border-collapse yellow - keyword whole border-color yellow - keyword whole border-left yellow - keyword whole border-left-color yellow - keyword whole border-left-style yellow - keyword whole border-left-width yellow - keyword whole border-right yellow - keyword whole border-right-color yellow - keyword whole border-right-style yellow - keyword whole border-right-width yellow - keyword whole border-spacing yellow - keyword whole border-style yellow - keyword whole border-top yellow - keyword whole border-top-color yellow - keyword whole border-top-style yellow - keyword whole border-top-width yellow - keyword whole border-width yellow - keyword whole border yellow - keyword whole bottom yellow - keyword whole caption-side yellow - keyword whole clear yellow - keyword whole clip yellow - keyword whole color yellow - keyword whole content yellow - keyword whole counter-increment yellow - keyword whole cursor yellow - keyword whole direction yellow - keyword whole display yellow - keyword whole empty-cells yellow - keyword whole fixed yellow - keyword whole float yellow - keyword whole font-size-adjust yellow - keyword whole font-stretch yellow - keyword whole font-family yellow - keyword whole font-size yellow - keyword whole font-family yellow - keyword whole font-style yellow - keyword whole font-variant yellow - keyword whole font-weight yellow - keyword whole font yellow - keyword whole generic-family yellow - keyword whole height yellow - keyword whole identifier yellow - keyword whole justify yellow - keyword whole left yellow - keyword whole length yellow - keyword whole letter-spacing yellow - keyword whole line-height yellow - keyword whole list-style-image yellow - keyword whole list-style-position yellow - keyword whole list-style-type yellow - keyword whole list-style yellow - keyword whole margin-left yellow - keyword whole margin-top yellow - keyword whole margin yellow - keyword whole marker-offset yellow - keyword whole max-height yellow - keyword whole max-width yellow - keyword whole min-height yellow - keyword whole min-width yellow - keyword whole nowrap yellow - keyword whole outline-color yellow - keyword whole outline-style yellow - keyword whole outline-width yellow - keyword whole outline yellow - keyword whole padding-left yellow - keyword whole padding-top yellow - keyword whole padding yellow - keyword whole position yellow - keyword whole quotes yellow - keyword whole right yellow - keyword whole table-caption yellow - keyword whole table-layout yellow - keyword whole text-align yellow - keyword whole text-decoration yellow - keyword whole text-indent yellow - keyword whole text-shadow yellow - keyword whole text-transform yellow - keyword whole top yellow - keyword whole unicode-bidi yellow - keyword whole vertical-align yellow - keyword whole visibility yellow - keyword whole white-space yellow - keyword whole width yellow - keyword whole word-spacing yellow + keyword \:active brightmagenta + keyword \:adjoins-item brightmagenta + keyword \:alternate brightmagenta + keyword \:bottom brightmagenta + keyword \:checked brightmagenta + keyword \:closable brightmagenta + keyword \:closed brightmagenta + keyword \:default brightmagenta + keyword \:disabled brightmagenta + keyword \:editable brightmagenta + keyword \:edit-focus brightmagenta + keyword \:enabled brightmagenta + keyword \:exclusive brightmagenta + keyword \:first brightmagenta + keyword \:flat brightmagenta + keyword \:floatable brightmagenta + keyword \:focus brightmagenta + keyword \:has-children brightmagenta + keyword \:has-siblings brightmagenta + keyword \:horizontal brightmagenta + keyword \:hover brightmagenta + keyword \:indeterminate brightmagenta + keyword \:last brightmagenta + keyword \:left brightmagenta + keyword \:maximized brightmagenta + keyword \:middle brightmagenta + keyword \:minimized brightmagenta + keyword \:movable brightmagenta + keyword \:no-frame brightmagenta + keyword \:non-exclusive brightmagenta + keyword \:off brightmagenta + keyword \:on brightmagenta + keyword \:only-one brightmagenta + keyword \:open brightmagenta + keyword \:next-selected brightmagenta + keyword \:pressed brightmagenta + keyword \:previous-selected brightmagenta + keyword \:read-only brightmagenta + keyword \:right brightmagenta + keyword \:selected brightmagenta + keyword \:top brightmagenta + keyword \:unchecked brightmagenta + keyword \:vertical brightmagenta + keyword \:window brightmagenta + + keyword whole background-attachment lightgray + keyword whole background-color lightgray + keyword whole background-image lightgray + keyword whole background-position lightgray + keyword whole background-repeat lightgray + keyword whole background lightgray + keyword whole bidi-override lightgray + keyword whole border-bottom lightgray + keyword whole border-bottom-color lightgray + keyword whole border-bottom-style lightgray + keyword whole border-bottom-width lightgray + keyword whole border-collapse lightgray + keyword whole border-color lightgray + keyword whole border-left lightgray + keyword whole border-left-color lightgray + keyword whole border-left-style lightgray + keyword whole border-left-width lightgray + keyword whole border-right lightgray + keyword whole border-right-color lightgray + keyword whole border-right-style lightgray + keyword whole border-right-width lightgray + keyword whole border-spacing lightgray + keyword whole border-style lightgray + keyword whole border-top lightgray + keyword whole border-top-color lightgray + keyword whole border-top-style lightgray + keyword whole border-top-width lightgray + keyword whole border-width lightgray + keyword whole border lightgray + keyword whole bottom lightgray + keyword whole caption-side lightgray + keyword whole clear lightgray + keyword whole clip lightgray + keyword whole color lightgray + keyword whole content lightgray + keyword whole counter-increment lightgray + keyword whole cursor lightgray + keyword whole direction lightgray + keyword whole display lightgray + keyword whole empty-cells lightgray + keyword whole fixed lightgray + keyword whole float lightgray + keyword whole font-size-adjust lightgray + keyword whole font-stretch lightgray + keyword whole font-family lightgray + keyword whole font-size lightgray + keyword whole font-family lightgray + keyword whole font-style lightgray + keyword whole font-variant lightgray + keyword whole font-weight lightgray + keyword whole font lightgray + keyword whole generic-family lightgray + keyword whole height lightgray + keyword whole identifier lightgray + keyword whole image lightgray + keyword whole justify lightgray + keyword whole left lightgray + keyword whole length lightgray + keyword whole letter-spacing lightgray + keyword whole line-height lightgray + keyword whole list-style-image lightgray + keyword whole list-style-position lightgray + keyword whole list-style-type lightgray + keyword whole list-style lightgray + keyword whole margin-left lightgray + keyword whole margin-top lightgray + keyword whole margin lightgray + keyword whole marker-offset lightgray + keyword whole max-height lightgray + keyword whole max-width lightgray + keyword whole min-height lightgray + keyword whole min-width lightgray + keyword whole nowrap lightgray + keyword whole outline-color lightgray + keyword whole outline-style lightgray + keyword whole outline-width lightgray + keyword whole outline lightgray + keyword whole padding-left lightgray + keyword whole padding-top lightgray + keyword whole padding lightgray + keyword whole position lightgray + keyword whole quotes lightgray + keyword whole right lightgray + keyword whole subcontrol-origin lightgray + keyword whole subcontrol-position lightgray + keyword whole table-caption lightgray + keyword whole table-layout lightgray + keyword whole text-align lightgray + keyword whole text-decoration lightgray + keyword whole text-indent lightgray + keyword whole text-shadow lightgray + keyword whole text-transform lightgray + keyword whole top lightgray + keyword whole unicode-bidi lightgray + keyword whole vertical-align lightgray + keyword whole visibility lightgray + keyword whole white-space lightgray + keyword whole width lightgray + keyword whole word-spacing lightgray - + keyword whole qconicalgradient brightgreen + keyword whole qlineargradient brightgreen + keyword whole qradialgradient brightgreen keyword whole left brightgreen keyword whole right brightgreen keyword whole center brightgreen @@ -155,6 +283,7 @@ keyword whole italic brightgreen keyword whole bolder brightgreen keyword whole underline brightgreen + keyword whole absolute brightgreen keyword whole none brightgreen keyword whole auto brightgreen @@ -189,6 +318,9 @@ keyword whole invert brightgreen keyword whole oblique brightgreen keyword whole no-close-quote brightgreen + keyword whole repeat-x brightgreen + keyword whole repeat-y brightgreen + keyword whole repeat brightgreen keyword whole no-repeat brightgreen keyword whole small-caps brightgreen keyword whole transparent brightgreen @@ -278,15 +410,9 @@ keyword whole uppercase brightgreen keyword whole lowercase brightgreen - keyword whole pre brightgreen keyword whole nowrap brightgreen - - - - - keyword whole aliceblue brightgreen keyword whole antiquewhite brightgreen keyword whole aqua brightgreen @@ -431,9 +557,6 @@ keyword whole yellow brightgreen keyword whole yellowgreen brightgreen - - - keyword counter(\{*\}*) magenta keyword counters(\{*\}*) magenta keyword url(\{*\}*) magenta @@ -447,9 +570,8 @@ keyword /\* brown keyword \*/ brown - - keyword whole Arial brightgreen + keyword whole Narrow brightgreen keyword whole arial brightgreen keyword whole Trebuchet MS brightgreen keyword whole trebuchet ms brightgreen @@ -471,7 +593,8 @@ keyword \{0123456789\}*ex brightgreen keyword \{0123456789\}*pt brightgreen keyword \{0123456789\}*pc brightgreen - keyword \{0123456789\}*% brightred + keyword \{0123456789\}*% brightred + keyword \{0123456789\} brightgreen keyword { brightcyan keyword } brightcyan @@ -484,4 +607,3 @@ context exclusive /\* \*/ brown spellcheck - diff -ruN mc-4.6.2.orig/syntax/c.syntax mc-4.6.2/syntax/c.syntax --- mc-4.6.2.orig/syntax/c.syntax 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/syntax/c.syntax 2008-11-27 01:00:21.000000000 +0200 @@ -67,6 +67,15 @@ keyword whole \[\s\t\]default yellow keyword whole linestart \[\s\t\]\{ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\}\[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\]: cyan + keyword whole 0\{xX\}\{0123456789abcdefABCDEF\}\[0123456789abcdefABCDEF\] brightgreen + keyword whole \{0123456789\}\[0123456789\] brightgreen + keyword whole \[0123456789\]\.\{0123456789\}\[0123456789\] brightgreen + keyword whole \{0123456789\}\[0123456789\]\.\[0123456789\] brightgreen + keyword whole \{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen + keyword whole \{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen + keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen + keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen + keyword /\* brown keyword \*/ brown keyword // brown diff -ruN mc-4.6.2.orig/syntax/ebuild.syntax mc-4.6.2/syntax/ebuild.syntax --- mc-4.6.2.orig/syntax/ebuild.syntax 1970-01-01 03:00:00.000000000 +0300 +++ mc-4.6.2/syntax/ebuild.syntax 2008-11-27 01:00:21.000000000 +0200 @@ -0,0 +1,107 @@ +context default + keyword linestart DEPEND brightcyan + keyword linestart DESCRIPTION brightcyan + keyword linestart EAPI brightcyan + keyword linestart HOMEPAGE brightcyan + keyword linestart IUSE brightcyan + keyword linestart KEYWORDS brightcyan + keyword linestart LICENSE brightcyan + keyword linestart PDEPEND brightcyan + keyword linestart PROVIDE brightcyan + keyword linestart RDEPEND brightcyan + keyword linestart RESTRICT brightcyan + keyword linestart S brightcyan + keyword linestart SLOT brightcyan + keyword linestart SRC_URI brightcyan + keyword linestart WANT_AUTOCONF brightcyan + keyword linestart WANT_AUTOMAKE brightcyan + + keyword whole _elibtoolize yellow + keyword whole check_KV yellow + keyword whole best_version yellow + keyword whole built_with_use yellow + keyword whole die yellow + keyword whole diropts yellow + keyword whole dobin yellow + keyword whole docinto yellow + keyword whole doconfd yellow + keyword whole dodir yellow + keyword whole dodoc yellow + keyword whole doenvd yellow + keyword whole doexe yellow + keyword whole dohard yellow + keyword whole dohtml yellow + keyword whole doicon yellow + keyword whole doinfo yellow + keyword whole doinitd yellow + keyword whole doins yellow + keyword whole dolib yellow + keyword whole dolib.a yellow + keyword whole dolib.so yellow + keyword whole doman yellow + keyword whole domenu yellow + keyword whole dosbin yellow + keyword whole dosed yellow + keyword whole dosym yellow + keyword whole eautoconf yellow + keyword whole eautoreconf yellow + keyword whole eautomake yellow + keyword whole ebegin yellow + keyword whole econf yellow + keyword whole eend yellow + keyword whole eerror yellow + keyword whole einfo yellow + keyword whole einstall yellow + keyword whole elibtoolize yellow + keyword whole elog yellow + keyword whole emake yellow + keyword whole epatch yellow + keyword whole ewarn yellow + keyword whole exeinto yellow + keyword whole exeopts yellow + keyword whole fowners yellow + keyword whole fperms yellow + keyword whole has yellow + keyword whole hasq yellow + keyword whole has_version yellow + keyword whole insinto yellow + keyword whole insopts yellow + keyword whole into yellow + keyword whole keepdir yellow + keyword whole libopts yellow + keyword whole local yellow + keyword whole newbin yellow + keyword whole newconfd yellow + keyword whole newdoc yellow + keyword whole newexe yellow + keyword whole newins yellow + keyword whole newman yellow + keyword whole newsbin yellow + keyword whole newinitd yellow + keyword whole prepall yellow + keyword whole prepalldocs yellow + keyword whole prepallinfo yellow + keyword whole prepallman yellow + keyword whole unpack yellow + keyword whole use yellow + keyword whole use_enable yellow + keyword whole use_with yellow + + keyword = yellow + keyword : yellow + keyword ${+} brightgreen + + keyword linestart abcdefghijklmnopqrstuvwxyz_\(\) brightmagenta + + keyword *() brightcyan + + keyword { magenta + keyword } magenta + +context linestart inherit \n magenta + keyword whole inherit yellow + +context # \n red + +context " " green + keyword wholeright ${+} brightgreen diff -ruN mc-4.6.2.orig/syntax/Makefile.am mc-4.6.2/syntax/Makefile.am --- mc-4.6.2.orig/syntax/Makefile.am 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/syntax/Makefile.am 2008-11-27 01:01:02.000000000 +0200 @@ -1,6 +1,7 @@ SYNTAXFILES = \ Syntax \ ada95.syntax \ + awk.syntax \ aspx.syntax \ assembler.syntax \ c.syntax \ @@ -31,6 +32,7 @@ php.syntax \ po.syntax \ povray.syntax \ + ebuild.syntax \ python.syntax \ ruby.syntax \ sh.syntax \ diff -ruN mc-4.6.2.orig/syntax/nemerle.syntax mc-4.6.2/syntax/nemerle.syntax --- mc-4.6.2.orig/syntax/nemerle.syntax 1970-01-01 03:00:00.000000000 +0300 +++ mc-4.6.2/syntax/nemerle.syntax 2008-11-27 01:00:21.000000000 +0200 @@ -0,0 +1,171 @@ +# mcedit syntax file +# +# Copyright (c) 2004 The University of Wroclaw. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the University may not be used to endorse or promote +# products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN +# NO EVENT SHALL THE UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Adapted from java.syntax by Jacek Sliwerski. + +context default + keyword whole abstract yellow + keyword whole and yellow + keyword whole array yellow + keyword whole as yellow + keyword whole base yellow + keyword whole bool yellow + keyword whole catch yellow + keyword whole const yellow + keyword whole continue yellow + keyword whole def yellow + keyword whole else yellow + keyword whole enum yellow + keyword whole extends yellow + keyword whole extern yellow + keyword whole false yellow + keyword whole finally yellow + keyword whole float yellow + keyword whole for yellow + keyword whole foreach yellow + keyword whole fun yellow + keyword whole if yellow + keyword whole implements yellow + keyword whole in yellow + keyword whole int yellow + keyword whole interface yellow + keyword whole internal yellow + keyword whole list yellow + keyword whole macro yellow + keyword whole match yellow + keyword whole module yellow + keyword whole mutable yellow + keyword whole namespace yellow + keyword whole new yellow + keyword whole null yellow + keyword whole object yellow + keyword whole option yellow + keyword whole out yellow + keyword whole override yellow + keyword whole params yellow + keyword whole private yellow + keyword whole protected yellow + keyword whole public yellow + keyword whole ref yellow + keyword whole sealed yellow + keyword whole static yellow + keyword whole string yellow + keyword whole syntax yellow + keyword whole this yellow + keyword whole throw yellow + keyword whole true yellow + keyword whole try yellow + keyword whole tymatch yellow + keyword whole type yellow + keyword whole typeof yellow + keyword whole unless yellow + keyword whole using yellow + keyword whole variant yellow + keyword whole virtual yellow + keyword whole void yellow + keyword whole when yellow + keyword whole where yellow + keyword whole while yellow + keyword whole with yellow + + keyword /\* brown + keyword \*/ brown + keyword // brown + + keyword '\\\{"abtnvfr\}' brightgreen + keyword '\\\{0123\}\{01234567\}\{01234567\}' brightgreen + keyword '\\'' brightgreen + keyword '\\\\' brightgreen + keyword '\\0' brightgreen + keyword '\{\s!"#$%&()\*\+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\}' brightgreen + + + keyword %&& brightcyan + keyword || brightcyan + keyword && brightcyan + keyword %| brightcyan + keyword %& brightcyan + keyword %^ brightcyan + keyword :> brightcyan + keyword <[ brightcyan + keyword ]> brightcyan + keyword > yellow + keyword < yellow + keyword \+ yellow + keyword - yellow + keyword \* yellow + keyword / yellow + keyword % yellow + keyword = yellow + keyword != yellow + keyword == yellow + keyword { brightcyan + keyword } brightcyan + keyword ( brightcyan + keyword ) brightcyan + keyword [ brightcyan + keyword ] brightcyan + keyword , brightcyan + keyword : brightcyan + keyword ? brightcyan + keyword | brightcyan + keyword ~ brightcyan + keyword ! brightcyan + keyword ; brightmagenta + +context exclusive /\* \*/ brown + spellcheck + +context exclusive // \n brown + spellcheck + +context linestart # \n brightred + keyword \\\n yellow + keyword /\**\*/ brown + keyword //*\n brown + keyword "+" red + keyword <+> red + +context " " green + spellcheck + keyword $\[().abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_\*\] brightgreen + keyword \\" brightgreen + keyword %% brightgreen + keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen + keyword %\[0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[hl\]\{diuxX\} brightgreen + keyword %\[hl\]n brightgreen + keyword %\[-\]\[0123456789\*\]\[.\]\[0123456789\*\]s brightgreen + keyword %[*] brightgreen + keyword %c brightgreen + keyword %p brightgreen + keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen + keyword \\\\ brightgreen + keyword \\' brightgreen + keyword \\\{abtnvfr\} brightgreen + + diff -ruN mc-4.6.2.orig/syntax/Syntax mc-4.6.2/syntax/Syntax --- mc-4.6.2.orig/syntax/Syntax 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/syntax/Syntax 2008-11-27 01:00:21.000000000 +0200 @@ -46,6 +46,9 @@ file ..\*\\.(rb|RB)$ Ruby\sProgram ^#!.\*([\s/]ruby|@RUBY@) include ruby.syntax +file ..\*\\.n$ Nemerle\sProgram +include nemerle.syntax + file ..\*\\.(man|[0-9n]|[0-9]x)$ NROFF\sSource include nroff.syntax @@ -106,7 +109,7 @@ file ..\*\\.st$ SmallTalk\sProgram include smalltalk.syntax -file ..\*\\.(lisp|lsp|el)$ Lisp\sProgram +file ..\*\\.(lisp|lsp|el|cl)$ Lisp\sProgram include lisp.syntax file ..\*\\.(ml|mli|mly|mll|mlp)$ ML\sProgram @@ -121,6 +124,12 @@ file ..\*\\.(spec|spec\.in)$ RPM\sSpecfile include spec.syntax +file ..\*\\.(awk)$ AWK\sFile +include awk.syntax + +file ..\*\\.([cCqQ][sS][sS])$ CSS\sFile +include css.syntax + file .\*ChangeLog[\\\.A-Za-z0-9_]\*$ GNU\sChangeLog\sFile include changelog.syntax @@ -139,6 +148,9 @@ file ..\*\\.([Pp][Oo][Vv])$ POV\sScript include povray.syntax +file .\*\\.(ebuild|eclass)$ Gentoo\sEbuild +include ebuild.syntax + file ..\*\\.([lL][uU][aA])$ LUA\sProgram ^#!.*/lua include lua.syntax diff -ruN mc-4.6.2.orig/vfs/extfs/extfs.ini mc-4.6.2/vfs/extfs/extfs.ini --- mc-4.6.2.orig/vfs/extfs/extfs.ini 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/vfs/extfs/extfs.ini 2008-11-27 01:00:21.000000000 +0200 @@ -12,6 +12,9 @@ # For arj usage you need a special patch to unarj (see unarj.diff) uarj +# For cab files +ucab + # ar is used for static libraries uar diff -ruN mc-4.6.2.orig/vfs/extfs/iso9660.in mc-4.6.2/vfs/extfs/iso9660.in --- mc-4.6.2.orig/vfs/extfs/iso9660.in 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/vfs/extfs/iso9660.in 2008-11-27 01:00:21.000000000 +0200 @@ -39,9 +39,9 @@ $ISOINFO -l -i "$1" | @AWK@ ' BEGIN { dir=""; - # Pattern to match 8 first fields. + # Pattern to match 9 first fields. rx = "[^ ]+[ ]+"; - rx = "^" rx rx rx rx rx rx rx rx; + rx = "^" rx rx rx rx rx rx rx rx rx; irx = "^\\[ *[0-9]* *[0-9]+\\] "; } /^$/ { next } diff -ruN mc-4.6.2.orig/vfs/extfs/Makefile.am mc-4.6.2/vfs/extfs/Makefile.am --- mc-4.6.2.orig/vfs/extfs/Makefile.am 2008-02-19 19:25:27.000000000 +0200 +++ mc-4.6.2/vfs/extfs/Makefile.am 2008-11-27 01:00:21.000000000 +0200 @@ -4,7 +4,7 @@ EXTFS_MISC = README extfs.ini sfs.ini # Scripts hat don't need adaptation to the local system -EXTFS_CONST = bpp rpm trpm u7z +EXTFS_CONST = bpp rpm trpm u7z ucab # Scripts that need adaptation to the local system - source files EXTFS_IN = \ @@ -54,6 +54,7 @@ uzip \ uzoo + if USE_VFS extfs_DATA = $(EXTFS_MISC) extfs_SCRIPTS = $(EXTFS_CONST) $(EXTFS_OUT) diff -ruN mc-4.6.2.orig/vfs/extfs/ucab mc-4.6.2/vfs/extfs/ucab --- mc-4.6.2.orig/vfs/extfs/ucab 1970-01-01 03:00:00.000000000 +0300 +++ mc-4.6.2/vfs/extfs/ucab 2008-11-27 01:00:21.000000000 +0200 @@ -0,0 +1,43 @@ +#! /bin/sh + +CAB=cabextract + +mccabfs_list () +{ + $CAB -l "$1" | gawk -v uid=`id -un` -v gid=`id -gn` ' +BEGIN { flag=0 } +/^-------/ { flag++; if (flag > 1) exit 0; next } +{ +if (flag == 0) next +if (length($6) == 0) next +if (index($6, "/") != 0) + pr="drwxr-xr-x" +else + pr="-rw-r--r--" +split($3, a, ".") +split($4, b, ":") +printf "%s 1 %s %s %d %02d/%02d/%02d %02d:%02d %s\n", pr, uid, gid, $1, a[2], a[1], a[3], b[1], b[2], $6 +}' + +} + +mccabfs_copyout () +{ + $CAB -F "$2" -p "$1" > "$3" +} + +LC_ALL=C +export LC_ALL + +umask 077 + +cmd="$1" + +case "$cmd" in + # Workaround for a bug in mc - directories must precede files to + # avoid duplicate entries, so we sort output by filenames + list) mccabfs_list "$2" ;; + copyout) mccabfs_copyout "$2" "$3" "$4" ;; + *) exit 1 ;; +esac +exit 0