aboutsummaryrefslogtreecommitdiff
path: root/sed.c
diff options
context:
space:
mode:
authormarkw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-05-14 19:53:08 +0000
committermarkw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-05-14 19:53:08 +0000
commit8c8392c6d6f041670bc6bcedbd712a6ac041db40 (patch)
treebb25a95d1ebdfb6fe487caa51153f1fdf7316509 /sed.c
parente4a1b09fdb5f2de9bed297cd3c5beb3bd63737a5 (diff)
downloadbusybox-w32-8c8392c6d6f041670bc6bcedbd712a6ac041db40.tar.gz
busybox-w32-8c8392c6d6f041670bc6bcedbd712a6ac041db40.tar.bz2
busybox-w32-8c8392c6d6f041670bc6bcedbd712a6ac041db40.zip
...And now that we're chomping lines, we need to re-add the newline later...
git-svn-id: svn://busybox.net/trunk/busybox@2639 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'sed.c')
-rw-r--r--sed.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sed.c b/sed.c
index 7fd803fdb..21614fc77 100644
--- a/sed.c
+++ b/sed.c
@@ -637,7 +637,7 @@ static int do_sed_command(const struct sed_cmd *sed_cmd, const char *line)
637 break; 637 break;
638 638
639 case 'a': 639 case 'a':
640 fputs(line, stdout); 640 puts(line);
641 fputs(sed_cmd->editline, stdout); 641 fputs(sed_cmd->editline, stdout);
642 altered++; 642 altered++;
643 break; 643 break;
@@ -653,7 +653,7 @@ static int do_sed_command(const struct sed_cmd *sed_cmd, const char *line)
653 653
654 case 'r': { 654 case 'r': {
655 FILE *file; 655 FILE *file;
656 fputs(line, stdout); 656 puts(line);
657 file = fopen(sed_cmd->filename, "r"); 657 file = fopen(sed_cmd->filename, "r");
658 if (file) 658 if (file)
659 print_file(file); 659 print_file(file);
@@ -724,7 +724,7 @@ static void process_file(FILE *file)
724 * line was altered (via a 'd'elete or 's'ubstitution), in which case 724 * line was altered (via a 'd'elete or 's'ubstitution), in which case
725 * the altered line was already printed */ 725 * the altered line was already printed */
726 if (!be_quiet && !line_altered) 726 if (!be_quiet && !line_altered)
727 fputs(line, stdout); 727 puts(line);
728 728
729 free(line); 729 free(line);
730 } 730 }