diff options
author | Denys Vlasenko | 2011-05-03 00:52:22 +0200 |
---|---|---|
committer | Denys Vlasenko | 2011-05-03 00:52:22 +0200 |
commit | 6a0abcc02f0773f32f2d31b3532eec1b11e1f67d (patch) | |
tree | 723311362dbf162b079f2ef88045a128967c0d64 /editors | |
parent | 52d83708364f85463fbc3756420b4068df13aab7 (diff) | |
download | busybox-6a0abcc02f0773f32f2d31b3532eec1b11e1f67d.zip busybox-6a0abcc02f0773f32f2d31b3532eec1b11e1f67d.tar.gz |
sed: support \r in s command
function old new delta
copy_parsing_escapes 65 91 +26
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/sed.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c index 9e27e3e..11c4763 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -218,8 +218,9 @@ static char *copy_parsing_escapes(const char *string, int len) char *dest = xmalloc(len + 1); parse_escapes(dest, string, len, 'n', '\n'); - /* GNU sed also recognizes \t */ + /* GNU sed also recognizes \t and \r */ parse_escapes(dest, dest, strlen(dest), 't', '\t'); + parse_escapes(dest, dest, strlen(dest), 'r', '\r'); return dest; } |