=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/var.c,v retrieving revision 1.20 retrieving revision 1.21 diff -c -r1.20 -r1.21 *** src/usr.bin/make/var.c 1999/12/16 16:27:13 1.20 --- src/usr.bin/make/var.c 1999/12/16 16:41:42 1.21 *************** *** 1,4 **** ! /* $OpenBSD: var.c,v 1.20 1999/12/16 16:27:13 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: var.c,v 1.21 1999/12/16 16:41:42 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* *************** *** 70,76 **** #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else ! static char rcsid[] = "$OpenBSD: var.c,v 1.20 1999/12/16 16:27:13 espie Exp $"; #endif #endif /* not lint */ --- 70,76 ---- #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else ! static char rcsid[] = "$OpenBSD: var.c,v 1.21 1999/12/16 16:41:42 espie Exp $"; #endif #endif /* not lint */ *************** *** 544,550 **** if (DEBUG(VAR)) { printf("%s:%s = %s\n", ctxt->name, name, ! Buf_GetAll(v->val, NULL)); } } --- 544,550 ---- if (DEBUG(VAR)) { printf("%s:%s = %s\n", ctxt->name, name, ! Buf_Retrieve(v->val)); } } *************** *** 597,607 **** { Var *v; ! v = VarFind (name, ctxt, FIND_ENV | FIND_GLOBAL | FIND_CMD); ! if (v != (Var *) NIL) { ! char *p = Buf_GetAll(v->val, NULL); ! return p; ! } else return NULL; } --- 597,606 ---- { Var *v; ! v = VarFind(name, ctxt, FIND_ENV | FIND_GLOBAL | FIND_CMD); ! if (v != NULL) ! return Buf_Retrieve(v->val); ! else return NULL; } *************** *** 1280,1286 **** free(as); free(av); Buf_AddChar(buf, '\0'); ! str = Buf_GetAll(buf, NULL); Buf_Destroy(buf, FALSE); return (str); } --- 1279,1285 ---- free(as); free(av); Buf_AddChar(buf, '\0'); ! str = Buf_Retrieve(buf); Buf_Destroy(buf, FALSE); return (str); } *************** *** 1379,1385 **** } else { *tstr = ++cp; ! cp = Buf_GetAll(buf, length); *length -= 1; /* Don't count the NULL */ Buf_Destroy(buf, FALSE); return cp; --- 1378,1385 ---- } else { *tstr = ++cp; ! cp = Buf_Retrieve(buf); ! *length = Buf_Size(buf); *length -= 1; /* Don't count the NULL */ Buf_Destroy(buf, FALSE); return cp; *************** *** 1415,1421 **** Buf_AddChar(buf, *str); } Buf_AddChar(buf, '\0'); ! str = Buf_GetAll(buf, NULL); Buf_Destroy(buf, FALSE); return str; } --- 1415,1421 ---- Buf_AddChar(buf, *str); } Buf_AddChar(buf, '\0'); ! str = Buf_Retrieve(buf); Buf_Destroy(buf, FALSE); return str; } *************** *** 1575,1581 **** * the only one who sets these things and we sure don't * but nested invocations in them... */ ! val = Buf_GetAll(v->val, NULL); if (str[3] == 'D') { val = VarModify(val, VarHead, (ClientData)0); --- 1575,1581 ---- * the only one who sets these things and we sure don't * but nested invocations in them... */ ! val = Buf_Retrieve(v->val); if (str[3] == 'D') { val = VarModify(val, VarHead, (ClientData)0); *************** *** 1679,1685 **** * been dynamically-allocated, so it will need freeing when we * return. */ ! str = Buf_GetAll(v->val, NULL); if (strchr (str, '$') != (char *)NULL) { str = Var_Subst(NULL, str, ctxt, err); *freePtr = TRUE; --- 1679,1685 ---- * been dynamically-allocated, so it will need freeing when we * return. */ ! str = Buf_Retrieve(v->val); if (strchr (str, '$') != (char *)NULL) { str = Var_Subst(NULL, str, ctxt, err); *freePtr = TRUE; *************** *** 2258,2264 **** } Buf_AddChar(buf, '\0'); ! str = Buf_GetAll(buf, NULL); Buf_Destroy(buf, FALSE); return (str); } --- 2258,2264 ---- } Buf_AddChar(buf, '\0'); ! str = Buf_Retrieve(buf); Buf_Destroy(buf, FALSE); return (str); } *************** *** 2343,2349 **** ClientData dummy; { Var *v = (Var *) vp; ! printf ("%-16s = %s\n", v->name, Buf_GetAll(v->val, NULL)); return (dummy ? 0 : 0); } --- 2343,2349 ---- ClientData dummy; { Var *v = (Var *) vp; ! printf ("%-16s = %s\n", v->name, Buf_Retrieve(v->val)); return (dummy ? 0 : 0); }