From: Denys Vlasenko Date: Sun, 7 Jul 2013 23:43:40 +0000 (+0200) Subject: sed: document where we are more liberal then GNU X-Git-Tag: 1_22_0~157 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e93d15613e827db0d1a7ee7e251b7360bb7ab447;p=oweals%2Fbusybox.git sed: document where we are more liberal then GNU Signed-off-by: Denys Vlasenko --- diff --git a/editors/sed.c b/editors/sed.c index f8ca5d351..f90bc5449 100644 --- 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;