On Tuesday 04 September 2007 09:57, Pavel Tsekov wrote:
Hello,
As it has been discussed on the mailing list a new release of MC is long
overdue. So... I plan to release a new version of MC by mid October. This
gives us about a month (till the end of September) for final testing, bug
reporting, fixing, updating translations and other related tasks - the last
two are to be used by translators to update the MC translation. I hope that
everyone interested will participate in this process so that we can finally
release a new version.
There are three full weeks by the end of September which can be used to
release at most 3 pre-releases and give each a week of testing and polishing
(depending on the user feedback). I am going to wait till the end of this
week for your suggestions on how to use the remaining three weeks and make a
plan according to them, then I'll publish the first pre-release on Monday.
This reminds me that we have another problem to solve -
how are we going to number the new release ? Please, share your thoughts on
that too.
Please include the following patches:
[PATCH] 'a' and 'b' are the same file/directory message box needs Abort
button.
http://www.mail-archive.com/mc-devel@gnome.org/msg05524.html
and
Fwd: [PATCH] make old escmode key timeout configurable
http://osdir.com/ml/gnome.apps.mc.devel/2004-10/msg00212.html
Attached versions of these patches apply cleanly to 1.6.1.
Thanks,
--
vda
diff -urpN mc-4.6.1.org/src/key.c mc-4.6.1/src/key.c
--- mc-4.6.1.org/src/key.c 2005-06-08 14:27:19.0 +0200
+++ mc-4.6.1/src/key.c 2007-05-18 13:49:17.0 +0200
@@ -73,7 +73,7 @@
(t2.tv_usec-t1.tv_usec)/1000)
/* timeout for old_esc_mode in usec */
-#define ESCMODE_TIMEOUT 100
+#define ESCMODE_TIMEOUT keyboard_key_timeout
/* Linux console keyboard modifiers */
#define SHIFT_PRESSED 1
@@ -85,6 +85,7 @@
int mou_auto_repeat = 100;
int double_click_speed = 250;
int old_esc_mode = 0;
+int keyboard_key_timeout = 100; /* settable via env */
int use_8th_bit_as_meta = 0;
@@ -427,6 +428,10 @@ init_key (void)
{
const char *term = getenv (TERM);
+char *kt = (char *)getenv(KEYBOARD_KEY_TIMEOUT_US);
+if (kt != NULL)
+ keyboard_key_timeout = atoi(kt);
+
/* This has to be the first define_sequence */
/* So, we can assume that the first keys member has ESC */
define_sequences (mc_default_keys);
diff -urpN mc-4.6.1.org/src/utilunix.c mc-4.6.1/src/utilunix.c
--- mc-4.6.1.org/src/utilunix.c 2005-07-23 18:52:03.0 +0200
+++ mc-4.6.1/src/utilunix.c 2007-05-18 13:42:31.0 +0200
@@ -240,8 +240,9 @@ mc_tmpdir (void)
struct stat st;
const char *error = NULL;
-/* Check if already initialized */
-if (tmpdir)
+/* Check if already initialized and still exists */
+/* (some people run automatic /tmp cleaners...) */
+if (tmpdir lstat (tmpdir, st) == 0)
return tmpdir;
sys_tmp = getenv (TMPDIR);
diff -urpN mc-4.6.1.org/src/file.c mc-4.6.1.cp/src/file.c
--- mc-4.6.1.org/src/file.c 2005-05-27 16:19:18.0 +0200
+++ mc-4.6.1.cp/src/file.c 2007-05-18 16:00:23.0 +0200
@@ -458,6 +458,25 @@ enum {
DEST_FULL /* Created, fully copied */
};
+static int warn_same_file(const char *fmt, const char *a, const char *b)
+{
+char *msg;
+/* We don't expect %d etc, just %s, so strlen(fmt) should be ok */
+int n = strlen(fmt) + strlen(a) + strlen(b) + 1;
+
+msg = malloc(n);
+if (msg) {
+ snprintf(msg, n, fmt, a, b);
+ n = query_dialog (MSG_ERROR, msg,
+ D_ERROR, 2, _(Skip), _(Abort));
+ free(msg);
+ do_refresh ();
+ if (n) /* 1 == Abort */
+ return FILE_ABORT;
+}
+return FILE_SKIP;
+}
+
int
copy_file_file (FileOpContext *ctx, const char *src_path, const char *dst_path,
int ask_overwrite, off_t *progress_count,
@@ -512,12 +531,9 @@ copy_file_file (FileOpContext *ctx, cons
if (dst_exists) {
/* Destination already exists */
- if (sb.st_dev == sb2.st_dev sb.st_ino == sb2.st_ino) {
- message (1, MSG_ERROR,
- _( `%s' and `%s' are the same file ), src_path, dst_path);
- do_refresh ();
- return FILE_SKIP;
- }
+ if (sb.st_dev == sb2.st_dev sb.st_ino == sb2.st_ino)
+ return warn_same_file(_( `%s' and `%s' are the same file ),
+src_path, dst_path);
/* Should we replace destination? */
if (ask_overwrite) {
@@ -1043,22 +1059,8 @@ move_file_file (FileOpContext *ctx, cons
if (mc_lstat (d, dst_stats) == 0) {
if (src_stats.st_dev == dst_stats.st_dev
- src_stats.st_ino == dst_stats.st_ino) {
- int msize = COLS - 36;
- char st[MC_MAXPATHLEN];
- char dt[MC_MAXPATHLEN];
-
- if (msize 0)
- msize = 40;
- msize /= 2;
-
- strcpy (st, path_trunc (s, msize));
- strcpy (dt, path_trunc (d, msize));
- message (1, MSG_ERROR,
- _( `%s' and `%s' are the same file ), st, dt);
- do_refresh ();
- return FILE_SKIP;
- }
+ src_stats.st_ino == dst_stats.st_ino)
+