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:
d8f6d8c
)
sed: document where we are more liberal then GNU
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 7 Jul 2013 23:43:40 +0000
(
01:43
+0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 7 Jul 2013 23:43:40 +0000
(
01:43
+0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
editors/sed.c
patch
|
blob
|
history
diff --git
a/editors/sed.c
b/editors/sed.c
index f8ca5d3517ca1ee1c854b4e8da219ba8b483ad1d..f90bc5449274620ce57f6e99ecf9d1a1ccc22c0f 100644
(file)
--- a/
editors/sed.c
+++ b/
editors/sed.c
@@
-649,6
+649,12
@@
static void add_cmd(const char *cmdstr)
sed_cmd->cmd = *cmdstr++;
cmdstr = parse_cmd_args(sed_cmd, cmdstr);
+ /* cmdstr now points past args.
+ * GNU sed requires a separator, if there are more commands,
+ * else it complains "char N: extra characters after command".
+ * Example: "sed 'p;d'". We also allow "sed 'pd'".
+ */
+
/* Add the command to the command array */
*G.sed_cmd_tail = sed_cmd;
G.sed_cmd_tail = &sed_cmd->next;