* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: defs.c,v 1.10 2000/02/27 01:38:25 brian Exp $
+ * $OpenBSD: defs.c,v 1.11 2000/03/28 15:14:14 brian Exp $
*/
int nargs;
nargs = 0;
- while (*script && *script != '#') {
+ while (*script && (*script != '#' || (flags & PARSE_NOHASH))) {
script += strspn(script, " \t");
if (*script) {
if (nargs >= maxargs - 1)
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';