summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-12-18 02:11:29 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-12-18 02:11:29 +0000
commit6fab9b498b27116f5e67c44c0b1764a3f51090f4 (patch)
tree34701340e8b64498cc68fbd27ef2bb2f14eaaa5f /usr.bin
parentc1a30f380cfd306ea4402c76a549f35a11685b55 (diff)
make does not use circular lists, get rid of the extra weight.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/arch.c8
-rw-r--r--usr.bin/make/dir.c10
-rw-r--r--usr.bin/make/for.c6
-rw-r--r--usr.bin/make/job.c8
-rw-r--r--usr.bin/make/lst.h4
-rw-r--r--usr.bin/make/lst.lib/lstAppend.c10
-rw-r--r--usr.bin/make/lst.lib/lstConcat.c30
-rw-r--r--usr.bin/make/lst.lib/lstDupl.c12
-rw-r--r--usr.bin/make/lst.lib/lstInit.c8
-rw-r--r--usr.bin/make/lst.lib/lstInsert.c10
-rw-r--r--usr.bin/make/lst.lib/lstInt.h4
-rw-r--r--usr.bin/make/main.c12
-rw-r--r--usr.bin/make/make.c6
-rw-r--r--usr.bin/make/parse.c28
-rw-r--r--usr.bin/make/suff.c56
-rw-r--r--usr.bin/make/targ.c26
-rw-r--r--usr.bin/make/var.c6
17 files changed, 103 insertions, 141 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index 21fa1851635..9310bef9d1a 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arch.c,v 1.18 1999/12/16 17:27:18 espie Exp $ */
+/* $OpenBSD: arch.c,v 1.19 1999/12/18 02:11:26 espie Exp $ */
/* $NetBSD: arch.c,v 1.17 1996/11/06 17:58:59 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94";
#else
-static char rcsid[] = "$OpenBSD: arch.c,v 1.18 1999/12/16 17:27:18 espie Exp $";
+static char rcsid[] = "$OpenBSD: arch.c,v 1.19 1999/12/18 02:11:26 espie Exp $";
#endif
#endif /* not lint */
@@ -359,7 +359,7 @@ Arch_ParseArchive (linePtr, nodeLst, ctxt)
*/
free(buf);
} else if (Dir_HasWildcards(memName)) {
- Lst members = Lst_Init(FALSE);
+ Lst members = Lst_Init();
char *member;
Dir_Expand(memName, dirSearchPath, members);
@@ -1221,7 +1221,7 @@ Arch_LibOODate (gn)
void
Arch_Init ()
{
- archives = Lst_Init (FALSE);
+ archives = Lst_Init();
}
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index 6bcd0f7b734..b2854c9700b 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.c,v 1.9 1999/10/05 22:06:23 espie Exp $ */
+/* $OpenBSD: dir.c,v 1.10 1999/12/18 02:11:26 espie Exp $ */
/* $NetBSD: dir.c,v 1.14 1997/03/29 16:51:26 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94";
#else
-static char rcsid[] = "$OpenBSD: dir.c,v 1.9 1999/10/05 22:06:23 espie Exp $";
+static char rcsid[] = "$OpenBSD: dir.c,v 1.10 1999/12/18 02:11:26 espie Exp $";
#endif
#endif /* not lint */
@@ -215,8 +215,8 @@ static int DirPrintDir __P((ClientData, ClientData));
void
Dir_Init ()
{
- dirSearchPath = Lst_Init (FALSE);
- openDirectories = Lst_Init (FALSE);
+ dirSearchPath = Lst_Init();
+ openDirectories = Lst_Init();
Hash_InitTable(&mtimes, 0);
/*
@@ -633,7 +633,7 @@ Dir_Expand (word, path, expansions)
char *dp = &dirpath[strlen(dirpath) - 1];
if (*dp == '/')
*dp = '\0';
- path = Lst_Init(FALSE);
+ path = Lst_Init();
Dir_AddDir(path, dirpath);
DirExpandInt(cp+1, path, expansions);
Lst_Destroy(path, NOFREE);
diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c
index ba4f89459f5..a2fbb4c5ba4 100644
--- a/usr.bin/make/for.c
+++ b/usr.bin/make/for.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: for.c,v 1.13 1999/12/16 17:27:18 espie Exp $ */
+/* $OpenBSD: for.c,v 1.14 1999/12/18 02:11:26 espie Exp $ */
/* $NetBSD: for.c,v 1.4 1996/11/06 17:59:05 christos Exp $ */
/*
@@ -82,7 +82,7 @@
#if 0
static char sccsid[] = "@(#)for.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: for.c,v 1.13 1999/12/16 17:27:18 espie Exp $";
+static char rcsid[] = "$OpenBSD: for.c,v 1.14 1999/12/18 02:11:26 espie Exp $";
#endif
#endif /* not lint */
@@ -202,7 +202,7 @@ For_Eval(line)
if (DEBUG(FOR))
(void)fprintf(stderr, "For: Iterator %s List %s\n", arg->var, sub);
- arg->lst = Lst_Init(FALSE);
+ arg->lst = Lst_Init();
build_words_list(arg->lst, sub);
free(sub);
arg->lineno = Parse_Getlineno();
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index 16fa9528dd1..584f0d836a3 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: job.c,v 1.16 1999/12/16 17:27:18 espie Exp $ */
+/* $OpenBSD: job.c,v 1.17 1999/12/18 02:11:26 espie Exp $ */
/* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: job.c,v 1.16 1999/12/16 17:27:18 espie Exp $";
+static char rcsid[] = "$OpenBSD: job.c,v 1.17 1999/12/18 02:11:26 espie Exp $";
#endif
#endif /* not lint */
@@ -2428,8 +2428,8 @@ Job_Init(maxproc, maxlocal)
else
(void) close(tfd);
- jobs = Lst_Init(FALSE);
- stoppedJobs = Lst_Init(FALSE);
+ jobs = Lst_Init();
+ stoppedJobs = Lst_Init();
maxJobs = maxproc;
maxLocal = maxlocal;
nJobs = 0;
diff --git a/usr.bin/make/lst.h b/usr.bin/make/lst.h
index 8f158056cf6..980dabf2144 100644
--- a/usr.bin/make/lst.h
+++ b/usr.bin/make/lst.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lst.h,v 1.7 1999/07/29 19:55:19 deraadt Exp $ */
+/* $OpenBSD: lst.h,v 1.8 1999/12/18 02:11:27 espie Exp $ */
/* $NetBSD: lst.h,v 1.7 1996/11/06 17:59:12 christos Exp $ */
/*
@@ -79,7 +79,7 @@ typedef struct LstNode *LstNode;
* Creation/destruction functions
*/
/* Create a new list */
-Lst Lst_Init __P((Boolean));
+Lst Lst_Init __P((void));
/* Duplicate an existing list */
Lst Lst_Duplicate __P((Lst, ClientData (*)(ClientData)));
/* Destroy an old one */
diff --git a/usr.bin/make/lst.lib/lstAppend.c b/usr.bin/make/lst.lib/lstAppend.c
index 65d9a3ae41e..95f895e8cec 100644
--- a/usr.bin/make/lst.lib/lstAppend.c
+++ b/usr.bin/make/lst.lib/lstAppend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstAppend.c,v 1.4 1998/12/05 00:06:31 espie Exp $ */
+/* $OpenBSD: lstAppend.c,v 1.5 1999/12/18 02:11:27 espie Exp $ */
/* $NetBSD: lstAppend.c,v 1.5 1996/11/06 17:59:31 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstAppend.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstAppend.c,v 1.4 1998/12/05 00:06:31 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstAppend.c,v 1.5 1999/12/18 02:11:27 espie Exp $";
#endif
#endif /* not lint */
@@ -95,11 +95,7 @@ Lst_Append (l, ln, d)
nLNode->useCount = nLNode->flags = 0;
if (lNode == NilListNode) {
- if (list->isCirc) {
- nLNode->nextPtr = nLNode->prevPtr = nLNode;
- } else {
- nLNode->nextPtr = nLNode->prevPtr = NilListNode;
- }
+ nLNode->nextPtr = nLNode->prevPtr = NilListNode;
list->firstPtr = list->lastPtr = nLNode;
} else {
nLNode->prevPtr = lNode;
diff --git a/usr.bin/make/lst.lib/lstConcat.c b/usr.bin/make/lst.lib/lstConcat.c
index a503dddd85e..66803597894 100644
--- a/usr.bin/make/lst.lib/lstConcat.c
+++ b/usr.bin/make/lst.lib/lstConcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstConcat.c,v 1.4 1998/12/05 00:06:31 espie Exp $ */
+/* $OpenBSD: lstConcat.c,v 1.5 1999/12/18 02:11:27 espie Exp $ */
/* $NetBSD: lstConcat.c,v 1.6 1996/11/06 17:59:34 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstConcat.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstConcat.c,v 1.4 1998/12/05 00:06:31 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstConcat.c,v 1.5 1999/12/18 02:11:27 espie Exp $";
#endif
#endif /* not lint */
@@ -114,15 +114,6 @@ Lst_Concat (l1, l2, flags)
}
list1->lastPtr = list2->lastPtr;
}
- if (list1->isCirc && list1->firstPtr != NilListNode) {
- /*
- * If the first list is supposed to be circular and it is (now)
- * non-empty, we must make sure it's circular by linking the
- * first element to the last and vice versa
- */
- list1->firstPtr->prevPtr = list1->lastPtr;
- list1->lastPtr->nextPtr = list1->firstPtr;
- }
free ((Address)l2);
} else if (list2->firstPtr != NilListNode) {
/*
@@ -160,22 +151,9 @@ Lst_Concat (l1, l2, flags)
*/
list1->lastPtr = last;
- /*
- * The circularity of both list one and list two must be corrected
- * for -- list one because of the new nodes added to it; list two
- * because of the alteration of list2->lastPtr's nextPtr to ease the
- * above for loop.
- */
- if (list1->isCirc) {
- list1->lastPtr->nextPtr = list1->firstPtr;
- list1->firstPtr->prevPtr = list1->lastPtr;
- } else {
- last->nextPtr = NilListNode;
- }
+ last->nextPtr = NilListNode;
- if (list2->isCirc) {
- list2->lastPtr->nextPtr = list2->firstPtr;
- }
+ list2->lastPtr->nextPtr = list2->firstPtr;
}
return (SUCCESS);
diff --git a/usr.bin/make/lst.lib/lstDupl.c b/usr.bin/make/lst.lib/lstDupl.c
index fdf9d9bc448..e91abf77383 100644
--- a/usr.bin/make/lst.lib/lstDupl.c
+++ b/usr.bin/make/lst.lib/lstDupl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstDupl.c,v 1.4 1998/12/05 00:06:31 espie Exp $ */
+/* $OpenBSD: lstDupl.c,v 1.5 1999/12/18 02:11:27 espie Exp $ */
/* $NetBSD: lstDupl.c,v 1.6 1996/11/06 17:59:37 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstDupl.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstDupl.c,v 1.4 1998/12/05 00:06:31 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstDupl.c,v 1.5 1999/12/18 02:11:27 espie Exp $";
#endif
#endif /* not lint */
@@ -80,7 +80,7 @@ Lst_Duplicate (l, copyProc)
return (NILLST);
}
- nl = Lst_Init (list->isCirc);
+ nl = Lst_Init();
if (nl == NILLST) {
return (NILLST);
}
@@ -95,11 +95,7 @@ Lst_Duplicate (l, copyProc)
return (NILLST);
}
- if (list->isCirc && ln == list->lastPtr) {
- ln = NilListNode;
- } else {
- ln = ln->nextPtr;
- }
+ ln = ln->nextPtr;
}
return (nl);
diff --git a/usr.bin/make/lst.lib/lstInit.c b/usr.bin/make/lst.lib/lstInit.c
index 9a6f2b235af..0be8d012920 100644
--- a/usr.bin/make/lst.lib/lstInit.c
+++ b/usr.bin/make/lst.lib/lstInit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstInit.c,v 1.4 1998/12/05 00:06:32 espie Exp $ */
+/* $OpenBSD: lstInit.c,v 1.5 1999/12/18 02:11:27 espie Exp $ */
/* $NetBSD: lstInit.c,v 1.5 1996/11/06 17:59:43 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstInit.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstInit.c,v 1.4 1998/12/05 00:06:32 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstInit.c,v 1.5 1999/12/18 02:11:27 espie Exp $";
#endif
#endif /* not lint */
@@ -66,8 +66,7 @@ static char rcsid[] = "$OpenBSD: lstInit.c,v 1.4 1998/12/05 00:06:32 espie Exp $
*-----------------------------------------------------------------------
*/
Lst
-Lst_Init(circ)
- Boolean circ; /* TRUE if the list should be made circular */
+Lst_Init()
{
register List nList;
@@ -76,7 +75,6 @@ Lst_Init(circ)
nList->firstPtr = NilListNode;
nList->lastPtr = NilListNode;
nList->isOpen = FALSE;
- nList->isCirc = circ;
nList->atEnd = Unknown;
return ((Lst)nList);
diff --git a/usr.bin/make/lst.lib/lstInsert.c b/usr.bin/make/lst.lib/lstInsert.c
index 30bd4cac670..5a32422de91 100644
--- a/usr.bin/make/lst.lib/lstInsert.c
+++ b/usr.bin/make/lst.lib/lstInsert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstInsert.c,v 1.4 1998/12/05 00:06:32 espie Exp $ */
+/* $OpenBSD: lstInsert.c,v 1.5 1999/12/18 02:11:27 espie Exp $ */
/* $NetBSD: lstInsert.c,v 1.5 1996/11/06 17:59:44 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstInsert.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstInsert.c,v 1.4 1998/12/05 00:06:32 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstInsert.c,v 1.5 1999/12/18 02:11:27 espie Exp $";
#endif
#endif /* not lint */
@@ -95,11 +95,7 @@ Lst_Insert (l, ln, d)
nLNode->useCount = nLNode->flags = 0;
if (ln == NILLNODE) {
- if (list->isCirc) {
- nLNode->prevPtr = nLNode->nextPtr = nLNode;
- } else {
- nLNode->prevPtr = nLNode->nextPtr = NilListNode;
- }
+ nLNode->prevPtr = nLNode->nextPtr = NilListNode;
list->firstPtr = list->lastPtr = nLNode;
} else {
nLNode->prevPtr = lNode->prevPtr;
diff --git a/usr.bin/make/lst.lib/lstInt.h b/usr.bin/make/lst.lib/lstInt.h
index 1691757518a..d2ce8155e49 100644
--- a/usr.bin/make/lst.lib/lstInt.h
+++ b/usr.bin/make/lst.lib/lstInt.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstInt.h,v 1.6 1998/12/05 00:06:32 espie Exp $ */
+/* $OpenBSD: lstInt.h,v 1.7 1999/12/18 02:11:28 espie Exp $ */
/* $NetBSD: lstInt.h,v 1.7 1996/11/06 17:59:44 christos Exp $ */
/*
@@ -72,8 +72,6 @@ typedef enum {
typedef struct {
ListNode firstPtr; /* first node in list */
ListNode lastPtr; /* last node in list */
- Boolean isCirc; /* true if the list should be considered
- * circular */
/*
* fields for sequential access
*/
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index 2453d71e9a4..532b91b295d 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.23 1999/12/16 17:27:18 espie Exp $ */
+/* $OpenBSD: main.c,v 1.24 1999/12/18 02:11:27 espie Exp $ */
/* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */
/*
@@ -49,7 +49,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.23 1999/12/16 17:27:18 espie Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.24 1999/12/18 02:11:27 espie Exp $";
#endif
#endif /* not lint */
@@ -587,10 +587,10 @@ main(argc, argv)
setenv("PWD", objdir, 1);
- create = Lst_Init(FALSE);
- makefiles = Lst_Init(FALSE);
+ create = Lst_Init();
+ makefiles = Lst_Init();
printVars = FALSE;
- variables = Lst_Init(FALSE);
+ variables = Lst_Init();
beSilent = FALSE; /* Print commands as executed */
ignoreErrors = FALSE; /* Pay attention to non-zero returns */
noExecute = FALSE; /* Execute all commands */
@@ -709,7 +709,7 @@ main(argc, argv)
if (!noBuiltins) {
LstNode ln;
- sysMkPath = Lst_Init (FALSE);
+ sysMkPath = Lst_Init();
Dir_Expand (_PATH_DEFSYSMK, sysIncPath, sysMkPath);
if (Lst_IsEmpty(sysMkPath))
Fatal("make: no system rules (%s).", _PATH_DEFSYSMK);
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index a8991cb2cfb..141d607b5db 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: make.c,v 1.8 1999/12/06 22:28:44 espie Exp $ */
+/* $OpenBSD: make.c,v 1.9 1999/12/18 02:11:27 espie Exp $ */
/* $NetBSD: make.c,v 1.10 1996/11/06 17:59:15 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: make.c,v 1.8 1999/12/06 22:28:44 espie Exp $";
+static char rcsid[] = "$OpenBSD: make.c,v 1.9 1999/12/18 02:11:27 espie Exp $";
#endif
#endif /* not lint */
@@ -822,7 +822,7 @@ Make_Run (targs)
register Lst examine; /* List of targets to examine */
int errors; /* Number of errors the Job module reports */
- toBeMade = Lst_Init (FALSE);
+ toBeMade = Lst_Init();
examine = Lst_Duplicate(targs, NOCOPY);
numNodes = 0;
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 1eb4d4e51fa..d094b4d07de 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.31 1999/12/16 17:27:18 espie Exp $ */
+/* $OpenBSD: parse.c,v 1.32 1999/12/18 02:11:27 espie Exp $ */
/* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: parse.c,v 1.31 1999/12/16 17:27:18 espie Exp $";
+static char rcsid[] = "$OpenBSD: parse.c,v 1.32 1999/12/18 02:11:27 espie Exp $";
#endif
#endif /* not lint */
@@ -808,8 +808,8 @@ ParseDoDependency (line)
waiting = 0;
paths = (Lst)NULL;
- curTargs = Lst_Init(FALSE);
- curSrcs = Lst_Init(FALSE);
+ curTargs = Lst_Init();
+ curSrcs = Lst_Init();
do {
for (cp = line;
@@ -942,7 +942,7 @@ ParseDoDependency (line)
switch (specType) {
case ExPath:
if (paths == NULL) {
- paths = Lst_Init(FALSE);
+ paths = Lst_Init();
}
(void)Lst_AtEnd(paths, (ClientData)dirSearchPath);
break;
@@ -997,7 +997,7 @@ ParseDoDependency (line)
return;
} else {
if (paths == (Lst)NULL) {
- paths = Lst_Init(FALSE);
+ paths = Lst_Init();
}
(void)Lst_AtEnd(paths, (ClientData)path);
}
@@ -1016,7 +1016,7 @@ ParseDoDependency (line)
* use Dir_Destroy in the destruction of the path as the
* Dir module could have added a directory to the path...
*/
- Lst emptyPath = Lst_Init(FALSE);
+ Lst emptyPath = Lst_Init();
Dir_Expand(line, emptyPath, curTargs);
@@ -1266,7 +1266,7 @@ ParseDoDependency (line)
if (*cp == '(') {
GNode *gn;
- sources = Lst_Init (FALSE);
+ sources = Lst_Init();
if (Arch_ParseArchive (&line, sources, VAR_CMD) != SUCCESS) {
Parse_Error (PARSE_FATAL,
"Error in source archive spec \"%s\"", line);
@@ -2596,7 +2596,7 @@ Parse_File(name, stream)
if (targets)
Lst_Destroy(targets, NOFREE);
- targets = Lst_Init (FALSE);
+ targets = Lst_Init();
inLine = TRUE;
ParseDoDependency (line);
@@ -2641,11 +2641,11 @@ void
Parse_Init ()
{
mainNode = NILGNODE;
- parseIncPath = Lst_Init (FALSE);
- sysIncPath = Lst_Init (FALSE);
- includes = Lst_Init (FALSE);
+ parseIncPath = Lst_Init();
+ sysIncPath = Lst_Init();
+ includes = Lst_Init();
#ifdef CLEANUP
- targCmds = Lst_Init (FALSE);
+ targCmds = Lst_Init();
#endif
}
@@ -2682,7 +2682,7 @@ Parse_MainName()
{
Lst listmain; /* result list */
- listmain = Lst_Init (FALSE);
+ listmain = Lst_Init();
if (mainNode == NILGNODE) {
Punt ("no target to make.");
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index 47572593286..b93dd6cf93e 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: suff.c,v 1.16 1999/12/16 17:27:18 espie Exp $ */
+/* $OpenBSD: suff.c,v 1.17 1999/12/18 02:11:27 espie Exp $ */
/* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
#else
-static char rcsid[] = "$OpenBSD: suff.c,v 1.16 1999/12/16 17:27:18 espie Exp $";
+static char rcsid[] = "$OpenBSD: suff.c,v 1.17 1999/12/18 02:11:27 espie Exp $";
#endif
#endif /* not lint */
@@ -492,7 +492,7 @@ Suff_ClearSuffixes ()
#ifdef CLEANUP
Lst_Concat (suffClean, sufflist, LST_CONCLINK);
#endif
- sufflist = Lst_Init(FALSE);
+ sufflist = Lst_Init();
sNum = 0;
suffNull = emptySuff;
}
@@ -641,8 +641,8 @@ Suff_AddTransform (line)
gn = (GNode *) Lst_Datum (ln);
Lst_Destroy (gn->commands, NOFREE);
Lst_Destroy (gn->children, NOFREE);
- gn->commands = Lst_Init (FALSE);
- gn->children = Lst_Init (FALSE);
+ gn->commands = Lst_Init();
+ gn->children = Lst_Init();
}
gn->type = OP_TRANSFORM;
@@ -821,10 +821,10 @@ Suff_AddSuffix (str)
s->name = estrdup (str);
s->nameLen = strlen (s->name);
- s->searchPath = Lst_Init (FALSE);
- s->children = Lst_Init (FALSE);
- s->parents = Lst_Init (FALSE);
- s->ref = Lst_Init (FALSE);
+ s->searchPath = Lst_Init();
+ s->children = Lst_Init();
+ s->parents = Lst_Init();
+ s->ref = Lst_Init();
s->sNum = sNum++;
s->flags = 0;
s->refCount = 0;
@@ -898,8 +898,8 @@ Suff_DoPaths()
return;
}
- inIncludes = Lst_Init(FALSE);
- inLibs = Lst_Init(FALSE);
+ inIncludes = Lst_Init();
+ inLibs = Lst_Init();
while ((ln = Lst_Next (sufflist)) != NILLNODE) {
s = (Suff *) Lst_Datum (ln);
@@ -1036,7 +1036,7 @@ SuffAddSrc (sp, lsp)
targ->children += 1;
(void)Lst_AtEnd (ls->l, (ClientData)s2);
#ifdef DEBUG_SRC
- s2->cp = Lst_Init(FALSE);
+ s2->cp = Lst_Init();
Lst_AtEnd(targ->cp, (ClientData) s2);
printf("1 add %x %x to %x:", targ, s2, ls->l);
Lst_ForEach(ls->l, PrintAddr, (ClientData) 0);
@@ -1054,7 +1054,7 @@ SuffAddSrc (sp, lsp)
targ->children += 1;
(void)Lst_AtEnd (ls->l, (ClientData)s2);
#ifdef DEBUG_SRC
- s2->cp = Lst_Init(FALSE);
+ s2->cp = Lst_Init();
Lst_AtEnd(targ->cp, (ClientData) s2);
printf("2 add %x %x to %x:", targ, s2, ls->l);
Lst_ForEach(ls->l, PrintAddr, (ClientData) 0);
@@ -1298,7 +1298,7 @@ SuffFindCmds (targ, slst)
ret->children = 0;
targ->children += 1;
#ifdef DEBUG_SRC
- ret->cp = Lst_Init(FALSE);
+ ret->cp = Lst_Init();
printf("3 add %x %x\n", targ, ret);
Lst_AtEnd(targ->cp, (ClientData) ret);
#endif
@@ -1362,7 +1362,7 @@ SuffExpandChildren(cgnp, pgnp)
cp = Var_Subst(cgn->name, pgn, TRUE);
if (cp != (char *)NULL) {
- Lst members = Lst_Init(FALSE);
+ Lst members = Lst_Init();
if (cgn->type & OP_ARCHV) {
/*
@@ -1509,7 +1509,7 @@ SuffExpandChildren(cgnp, pgnp)
/*
* Expand the word along the chosen path
*/
- exp = Lst_Init(FALSE);
+ exp = Lst_Init();
Dir_Expand(cgn->name, path, exp);
while (!Lst_IsEmpty(exp)) {
@@ -1842,8 +1842,8 @@ SuffFindNormalDeps(gn, slst)
* Begin at the beginning...
*/
ln = Lst_First(sufflist);
- srcs = Lst_Init(FALSE);
- targs = Lst_Init(FALSE);
+ srcs = Lst_Init();
+ targs = Lst_Init();
/*
* We're caught in a catch-22 here. On the one hand, we want to use any
@@ -1885,7 +1885,7 @@ SuffFindNormalDeps(gn, slst)
targ->parent = (Src *)NULL;
targ->children = 0;
#ifdef DEBUG_SRC
- targ->cp = Lst_Init(FALSE);
+ targ->cp = Lst_Init();
#endif
/*
@@ -1931,7 +1931,7 @@ SuffFindNormalDeps(gn, slst)
targ->children = 0;
targ->pref = estrdup(sopref);
#ifdef DEBUG_SRC
- targ->cp = Lst_Init(FALSE);
+ targ->cp = Lst_Init();
#endif
/*
@@ -2335,12 +2335,12 @@ Suff_SetNull(name)
void
Suff_Init ()
{
- sufflist = Lst_Init (FALSE);
+ sufflist = Lst_Init();
#ifdef CLEANUP
- suffClean = Lst_Init(FALSE);
+ suffClean = Lst_Init();
#endif
- srclist = Lst_Init (FALSE);
- transforms = Lst_Init (FALSE);
+ srclist = Lst_Init();
+ transforms = Lst_Init();
sNum = 0;
/*
@@ -2352,11 +2352,11 @@ Suff_Init ()
suffNull->name = estrdup ("");
suffNull->nameLen = 0;
- suffNull->searchPath = Lst_Init (FALSE);
+ suffNull->searchPath = Lst_Init();
Dir_Concat(suffNull->searchPath, dirSearchPath);
- suffNull->children = Lst_Init (FALSE);
- suffNull->parents = Lst_Init (FALSE);
- suffNull->ref = Lst_Init (FALSE);
+ suffNull->children = Lst_Init();
+ suffNull->parents = Lst_Init();
+ suffNull->ref = Lst_Init();
suffNull->sNum = sNum++;
suffNull->flags = SUFF_NULL;
suffNull->refCount = 1;
diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c
index a8132c05a42..8a82fe04a04 100644
--- a/usr.bin/make/targ.c
+++ b/usr.bin/make/targ.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: targ.c,v 1.10 1999/10/05 22:06:24 espie Exp $ */
+/* $OpenBSD: targ.c,v 1.11 1999/12/18 02:11:27 espie Exp $ */
/* $NetBSD: targ.c,v 1.11 1997/02/20 16:51:50 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94";
#else
-static char *rcsid = "$OpenBSD: targ.c,v 1.10 1999/10/05 22:06:24 espie Exp $";
+static char *rcsid = "$OpenBSD: targ.c,v 1.11 1999/12/18 02:11:27 espie Exp $";
#endif
#endif /* not lint */
@@ -124,7 +124,7 @@ static void TargFreeGN __P((ClientData));
void
Targ_Init ()
{
- allTargets = Lst_Init (FALSE);
+ allTargets = Lst_Init();
Hash_InitTable (&targets, HTSIZE);
}
@@ -184,19 +184,19 @@ Targ_NewGN (name)
gn->childMade = FALSE;
gn->order = 0;
gn->mtime = gn->cmtime = 0;
- gn->iParents = Lst_Init (FALSE);
- gn->cohorts = Lst_Init (FALSE);
- gn->parents = Lst_Init (FALSE);
- gn->children = Lst_Init (FALSE);
- gn->successors = Lst_Init (FALSE);
- gn->preds = Lst_Init (FALSE);
- gn->context = Lst_Init (FALSE);
- gn->commands = Lst_Init (FALSE);
+ gn->iParents = Lst_Init();
+ gn->cohorts = Lst_Init();
+ gn->parents = Lst_Init();
+ gn->children = Lst_Init();
+ gn->successors = Lst_Init();
+ gn->preds = Lst_Init();
+ gn->context = Lst_Init();
+ gn->commands = Lst_Init();
gn->suffix = NULL;
#ifdef CLEANUP
if (allGNs == NULL)
- allGNs = Lst_Init(FALSE);
+ allGNs = Lst_Init();
Lst_AtEnd(allGNs, (ClientData) gn);
#endif
@@ -309,7 +309,7 @@ Targ_FindList (names, flags)
register GNode *gn; /* node in tLn */
char *name;
- nodes = Lst_Init (FALSE);
+ nodes = Lst_Init();
if (Lst_Open (names) == FAILURE) {
return (nodes);
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index db25dde3544..e2b38c6ebb0 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: var.c,v 1.24 1999/12/16 17:27:18 espie Exp $ */
+/* $OpenBSD: var.c,v 1.25 1999/12/18 02:11:27 espie Exp $ */
/* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */
/*
@@ -70,7 +70,7 @@
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: var.c,v 1.24 1999/12/16 17:27:18 espie Exp $";
+static char rcsid[] = "$OpenBSD: var.c,v 1.25 1999/12/18 02:11:27 espie Exp $";
#endif
#endif /* not lint */
@@ -2321,7 +2321,7 @@ Var_Init ()
VAR_GLOBAL = Targ_NewGN("Global");
VAR_CMD = Targ_NewGN("Command");
VAR_ENV = Targ_NewGN("Environment");
- allVars = Lst_Init(FALSE);
+ allVars = Lst_Init();
}