aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2001-06-21 13:57:51 +0000
committerMatt Kraai <kraai@debian.org>2001-06-21 13:57:51 +0000
commit02c40a72b87c93e1b307cc26d79c6a3f39aa2f88 (patch)
tree069177a62d32ebea1f27881f11027a976198e4ff
parentfa2661f2e5a95f0efd1f019c8ad8742af7bcb55b (diff)
downloadbusybox-w32-02c40a72b87c93e1b307cc26d79c6a3f39aa2f88.tar.gz
busybox-w32-02c40a72b87c93e1b307cc26d79c6a3f39aa2f88.tar.bz2
busybox-w32-02c40a72b87c93e1b307cc26d79c6a3f39aa2f88.zip
Always apply commands with no specified range.
-rw-r--r--editors/sed.c4
-rw-r--r--sed.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 73ed058e2..e7208b0b5 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -608,6 +608,10 @@ static void process_file(FILE *file)
608 * entry point into sedding... 608 * entry point into sedding...
609 */ 609 */
610 if ( 610 if (
611 /* no range necessary */
612 (sed_cmds[i].beg_line == 0 && sed_cmds[i].end_line == 0 &&
613 sed_cmds[i].beg_match == NULL &&
614 sed_cmds[i].end_match == NULL) ||
611 /* this line number is the first address we're looking for */ 615 /* this line number is the first address we're looking for */
612 (sed_cmds[i].beg_line && (sed_cmds[i].beg_line == linenum)) || 616 (sed_cmds[i].beg_line && (sed_cmds[i].beg_line == linenum)) ||
613 /* this line matches our first address regex */ 617 /* this line matches our first address regex */
diff --git a/sed.c b/sed.c
index 73ed058e2..e7208b0b5 100644
--- a/sed.c
+++ b/sed.c
@@ -608,6 +608,10 @@ static void process_file(FILE *file)
608 * entry point into sedding... 608 * entry point into sedding...
609 */ 609 */
610 if ( 610 if (
611 /* no range necessary */
612 (sed_cmds[i].beg_line == 0 && sed_cmds[i].end_line == 0 &&
613 sed_cmds[i].beg_match == NULL &&
614 sed_cmds[i].end_match == NULL) ||
611 /* this line number is the first address we're looking for */ 615 /* this line number is the first address we're looking for */
612 (sed_cmds[i].beg_line && (sed_cmds[i].beg_line == linenum)) || 616 (sed_cmds[i].beg_line && (sed_cmds[i].beg_line == linenum)) ||
613 /* this line matches our first address regex */ 617 /* this line matches our first address regex */