[Pkg-mc-commits] r83 - trunk/debian/patches
winnie at alioth.debian.org
winnie at alioth.debian.org
Wed Feb 27 12:03:00 UTC 2008
Author: winnie
Date: 2008-02-27 12:02:58 +0000 (Wed, 27 Feb 2008)
New Revision: 83
Modified:
trunk/debian/patches/61_escaping.patch
Log:
Rediffed for trunk
Modified: trunk/debian/patches/61_escaping.patch
===================================================================
--- trunk/debian/patches/61_escaping.patch 2008-02-27 11:54:50 UTC (rev 82)
+++ trunk/debian/patches/61_escaping.patch 2008-02-27 12:02:58 UTC (rev 83)
@@ -1,52 +1,7 @@
-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;
-
-+/* We'll get escaped strings now.. so we have to unescape them */
-+char *
-+unescape_string ( char * in ) {
-+ char * local = NULL;
-+ int i = 0;
-+ int j = 20;
-+ int k = 0;
-+
-+ local = g_malloc(j);
-+
-+ for (i=0;i<=strlen(in);i++) {
-+ if (i-k >= j ) {
-+ j = j + 20;
-+ local = g_realloc(local,j);
-+ }
-+ if ( (strchr(" \t*|;<>",in[i])) && ( strchr("\\",in[i-1])) ) {
-+ k++;
-+ local[i-k] = in[i];
-+ } else {
-+ local[i-k] = in[i];
-+ }
-+ }
-+ local[i-k] = '\0';
-+
-+ 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 @@
+diff -u -r1.61 complete.c
+--- ./src/complete.c 25 Sep 2007 15:33:36 -0000 1.61
++++ ./src/complete.c 27 Feb 2008 12:01:12 -0000
+@@ -905,12 +905,40 @@
}
}
@@ -66,7 +21,7 @@
+ }
+ 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];
@@ -77,19 +32,17 @@
+ 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 @@
+ 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)
+ if (in->completions && in->point != end)
free_completions (in);
-@@ -985,7 +1014,8 @@
+ if (!in->completions){
+@@ -924,7 +952,8 @@
}
if (in->completions){
if (what_to_do & DO_INSERTION || ((what_to_do & DO_QUERY) && !in->completions[1])) {
@@ -99,16 +52,61 @@
if (in->completions [1])
beep ();
else
-@@ -1001,9 +1031,11 @@
+@@ -940,9 +969,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 -r1.34 command.c
+--- ./src/command.c 26 Sep 2007 10:22:25 -0000 1.34
++++ ./src/command.c 27 Feb 2008 12:01:27 -0000
+@@ -45,6 +45,33 @@
+ /* This holds the command line */
+ WInput *cmdline;
+
++/* We'll get escaped strings now.. so we have to unescape them */
++char *
++unescape_string ( char * in ) {
++ char * local = NULL;
++ int i = 0;
++ int j = 20;
++ int k = 0;
++
++ local = g_malloc(j);
++
++ for (i=0;i<=strlen(in);i++) {
++ if (i-k >= j ) {
++ j = j + 20;
++ local = g_realloc(local,j);
++ }
++ if ( (strchr(" \t*|;<>",in[i])) && ( strchr("\\",in[i-1])) ) {
++ k++;
++ local[i-k] = in[i];
++ } else {
++ local[i-k] = in[i];
++ }
++ }
++ local[i-k] = '\0';
++
++ return local;
++}
++
+ /*
+ * Expand the argument to "cd" and change directory. First try tilde
+ * expansion, then variable substitution. If the CDPATH variable is set
+@@ -64,6 +91,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