diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-29 03:39:55 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-29 03:39:55 +0100 |
commit | 00f0ef4a0cd58582a15afcc77f4601013ce0861c (patch) | |
tree | 473486aac36e283c70fdd4682dedbddee26e950f | |
parent | e039e689e3c4baefb4b62703429aaf86eef1bd99 (diff) | |
download | busybox-w32-00f0ef4a0cd58582a15afcc77f4601013ce0861c.tar.gz busybox-w32-00f0ef4a0cd58582a15afcc77f4601013ce0861c.tar.bz2 busybox-w32-00f0ef4a0cd58582a15afcc77f4601013ce0861c.zip |
echo et al: support \e escape
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | libbb/process_escape_sequence.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libbb/process_escape_sequence.c b/libbb/process_escape_sequence.c index 11059d1a5..3ad908b57 100644 --- a/libbb/process_escape_sequence.c +++ b/libbb/process_escape_sequence.c | |||
@@ -20,10 +20,11 @@ char FAST_FUNC bb_process_escape_sequence(const char **ptr) | |||
20 | { | 20 | { |
21 | /* bash builtin "echo -e '\ec'" interprets \e as ESC, | 21 | /* bash builtin "echo -e '\ec'" interprets \e as ESC, |
22 | * but coreutils "/bin/echo -e '\ec'" does not. | 22 | * but coreutils "/bin/echo -e '\ec'" does not. |
23 | * manpages tend to support coreutils way. */ | 23 | * manpages tend to support coreutils way. |
24 | * Update: coreutils added support for \e on 28 Oct 2009. */ | ||
24 | static const char charmap[] ALIGN1 = { | 25 | static const char charmap[] ALIGN1 = { |
25 | 'a', 'b', /*'e',*/ 'f', 'n', 'r', 't', 'v', '\\', 0, | 26 | 'a', 'b', 'e', 'f', 'n', 'r', 't', 'v', '\\', 0, |
26 | '\a', '\b', /*27,*/ '\f', '\n', '\r', '\t', '\v', '\\', '\\' }; | 27 | '\a', '\b', 27, '\f', '\n', '\r', '\t', '\v', '\\', '\\' }; |
27 | 28 | ||
28 | const char *p; | 29 | const char *p; |
29 | const char *q; | 30 | const char *q; |