Ignore leading semicolons on commands; required by SUSv3.
Obtained from: NetBSD (kleink, Aymeric Vincent)
This commit is contained in:
parent
d57327ee50
commit
0467aed3c9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100944
@ -172,8 +172,14 @@ compile_stream(link)
|
||||
}
|
||||
|
||||
semicolon: EATSPACE();
|
||||
if (p && (*p == '#' || *p == '\0'))
|
||||
continue;
|
||||
if (p) {
|
||||
if (*p == '#' || *p == '\0')
|
||||
continue;
|
||||
else if (*p == ';') {
|
||||
p++;
|
||||
goto semicolon;
|
||||
}
|
||||
}
|
||||
if ((*link = cmd = malloc(sizeof(struct s_command))) == NULL)
|
||||
err(1, "malloc");
|
||||
link = &cmd->next;
|
||||
|
Loading…
Reference in New Issue
Block a user