diff options
author | Glenn L McGrath | 2003-09-15 06:28:45 +0000 |
---|---|---|
committer | Glenn L McGrath | 2003-09-15 06:28:45 +0000 |
commit | 2eed0e2d470d7020e8bdec2a0f398a296192816b (patch) | |
tree | 6cac378079257eb4bb2c9364ecb2976720f4091e /editors | |
parent | 6e5687abc3732fac6d8a43a324b8f284f7a5482d (diff) | |
download | busybox-2eed0e2d470d7020e8bdec2a0f398a296192816b.zip busybox-2eed0e2d470d7020e8bdec2a0f398a296192816b.tar.gz |
Add a test for the 'P' command and fix current implementation so it
doesnt permanently modify the pattern space.
Diffstat (limited to 'editors')
-rw-r--r-- | editors/sed.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editors/sed.c b/editors/sed.c index 8c77a0f..2b01ec7 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -857,7 +857,11 @@ static void process_file(FILE * file) if (tmp) { *tmp = '\0'; + puts(pattern_space); + *tmp = '\n'; + break; } + /* Fall Through */ } case 'p': /* Write the current pattern space to output */ puts(pattern_space); |