diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-09-14 07:59:28 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-09-14 07:59:28 +0000 |
commit | 6f33bdc737739f5f5af91fb932f9df4d8b6f3c67 (patch) | |
tree | 54b9f635343d3d405c8036ac3aeef72d8aa64466 | |
parent | 78c58fd2b8dad30a309560fb597834f0265aff18 (diff) | |
download | busybox-w32-6f33bdc737739f5f5af91fb932f9df4d8b6f3c67.tar.gz busybox-w32-6f33bdc737739f5f5af91fb932f9df4d8b6f3c67.tar.bz2 busybox-w32-6f33bdc737739f5f5af91fb932f9df4d8b6f3c67.zip |
Preserve substitution flag value within the current line.
Fixed the following testcase
# cat strings |./busybox sed -n -f test3.sed
1
1
2
c
c
# cat strings
a
b
c
git-svn-id: svn://busybox.net/trunk/busybox@7503 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | editors/sed.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c index aa3ce024e..2be4ed174 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -902,7 +902,7 @@ static void process_file(FILE * file) | |||
902 | } | 902 | } |
903 | #endif | 903 | #endif |
904 | /* we print the pattern_space once, unless we were told to be quiet */ | 904 | /* we print the pattern_space once, unless we were told to be quiet */ |
905 | substituted = do_subst_command(sed_cmd, &pattern_space); | 905 | substituted |= do_subst_command(sed_cmd, &pattern_space); |
906 | 906 | ||
907 | #ifdef CONFIG_FEATURE_SED_EMBEDED_NEWLINE | 907 | #ifdef CONFIG_FEATURE_SED_EMBEDED_NEWLINE |
908 | /* undo HACK: escape newlines twice so regex can match them */ | 908 | /* undo HACK: escape newlines twice so regex can match them */ |