diff options
author | Glenn L McGrath | 2003-03-10 02:56:56 +0000 |
---|---|---|
committer | Glenn L McGrath | 2003-03-10 02:56:56 +0000 |
commit | ff724fb076f33d8806898d12f10c8e0f2a778003 (patch) | |
tree | cb5e2a655e6fd916a5d1df92cf0a7e828999d7d3 | |
parent | bed4033e968274de997f265313738952b754fb3e (diff) | |
download | busybox-ff724fb076f33d8806898d12f10c8e0f2a778003.zip busybox-ff724fb076f33d8806898d12f10c8e0f2a778003.tar.gz |
add the 'n' command
-rw-r--r-- | editors/sed.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c index b40aa8e..5b08c8e 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; } } |