summaryrefslogtreecommitdiff
path: root/app-misc/mc/files/mc-4.6.1-bash-all.patch
blob: d16128108d771b069b7b7c77d6148ee7867cdf2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- a/src/subshell.c	2006-05-08 23:11:48.000000000 +0200
+++ b/src/subshell.c	2006-10-28 15:40:46.000000000 +0200
@@ -745,29 +745,13 @@ subshell_name_quote (const char *s)
     memcpy (d, cmd_start, len);
     d += len;
 
-    /*
-     * Print every character in octal format with the leading backslash.
-     * tcsh and zsh may require 4-digit octals, bash < 2.05b doesn't like them.
-     */
-    if (subshell_type == BASH) {
 	for (; *s; s++) {
-	    /* Must quote numbers, so that they are not glued to octals */
 	    if (isalpha ((unsigned char) *s)) {
 		*d++ = (unsigned char) *s;
 	    } else {
-		sprintf (d, "\\%03o", (unsigned char) *s);
-		d += 4;
-	    }
-	}
-    } else {
-	for (; *s; s++) {
-	    if (isalnum ((unsigned char) *s)) {
-		*d++ = (unsigned char) *s;
-	    } else {
 		sprintf (d, "\\0%03o", (unsigned char) *s);
 		d += 5;
 	    }
-	}
     }
 
     memcpy (d, common_end, sizeof (common_end));