[PATCH] some bash support fixups




-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------
#
# Not quite sure what this patch is really about, but it seems to remove
# some special bash<2.0.5b magic in subshell_name_quote() 
#
# Source:	Gentoo Portage
# Reference:	mc-4.6.1
# Submit-By:	Enrico Weigelt, metux IT service <weigelt metux de>
# Submit-Date:	2008-12-25
# State:	new
#
diff -ruN mc-4.6.1.orig/src/subshell.c mc-4.6.1/src/subshell.c
--- mc-4.6.1.orig/src/subshell.c	2008-12-26 02:19:54.000000000 +0100
+++ mc-4.6.1/src/subshell.c	2008-12-26 03:07:32.000000000 +0100
@@ -718,29 +718,13 @@
     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));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]