aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-15 06:28:45 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-15 06:28:45 +0000
commit39a7b575b6b8f0e4d35579c357c8d419327f6543 (patch)
tree6cac378079257eb4bb2c9364ecb2976720f4091e /editors
parentdb3f2bee3fef51d263599f8d13dfb3b5945999c1 (diff)
downloadbusybox-w32-39a7b575b6b8f0e4d35579c357c8d419327f6543.tar.gz
busybox-w32-39a7b575b6b8f0e4d35579c357c8d419327f6543.tar.bz2
busybox-w32-39a7b575b6b8f0e4d35579c357c8d419327f6543.zip
Add a test for the 'P' command and fix current implementation so it
doesnt permanently modify the pattern space. git-svn-id: svn://busybox.net/trunk/busybox@7521 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'editors')
-rw-r--r--editors/sed.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 8c77a0ffc..2b01ec7ff 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -857,7 +857,11 @@ static void process_file(FILE * file)
857 857
858 if (tmp) { 858 if (tmp) {
859 *tmp = '\0'; 859 *tmp = '\0';
860 puts(pattern_space);
861 *tmp = '\n';
862 break;
860 } 863 }
864 /* Fall Through */
861 } 865 }
862 case 'p': /* Write the current pattern space to output */ 866 case 'p': /* Write the current pattern space to output */
863 puts(pattern_space); 867 puts(pattern_space);