diff options
author | Denys Vlasenko | 2010-10-23 21:06:06 +0200 |
---|---|---|
committer | Denys Vlasenko | 2010-10-23 21:06:06 +0200 |
commit | 53600591311a129717abd2e3bcaa302622a6ce67 (patch) | |
tree | 4b0d08ed429d4b73a9739339e74d84a8a72fe25e /libbb/parse_config.c | |
parent | 6a0d7490ea6ad97aeafb9da04acab13bd3c38e4d (diff) | |
download | busybox-53600591311a129717abd2e3bcaa302622a6ce67.zip busybox-53600591311a129717abd2e3bcaa302622a6ce67.tar.gz |
libbb: introduce and use strcpy_and_process_escape_sequences
function old new delta
strcpy_and_process_escape_sequences - 50 +50
bb_process_escape_sequence 148 138 -10
printf_main 789 776 -13
getty_main 1897 1831 -66
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/3 up/down: 50/-89) Total: -39 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/parse_config.c')
-rw-r--r-- | libbb/parse_config.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/libbb/parse_config.c b/libbb/parse_config.c index 3fff9f2..9dbfaf5 100644 --- a/libbb/parse_config.c +++ b/libbb/parse_config.c @@ -187,19 +187,7 @@ again: #if 0 /* unused so far */ if (flags & PARSE_ESCAPE) { - const char *from; - char *to; - - from = to = tokens[t]; - while (*from) { - if (*from == '\\') { - from++; - *to++ = bb_process_escape_sequence(&from); - } else { - *to++ = *from++; - } - } - *to = '\0'; + strcpy_and_process_escape_sequences(tokens[t], tokens[t]); } #endif /* Skip possible delimiters */ |