diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-23 21:06:06 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-23 21:06:06 +0200 |
commit | 53600591311a129717abd2e3bcaa302622a6ce67 (patch) | |
tree | 4b0d08ed429d4b73a9739339e74d84a8a72fe25e /libbb/parse_config.c | |
parent | 6a0d7490ea6ad97aeafb9da04acab13bd3c38e4d (diff) | |
download | busybox-w32-53600591311a129717abd2e3bcaa302622a6ce67.tar.gz busybox-w32-53600591311a129717abd2e3bcaa302622a6ce67.tar.bz2 busybox-w32-53600591311a129717abd2e3bcaa302622a6ce67.zip |
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 3fff9f212..9dbfaf5d7 100644 --- a/libbb/parse_config.c +++ b/libbb/parse_config.c | |||
@@ -187,19 +187,7 @@ again: | |||
187 | 187 | ||
188 | #if 0 /* unused so far */ | 188 | #if 0 /* unused so far */ |
189 | if (flags & PARSE_ESCAPE) { | 189 | if (flags & PARSE_ESCAPE) { |
190 | const char *from; | 190 | strcpy_and_process_escape_sequences(tokens[t], tokens[t]); |
191 | char *to; | ||
192 | |||
193 | from = to = tokens[t]; | ||
194 | while (*from) { | ||
195 | if (*from == '\\') { | ||
196 | from++; | ||
197 | *to++ = bb_process_escape_sequence(&from); | ||
198 | } else { | ||
199 | *to++ = *from++; | ||
200 | } | ||
201 | } | ||
202 | *to = '\0'; | ||
203 | } | 191 | } |
204 | #endif | 192 | #endif |
205 | /* Skip possible delimiters */ | 193 | /* Skip possible delimiters */ |