ash: deal with some TODOs (mostly trivial)
function old new delta msg_illnum - 19 +19 evalvar 1365 1364 -1 illnum 19 - -19 subevalvar 1182 1158 -24 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 19/-44) Total: -25 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
9f2e82ad2e
commit
ecc2a2e015
2 changed files with 62 additions and 64 deletions
|
@ -45,6 +45,9 @@ char FAST_FUNC bb_process_escape_sequence(const char **ptr)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* bash requires leading 0 in octal escapes:
|
||||
* \02 works, \2 does not (prints \ and 2).
|
||||
* We treat \2 as a valid octal escape sequence. */
|
||||
do {
|
||||
d = (unsigned char)(*q) - '0';
|
||||
#ifdef WANT_HEX_ESCAPES
|
||||
|
@ -80,7 +83,10 @@ char FAST_FUNC bb_process_escape_sequence(const char **ptr)
|
|||
break;
|
||||
}
|
||||
} while (*++p);
|
||||
n = *(p + (sizeof(charmap)/2));
|
||||
/* p points to found escape char or NUL,
|
||||
* advance it and find what it translates to */
|
||||
p += sizeof(charmap) / 2;
|
||||
n = *p;
|
||||
}
|
||||
|
||||
*ptr = q;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue