diff options
author | brian <brian@FreeBSD.org> | 2000-03-28 15:14:15 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-03-28 15:14:15 +0000 |
commit | 2442f64e8a401a60a2f9a9a5a2e1083b7a8e4369 (patch) | |
tree | d44121edc9798f1892bbe4c3bc5cab1de6b32222 | |
parent | 7d12e186432375cd7e9c69e1df8c498686ceec58 (diff) | |
download | FreeBSD-src-2442f64e8a401a60a2f9a9a5a2e1083b7a8e4369.zip FreeBSD-src-2442f64e8a401a60a2f9a9a5a2e1083b7a8e4369.tar.gz |
don't treat # specially if PARSE_NOHASH is passed
-rw-r--r-- | usr.sbin/ppp/defs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/defs.c b/usr.sbin/ppp/defs.c index 32e445b..4ea017a 100644 --- a/usr.sbin/ppp/defs.c +++ b/usr.sbin/ppp/defs.c @@ -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'; |