Do some evil with VAR_KEEP to make it happier. This seems... wrong.

This commit is contained in:
mycroft 2000-06-06 09:00:49 +00:00
parent 9994843c59
commit 6bf47769cb

View File

@ -1,4 +1,4 @@
/* $NetBSD: var.c,v 1.49 2000/06/06 08:44:57 mycroft Exp $ */
/* $NetBSD: var.c,v 1.50 2000/06/06 09:00:49 mycroft Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -39,14 +39,14 @@
*/
#ifdef MAKE_BOOTSTRAP
static char rcsid[] = "$NetBSD: var.c,v 1.49 2000/06/06 08:44:57 mycroft Exp $";
static char rcsid[] = "$NetBSD: var.c,v 1.50 2000/06/06 09:00:49 mycroft Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: var.c,v 1.49 2000/06/06 08:44:57 mycroft Exp $");
__RCSID("$NetBSD: var.c,v 1.50 2000/06/06 09:00:49 mycroft Exp $");
#endif
#endif /* not lint */
#endif
@ -2052,12 +2052,12 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr)
wantit = ((v->flags & VAR_JUNK) != 0);
else
wantit = ((v->flags & VAR_JUNK) == 0);
if ((v->flags & VAR_JUNK) != 0)
v->flags |= VAR_KEEP;
if (wantit) {
newStr = (char *)Buf_GetAll(buf, (int *)NULL);
Buf_Destroy(buf, FALSE);
} else {
if ((v->flags & VAR_JUNK) != 0)
v->flags |= VAR_KEEP;
newStr = str;
Buf_Destroy(buf, TRUE);
}