don't treat # specially if PARSE_NOHASH is passed

This commit is contained in:
Brian Somers 2000-03-28 15:14:15 +00:00
parent effc341fe3
commit f3a0d054fe

View File

@ -297,7 +297,7 @@ MakeArgs(char *script, char **pvect, int maxargs, int flags)
int nargs;
nargs = 0;
while (*script && *script != '#') {
while (*script && (*script != '#' || (flags & PARSE_NOHASH))) {
script += strspn(script, " \t");
if (*script) {
if (nargs >= maxargs - 1)
@ -307,7 +307,7 @@ MakeArgs(char *script, char **pvect, int maxargs, int flags)
script = findblank(script, flags);
if (script == NULL)
return -1;
else if (*script == '#')
else if (!(flags & PARSE_NOHASH) && *script == '#')
*script = '\0';
else if (*script)
*script++ = '\0';