Browse Source

* src/subshell.c (subshell_name_quote): Bash < 2.05b (3-digit octals in
echo_e_cmd) no longer supported.
* NEWS: Comment reflecting above change.

Leonard den Ottolander 18 years ago
parent
commit
0ac1df7d4f
4 changed files with 23 additions and 4 deletions
  1. 5 0
      ChangeLog
  2. 6 0
      NEWS
  3. 5 0
      src/ChangeLog
  4. 7 4
      src/subshell.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2006-11-27  Leonard den Ottolander  <leonard den ottolander nl>
+
+	* NEWS: Bash < 2.05b (3-digit octals in echo_e_cmd) no longer
+	supported.
+
 2006-09-07  Pavel Tsekov  <ptsekov@gmx.net>
 2006-09-07  Pavel Tsekov  <ptsekov@gmx.net>
 
 
 	* acinclude.m4 (AC_GET_FS_INFO): Add erronously removed call to
 	* acinclude.m4 (AC_GET_FS_INFO): Add erronously removed call to

+ 6 - 0
NEWS

@@ -1,5 +1,11 @@
 Current
 Current
 
 
+- Core functionality.
+	- Bash < 2.05b no longer supported. For usage with bash < 2.05b fix
+	subshell_name_quote() to use 3-digit octals.
+
+Version 4.6.1.
+
 - Core functionality.
 - Core functionality.
 	- Device numbers are displayed correctly.
 	- Device numbers are displayed correctly.
 	- Improved message formatting for i18n.
 	- Improved message formatting for i18n.

+ 5 - 0
src/ChangeLog

@@ -1,3 +1,8 @@
+2006-11-27  Leonard den Ottolander  <leonard den ottolander nl>
+
+	* subshell.c (subshell_name_quote): Bash < 2.05b (3-digit octals in
+	echo_e_cmd) no longer supported.
+
 2006-11-08  Egmont Koblinger  <egmont@uhulinux.hu>
 2006-11-08  Egmont Koblinger  <egmont@uhulinux.hu>
 
 
 	* key.c (get_event): Eliminate timeouts on window resize event.
 	* key.c (get_event): Eliminate timeouts on window resize event.

+ 7 - 4
src/subshell.c

@@ -747,16 +747,19 @@ subshell_name_quote (const char *s)
 
 
     /*
     /*
      * Print every character in octal format with the leading backslash.
      * 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.
+     * bash >= 3.2, tcsh and zsh require 4-digit octals, 2.05b <= bash < 3.2
+     * support 3-digit octals as well as 4-digit octals.
+     * For bash < 2.05b fix below to use 3-digit octals.
      */
      */
     if (subshell_type == BASH) {
     if (subshell_type == BASH) {
 	for (; *s; s++) {
 	for (; *s; s++) {
-	    /* Must quote numbers, so that they are not glued to octals */
+	    /* Must quote numbers, so that they are not glued to octals
+	       for bash < 3.2 */
 	    if (isalpha ((unsigned char) *s)) {
 	    if (isalpha ((unsigned char) *s)) {
 		*d++ = (unsigned char) *s;
 		*d++ = (unsigned char) *s;
 	    } else {
 	    } else {
-		sprintf (d, "\\%03o", (unsigned char) *s);
-		d += 4;
+		sprintf (d, "\\0%03o", (unsigned char) *s);
+		d += 5;
 	    }
 	    }
 	}
 	}
     } else {
     } else {