diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-09-14 07:59:28 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-09-14 07:59:28 +0000 |
commit | 3fe475677a54fff6ce8a39e1d4a7e3d358aeed18 (patch) | |
tree | 54b9f635343d3d405c8036ac3aeef72d8aa64466 | |
parent | f4523562b615b8b2cfc8bcc7a962b4d0f5cb9168 (diff) | |
download | busybox-w32-3fe475677a54fff6ce8a39e1d4a7e3d358aeed18.tar.gz busybox-w32-3fe475677a54fff6ce8a39e1d4a7e3d358aeed18.tar.bz2 busybox-w32-3fe475677a54fff6ce8a39e1d4a7e3d358aeed18.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
-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 */ |