aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2001-05-14 20:44:26 +0000
committerMark Whitley <markw@lineo.com>2001-05-14 20:44:26 +0000
commitd928accbbd59732a5d6c536be0adb68b466d603f (patch)
tree7e00d66b28bb4d32b06601726d91c6a2128fbee8
parent2416dfc3c9398aaeb37cf31df667784b8f1fe563 (diff)
downloadbusybox-w32-d928accbbd59732a5d6c536be0adb68b466d603f.tar.gz
busybox-w32-d928accbbd59732a5d6c536be0adb68b466d603f.tar.bz2
busybox-w32-d928accbbd59732a5d6c536be0adb68b466d603f.zip
...Need to print just a few more newlines.
-rw-r--r--editors/sed.c7
-rw-r--r--sed.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 21614fc77..1c227704e 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -579,7 +579,10 @@ static int do_subst_command(const struct sed_cmd *sed_cmd, const char *line)
579 579
580 /* if there's anything left of the line, print it */ 580 /* if there's anything left of the line, print it */
581 if (*hackline) 581 if (*hackline)
582 fputs(hackline, stdout); 582 puts(hackline);
583 /* otherwise, we need to print a newline */
584 else
585 printf("\n");
583 586
584 /* cleanup */ 587 /* cleanup */
585 free(regmatch); 588 free(regmatch);
@@ -594,7 +597,7 @@ static int do_sed_command(const struct sed_cmd *sed_cmd, const char *line)
594 switch (sed_cmd->cmd) { 597 switch (sed_cmd->cmd) {
595 598
596 case 'p': 599 case 'p':
597 fputs(line, stdout); 600 puts(line);
598 break; 601 break;
599 602
600 case 'd': 603 case 'd':
diff --git a/sed.c b/sed.c
index 21614fc77..1c227704e 100644
--- a/sed.c
+++ b/sed.c
@@ -579,7 +579,10 @@ static int do_subst_command(const struct sed_cmd *sed_cmd, const char *line)
579 579
580 /* if there's anything left of the line, print it */ 580 /* if there's anything left of the line, print it */
581 if (*hackline) 581 if (*hackline)
582 fputs(hackline, stdout); 582 puts(hackline);
583 /* otherwise, we need to print a newline */
584 else
585 printf("\n");
583 586
584 /* cleanup */ 587 /* cleanup */
585 free(regmatch); 588 free(regmatch);
@@ -594,7 +597,7 @@ static int do_sed_command(const struct sed_cmd *sed_cmd, const char *line)
594 switch (sed_cmd->cmd) { 597 switch (sed_cmd->cmd) {
595 598
596 case 'p': 599 case 'p':
597 fputs(line, stdout); 600 puts(line);
598 break; 601 break;
599 602
600 case 'd': 603 case 'd':