projects
/
platform
/
upstream
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfae252
)
Always print a newline after a matching substitution.
author
Matt Kraai
<kraai@debian.org>
Thu, 17 May 2001 01:02:58 +0000
(
01:02
-0000)
committer
Matt Kraai
<kraai@debian.org>
Thu, 17 May 2001 01:02:58 +0000
(
01:02
-0000)
editors/sed.c
patch
|
blob
|
history
sed.c
patch
|
blob
|
history
diff --git
a/editors/sed.c
b/editors/sed.c
index
1c22770
..
16e8e18
100644
(file)
--- a/
editors/sed.c
+++ b/
editors/sed.c
@@
-577,12
+577,7
@@
static int do_subst_command(const struct sed_cmd *sed_cmd, const char *line)
break;
}
- /* if there's anything left of the line, print it */
- if (*hackline)
- puts(hackline);
- /* otherwise, we need to print a newline */
- else
- printf("\n");
+ puts(hackline);
/* cleanup */
free(regmatch);
diff --git
a/sed.c
b/sed.c
index
1c22770
..
16e8e18
100644
(file)
--- a/
sed.c
+++ b/
sed.c
@@
-577,12
+577,7
@@
static int do_subst_command(const struct sed_cmd *sed_cmd, const char *line)
break;
}
- /* if there's anything left of the line, print it */
- if (*hackline)
- puts(hackline);
- /* otherwise, we need to print a newline */
- else
- printf("\n");
+ puts(hackline);
/* cleanup */
free(regmatch);