[Pkg-mc-commits] r95 - in branch/new-utf8/debian: . patches
winnie at alioth.debian.org
winnie at alioth.debian.org
Wed Feb 27 16:42:08 UTC 2008
Author: winnie
Date: 2008-02-27 16:42:07 +0000 (Wed, 27 Feb 2008)
New Revision: 95
Added:
branch/new-utf8/debian/patches/32_dont_hang_on_errors.patch
Modified:
branch/new-utf8/debian/changelog
branch/new-utf8/debian/patches/33_escaping.patch
Log:
Merge changes from trunk into this branch for experimental
Modified: branch/new-utf8/debian/changelog
===================================================================
--- branch/new-utf8/debian/changelog 2008-02-27 16:32:01 UTC (rev 94)
+++ branch/new-utf8/debian/changelog 2008-02-27 16:42:07 UTC (rev 95)
@@ -1,12 +1,13 @@
-mc (1:4.6.2~pre1-5) UNRELEASED; urgency=low
+mc (1:4.6.2~pre1-6) experimental; urgency=low
- * revert patch to make scp work again.
- * show again hostname in xterm title.
- + added as 32_show_hostname.patch (and removed from proposed-patches)
- * Added patch for (un-)escaping foldernames (Closes: #326047, #458403)
- * Don't chmod if preserve Attributes is unchecked (Closes: #466370)
+ * This version contains bascically the same patches than
+ 1:4.6.2~pre1-5 which is in unstable.
+ Only the utf8 patch is replaced with a newer one. (Which does not
+ yet work for every locale).
+ * Furthermore the recode patch is replaced by a patch provided by the same
+ author than the utf8 patch.
- -- Patrick Winnertz <winnie at debian.org> Wed, 27 Feb 2008 11:34:34 +0100
+ -- Patrick Winnertz <winnie at debian.org> Wed, 27 Feb 2008 17:41:04 +0100
mc (1:4.6.2~pre1-4) experimental; urgency=low
Added: branch/new-utf8/debian/patches/32_dont_hang_on_errors.patch
===================================================================
--- branch/new-utf8/debian/patches/32_dont_hang_on_errors.patch (rev 0)
+++ branch/new-utf8/debian/patches/32_dont_hang_on_errors.patch 2008-02-27 16:42:07 UTC (rev 95)
@@ -0,0 +1,34 @@
+diff -Nurwd mc-4.6.2~pre1.orig/vfs/fish.c mc-4.6.2~pre1/vfs/fish.c
+--- mc-4.6.2~pre1.orig/vfs/fish.c 2008-02-27 16:52:15.000000000 +0100
++++ mc-4.6.2~pre1/vfs/fish.c 2008-02-27 16:56:23.000000000 +0100
+@@ -618,16 +618,28 @@
+ g_free (name);
+ name = quoted_name;
+ fh->u.fish.append = 0;
++
++ /*
++ * Check whether the remote file is readable by using `dd' to copy
++ * a single byte from the remote file to /dev/null. If `dd' completes
++ * with exit status of 0 use `cat' to send the file contents to the
++ * standard output (i.e. over the network).
++ */
+ offset = fish_command (me, FH_SUPER, WANT_STRING,
+ "#RETR /%s\n"
++ "if dd if=/%s of=/dev/null bs=1 count=1 2>/dev/null ;\n"
++ "then\n"
+ "ls -ln /%s 2>/dev/null | (\n"
+ "read p l u g s r\n"
+ "echo \"$s\"\n"
+ ")\n"
+ "echo '### 100'\n"
+ "cat /%s\n"
+- "echo '### 200'\n",
+- name, name, name );
++ "echo '### 200'\n"
++ "else\n"
++ "echo '### 500'\n"
++ "fi\n",
++ name, name, name, name );
+ g_free (name);
+ if (offset != PRELIM) ERRNOR (E_REMOTE, 0);
+ fh->linear = LS_LINEAR_OPEN;
Modified: branch/new-utf8/debian/patches/33_escaping.patch
===================================================================
--- branch/new-utf8/debian/patches/33_escaping.patch 2008-02-27 16:32:01 UTC (rev 94)
+++ branch/new-utf8/debian/patches/33_escaping.patch 2008-02-27 16:42:07 UTC (rev 95)
@@ -1,13 +1,13 @@
-diff -Nurwd mc-4.6.2~pre1.orig/src/command.c mc-4.6.2~pre1/src/command.c
---- mc-4.6.2~pre1.orig/src/command.c 2008-02-27 01:21:56.000000000 +0100
-+++ mc-4.6.2~pre1/src/command.c 2008-02-27 01:22:17.000000000 +0100
-@@ -44,6 +44,33 @@
- /* This holds the command line */
- WInput *cmdline;
+diff -u -w -r1.141 util.c
+--- ./src/util.c 25 Sep 2007 15:33:37 -0000 1.141
++++ ./src/util.c 27 Feb 2008 15:38:13 -0000
+@@ -1525,3 +1525,58 @@
+ return (sep != NULL) ? sep + 1 : result;
+ }
-+/* We'll get escaped strings now.. so we have to unescape them */
++/* Unescape paths or other strings for e.g the internal cd */
+char *
-+unescape_string ( char * in ) {
++unescape_string ( const char * in ) {
+ char * local = NULL;
+ int i = 0;
+ int j = 20;
@@ -20,7 +20,7 @@
+ j = j + 20;
+ local = g_realloc(local,j);
+ }
-+ if ( (strchr(" \t*|;<>~",in[i])) && ( strchr("\\",in[i-1])) ) {
++ if ( (strchr(" \t*|;<>",in[i])) && ( strchr("\\",in[i-1])) ) {
+ k++;
+ local[i-k] = in[i];
+ } else {
@@ -32,26 +32,10 @@
+ return local;
+}
+
- /*
- * Expand the argument to "cd" and change directory. First try tilde
- * expansion, then variable substitution. If the CDPATH variable is set
-@@ -63,6 +90,7 @@
- const char *t;
-
- /* Tilde expansion */
-+ path = unescape_string(path);
- path_tilde = tilde_expand (path);
-
- /* Leave space for further expansion */
-diff -Nurwd mc-4.6.2~pre1.orig/src/complete.c mc-4.6.2~pre1/src/complete.c
---- mc-4.6.2~pre1.orig/src/complete.c 2008-02-27 01:26:38.000000000 +0100
-+++ mc-4.6.2~pre1/src/complete.c 2008-02-27 01:26:01.000000000 +0100
-@@ -962,6 +962,34 @@
- }
- }
-
++/* To be compatible with the general posix command lines we have to escape *
++ * strings for the command line */
+char *
-+escape_string ( char * in ) {
++escape_string ( const char * in ) {
+ char * local = NULL;
+ int i = 0;
+ int j = 20;
@@ -64,51 +48,119 @@
+ j = j + 20;
+ local = g_realloc(local,j);
+ }
-+ if ( (strchr(" \t*|;<>~",in[i])) && (! strchr("\\",in[i-1])) ) {
++ if ( (strchr(" \t*|;<>",in[i])) && (! strchr("\\",in[i-1])) ) {
+ local[i+k] = 92; // Ascii for "\"
-+ k = k+1;
++ k = k+1;
+ local[i+k] = in[i];
+ } else {
+ local[i+k] = in[i];
+ }
+ }
+ local[i+k] = '\0';
-+
++
+ return local;
+}
-+
-+
- #define DO_INSERTION 1
- #define DO_QUERY 2
- /* Returns 1 if the user would like to see us again */
-@@ -969,6 +997,7 @@
+diff -u -w -r1.78 util.h
+--- ./src/util.h 3 Feb 2006 17:04:17 -0000 1.78
++++ ./src/util.h 27 Feb 2008 15:38:13 -0000
+@@ -14,6 +14,8 @@
+ extern const char *cstrcasestr (const char *haystack, const char *needle);
+ extern const char *cstrstr (const char *haystack, const char *needle);
+
++char *unescape_string ( const char * in );
++char *escape_string ( const char * in );
+ void str_replace(char *s, char from, char to);
+ int is_printable (int c);
+ void msglen (const char *text, /*@out@*/ int *lines, /*@out@*/ int *columns);
+diff -u -w -r1.151 file.c
+--- ./src/file.c 25 Sep 2007 15:33:36 -0000 1.151
++++ ./src/file.c 27 Feb 2008 15:38:14 -0000
+@@ -63,6 +63,7 @@
+ #include "widget.h"
+ #include "wtools.h"
+ #include "background.h" /* we_are_background */
++#include "util.h"
+
+ /* Needed for current_panel, other_panel and WTree */
+ #include "dir.h"
+@@ -456,7 +457,7 @@
+ };
+
+ int
+-copy_file_file (FileOpContext *ctx, const char *src_path, const char *dst_path,
++copy_file_file (FileOpContext *ctx, const char *s, const char *d,
+ int ask_overwrite, off_t *progress_count,
+ double *progress_bytes, int is_toplevel_file)
+ {
+@@ -464,6 +465,8 @@
+ gid_t src_gid = (gid_t) - 1;
+
+ char *buf = NULL;
++ const char *dst_path = NULL;
++ const char *src_path = NULL;
+ int buf_size = BUF_8K;
+ int src_desc, dest_desc = -1;
+ int n_read, n_written;
+@@ -479,7 +482,8 @@
+ /* FIXME: We should not be using global variables! */
+ ctx->do_reget = 0;
+ return_status = FILE_RETRY;
+-
++ dst_path = unescape_string(d);
++ src_path = unescape_string(s);
+ if (file_progress_show_source (ctx, src_path) == FILE_ABORT ||
+ file_progress_show_target (ctx, dst_path) == FILE_ABORT)
+ return FILE_ABORT;
+diff -u -w -r1.61 complete.c
+--- ./src/complete.c 25 Sep 2007 15:33:36 -0000 1.61
++++ ./src/complete.c 27 Feb 2008 15:38:14 -0000
+@@ -40,6 +40,7 @@
+ #include "wtools.h"
+ #include "complete.h"
+ #include "main.h"
++#include "util.h"
+ #include "key.h" /* XCTRL and ALT macros */
+
+ typedef char *CompletionFunction (char *, int);
+@@ -911,6 +912,7 @@
+ static int
complete_engine (WInput *in, int what_to_do)
{
- int s;
-+ char *complete = NULL;
-
- if (in->completions && (str_offset_to_pos (in->buffer, in->point)) != end)
++ char *complete = NULL;
+ if (in->completions && in->point != end)
free_completions (in);
-@@ -985,7 +1014,8 @@
+ if (!in->completions){
+@@ -924,7 +926,8 @@
}
if (in->completions){
if (what_to_do & DO_INSERTION || ((what_to_do & DO_QUERY) && !in->completions[1])) {
- if (insert_text (in, in->completions [0], strlen (in->completions [0]))){
-+ complete = escape_string(in->completions [0]);
++ complete = escape_string(in->completions [0]);
+ if (insert_text (in, complete, strlen (complete))){
if (in->completions [1])
beep ();
else
-@@ -1001,9 +1031,11 @@
+@@ -940,9 +943,11 @@
Dlg_head *query_dlg;
WListbox *query_list;
- for (p=in->completions + 1; *p; count++, p++)
-+ for (p=in->completions + 1; *p; count++, p++) {
++ for (p=in->completions + 1; *p; count++, p++) {
+ *p = escape_string(*p);
- if ((i = str_term_width1 (*p)) > maxlen)
+ if ((i = strlen (*p)) > maxlen)
maxlen = i;
-+ }
++ }
start_x = in->widget.x;
start_y = in->widget.y;
if (start_y - 2 >= count) {
+diff -u -w -r1.34 command.c
+--- ./src/command.c 26 Sep 2007 10:22:25 -0000 1.34
++++ ./src/command.c 27 Feb 2008 15:38:15 -0000
+@@ -64,6 +64,7 @@
+ const char *t;
+
+ /* Tilde expansion */
++ path = unescape_string(path);
+ path_tilde = tilde_expand (path);
+
+ /* Leave space for further expansion */
More information about the Pkg-mc-commits
mailing list