=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/for.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- src/usr.bin/make/for.c 1999/12/16 16:41:41 1.9 +++ src/usr.bin/make/for.c 1999/12/16 17:02:45 1.10 @@ -1,4 +1,4 @@ -/* $OpenBSD: for.c,v 1.9 1999/12/16 16:41:41 espie Exp $ */ +/* $OpenBSD: for.c,v 1.10 1999/12/16 17:02:45 espie Exp $ */ /* $NetBSD: for.c,v 1.4 1996/11/06 17:59:05 christos Exp $ */ /* @@ -65,7 +65,7 @@ #if 0 static char sccsid[] = "@(#)for.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: for.c,v 1.9 1999/12/16 16:41:41 espie Exp $"; +static char rcsid[] = "$OpenBSD: for.c,v 1.10 1999/12/16 17:02:45 espie Exp $"; #endif #endif /* not lint */ @@ -101,7 +101,7 @@ static int forLevel = 0; /* Nesting level */ static char *forVar; /* Iteration variable */ -static Buffer forBuf; /* Commands in loop */ +static BUFFER forBuf; /* Commands in loop */ static Lst forLst; /* List of items */ static unsigned long forLineno; /* Line at beginning of loop */ @@ -219,7 +219,7 @@ build_words_list(forLst, sub); free(sub); forLineno = Parse_Getlineno(); - forBuf = Buf_Init(0); + Buf_Init(&forBuf, 0); forLevel++; return 1; } @@ -246,8 +246,8 @@ } if (forLevel != 0) { - Buf_AddString(forBuf, line); - Buf_AddChar(forBuf, '\n'); + Buf_AddString(&forBuf, line); + Buf_AddChar(&forBuf, '\n'); return 1; } else { @@ -304,19 +304,18 @@ { For arg; - if (forVar == NULL || forBuf == NULL || forLst == NULL) + if (forVar == NULL || forLst == NULL) return; arg.var = forVar; - arg.buf = forBuf; + arg.buf = &forBuf; arg.lst = forLst; arg.lineno = forLineno; forVar = NULL; - forBuf = NULL; forLst = NULL; Lst_ForEach(arg.lst, ForExec, (ClientData) &arg); free((Address)arg.var); Lst_Destroy(arg.lst, (void (*) __P((ClientData))) free); - Buf_Destroy(arg.buf, TRUE); + Buf_Destroy(arg.buf); }