diff options
-rw-r--r-- | libbb/process_escape_sequence.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/libbb/process_escape_sequence.c b/libbb/process_escape_sequence.c index 4d03bd61f..6de2cacdd 100644 --- a/libbb/process_escape_sequence.c +++ b/libbb/process_escape_sequence.c | |||
@@ -18,17 +18,20 @@ | |||
18 | 18 | ||
19 | char FAST_FUNC bb_process_escape_sequence(const char **ptr) | 19 | char FAST_FUNC bb_process_escape_sequence(const char **ptr) |
20 | { | 20 | { |
21 | /* bash builtin "echo -e '\ec'" interprets \e as ESC, | ||
22 | * but coreutils "/bin/echo -e '\ec'" does not. | ||
23 | * manpages tend to support coreutils way. */ | ||
21 | static const char charmap[] ALIGN1 = { | 24 | static const char charmap[] ALIGN1 = { |
22 | 'a', 'b', 'f', 'n', 'r', 't', 'v', '\\', 0, | 25 | 'a', 'b', /*'e',*/ 'f', 'n', 'r', 't', 'v', '\\', 0, |
23 | '\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', '\\' }; | 26 | '\a', '\b', /*27,*/ '\f', '\n', '\r', '\t', '\v', '\\', '\\' }; |
24 | 27 | ||
25 | const char *p; | 28 | const char *p; |
26 | const char *q; | 29 | const char *q; |
27 | unsigned int num_digits; | 30 | unsigned num_digits; |
28 | unsigned int r; | 31 | unsigned r; |
29 | unsigned int n; | 32 | unsigned n; |
30 | unsigned int d; | 33 | unsigned d; |
31 | unsigned int base; | 34 | unsigned base; |
32 | 35 | ||
33 | num_digits = n = 0; | 36 | num_digits = n = 0; |
34 | base = 8; | 37 | base = 8; |