projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bed4033
)
add the 'n' command
author
Glenn L McGrath
<bug1@ihug.co.nz>
Mon, 10 Mar 2003 02:56:56 +0000
(
02:56
-0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Mon, 10 Mar 2003 02:56:56 +0000
(
02:56
-0000)
editors/sed.c
patch
|
blob
|
history
diff --git
a/editors/sed.c
b/editors/sed.c
index b40aa8e02d70ebce771fa92754b99382fd2141f4..5b08c8ee15a4ec3bf4fb155c65e488112c899d80 100644
(file)
--- 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("
n
pqd=", 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;
}
}