From: Matt Kraai Date: Thu, 21 Jun 2001 13:57:51 +0000 (-0000) Subject: Always apply commands with no specified range. X-Git-Tag: 0_52~90 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=02c40a72b87c93e1b307cc26d79c6a3f39aa2f88;p=oweals%2Fbusybox.git Always apply commands with no specified range. --- 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) * entry point into sedding... */ if ( + /* no range necessary */ + (sed_cmds[i].beg_line == 0 && sed_cmds[i].end_line == 0 && + sed_cmds[i].beg_match == NULL && + sed_cmds[i].end_match == NULL) || /* this line number is the first address we're looking for */ (sed_cmds[i].beg_line && (sed_cmds[i].beg_line == linenum)) || /* 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) * entry point into sedding... */ if ( + /* no range necessary */ + (sed_cmds[i].beg_line == 0 && sed_cmds[i].end_line == 0 && + sed_cmds[i].beg_match == NULL && + sed_cmds[i].end_match == NULL) || /* this line number is the first address we're looking for */ (sed_cmds[i].beg_line && (sed_cmds[i].beg_line == linenum)) || /* this line matches our first address regex */