From ffe0cc856f12a39f44959e828544c51a8ddd1fb4 Mon Sep 17 00:00:00 2001 From: bug1 Date: Mon, 10 Mar 2003 02:56:56 +0000 Subject: add the 'n' command git-svn-id: svn://busybox.net/trunk/busybox@6728 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- editors/sed.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editors/sed.c b/editors/sed.c index b40aa8e02..5b08c8ee1 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -382,7 +382,7 @@ static char *parse_cmd_str(sed_cmd_t * const sed_cmd, char *cmdstr) { /* if it was a single-letter command that takes no arguments (such as 'p' * or 'd') all we need to do is increment the index past that command */ - if (strchr("pqd=", sed_cmd->cmd)) { + if (strchr("npqd=", sed_cmd->cmd)) { cmdstr++; } /* handle (s)ubstitution command */ @@ -807,6 +807,9 @@ static void process_file(FILE *file) case 'q': /* Branch to end of script and quit */ free(line); return; + case 'n': /* Read next line from input */ + i = ncmds; + break; } } -- cgit v1.2.3-55-g6feb