summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Whitley2001-05-14 19:53:08 +0000
committerMark Whitley2001-05-14 19:53:08 +0000
commitdd527d3c6215dba1ad7ddcdd6f393b9fff6dddef (patch)
treebb25a95d1ebdfb6fe487caa51153f1fdf7316509
parent9de265926498000ae7adc016a25e3af0d249db79 (diff)
downloadbusybox-dd527d3c6215dba1ad7ddcdd6f393b9fff6dddef.zip
busybox-dd527d3c6215dba1ad7ddcdd6f393b9fff6dddef.tar.gz
...And now that we're chomping lines, we need to re-add the newline later...
-rw-r--r--editors/sed.c6
-rw-r--r--sed.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 7fd803f..21614fc 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)
break;
case 'a':
- fputs(line, stdout);
+ puts(line);
fputs(sed_cmd->editline, stdout);
altered++;
break;
@@ -653,7 +653,7 @@ static int do_sed_command(const struct sed_cmd *sed_cmd, const char *line)
case 'r': {
FILE *file;
- fputs(line, stdout);
+ puts(line);
file = fopen(sed_cmd->filename, "r");
if (file)
print_file(file);
@@ -724,7 +724,7 @@ static void process_file(FILE *file)
* line was altered (via a 'd'elete or 's'ubstitution), in which case
* the altered line was already printed */
if (!be_quiet && !line_altered)
- fputs(line, stdout);
+ puts(line);
free(line);
}
diff --git a/sed.c b/sed.c
index 7fd803f..21614fc 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)
break;
case 'a':
- fputs(line, stdout);
+ puts(line);
fputs(sed_cmd->editline, stdout);
altered++;
break;
@@ -653,7 +653,7 @@ static int do_sed_command(const struct sed_cmd *sed_cmd, const char *line)
case 'r': {
FILE *file;
- fputs(line, stdout);
+ puts(line);
file = fopen(sed_cmd->filename, "r");
if (file)
print_file(file);
@@ -724,7 +724,7 @@ static void process_file(FILE *file)
* line was altered (via a 'd'elete or 's'ubstitution), in which case
* the altered line was already printed */
if (!be_quiet && !line_altered)
- fputs(line, stdout);
+ puts(line);
free(line);
}