Skip to content

Commit

Permalink
* src/subshell.c (subshell_name_quote): Bash < 2.05b (3-digit octals in
Browse files Browse the repository at this point in the history
echo_e_cmd) no longer supported.
* NEWS: Comment reflecting above change.
  • Loading branch information
Leonard den Ottolander committed Nov 27, 2006
1 parent 721277f commit 0ac1df7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>

* acinclude.m4 (AC_GET_FS_INFO): Add erronously removed call to
Expand Down
6 changes: 6 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
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.
- Device numbers are displayed correctly.
- Improved message formatting for i18n.
Expand Down
5 changes: 5 additions & 0 deletions src/ChangeLog
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>

* key.c (get_event): Eliminate timeouts on window resize event.
Expand Down
11 changes: 7 additions & 4 deletions src/subshell.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,16 +747,19 @@ subshell_name_quote (const char *s)

/*
* 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) {
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)) {
*d++ = (unsigned char) *s;
} else {
sprintf (d, "\\%03o", (unsigned char) *s);
d += 4;
sprintf (d, "\\0%03o", (unsigned char) *s);
d += 5;
}
}
} else {
Expand Down

0 comments on commit 0ac1df7

Please sign in to comment.