diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-03-10 02:56:56 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-03-10 02:56:56 +0000 |
commit | ffe0cc856f12a39f44959e828544c51a8ddd1fb4 (patch) | |
tree | cb5e2a655e6fd916a5d1df92cf0a7e828999d7d3 | |
parent | 795fc44a2c7c3476de56b98eb1f49738034b04bb (diff) | |
download | busybox-w32-ffe0cc856f12a39f44959e828544c51a8ddd1fb4.tar.gz busybox-w32-ffe0cc856f12a39f44959e828544c51a8ddd1fb4.tar.bz2 busybox-w32-ffe0cc856f12a39f44959e828544c51a8ddd1fb4.zip |
add the 'n' command
git-svn-id: svn://busybox.net/trunk/busybox@6728 69ca8d6d-28ef-0310-b511-8ec308f3f277
-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 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) | |||
382 | { | 382 | { |
383 | /* if it was a single-letter command that takes no arguments (such as 'p' | 383 | /* if it was a single-letter command that takes no arguments (such as 'p' |
384 | * or 'd') all we need to do is increment the index past that command */ | 384 | * or 'd') all we need to do is increment the index past that command */ |
385 | if (strchr("pqd=", sed_cmd->cmd)) { | 385 | if (strchr("npqd=", sed_cmd->cmd)) { |
386 | cmdstr++; | 386 | cmdstr++; |
387 | } | 387 | } |
388 | /* handle (s)ubstitution command */ | 388 | /* handle (s)ubstitution command */ |
@@ -807,6 +807,9 @@ static void process_file(FILE *file) | |||
807 | case 'q': /* Branch to end of script and quit */ | 807 | case 'q': /* Branch to end of script and quit */ |
808 | free(line); | 808 | free(line); |
809 | return; | 809 | return; |
810 | case 'n': /* Read next line from input */ | ||
811 | i = ncmds; | ||
812 | break; | ||
810 | } | 813 | } |
811 | } | 814 | } |
812 | 815 | ||