libbb: document that we maybe will want to understand \e someday

(no code changes)
This commit is contained in:
Denis Vlasenko 2008-09-19 23:43:59 +00:00
parent 9ac706b7a6
commit 248b4a77e7

View File

@ -18,17 +18,20 @@
char FAST_FUNC bb_process_escape_sequence(const char **ptr) char FAST_FUNC bb_process_escape_sequence(const char **ptr)
{ {
/* bash builtin "echo -e '\ec'" interprets \e as ESC,
* but coreutils "/bin/echo -e '\ec'" does not.
* manpages tend to support coreutils way. */
static const char charmap[] ALIGN1 = { static const char charmap[] ALIGN1 = {
'a', 'b', 'f', 'n', 'r', 't', 'v', '\\', 0, 'a', 'b', /*'e',*/ 'f', 'n', 'r', 't', 'v', '\\', 0,
'\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', '\\' }; '\a', '\b', /*27,*/ '\f', '\n', '\r', '\t', '\v', '\\', '\\' };
const char *p; const char *p;
const char *q; const char *q;
unsigned int num_digits; unsigned num_digits;
unsigned int r; unsigned r;
unsigned int n; unsigned n;
unsigned int d; unsigned d;
unsigned int base; unsigned base;
num_digits = n = 0; num_digits = n = 0;
base = 8; base = 8;