diff options
-rw-r--r-- | editors/sed.c | 6 | ||||
-rw-r--r-- | sed.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/editors/sed.c b/editors/sed.c index 7fd803fdb..21614fc77 100644 --- a/editors/sed.c +++ b/editors/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 | } |
@@ -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 | } |