DragonFly BSD
DragonFly submit List (threaded) for 2004-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

fancy forms of NULL in usr.bin/make


From: Max Okumoto <okumoto@home>
Date: Thu, 11 Nov 2004 16:26:42 -0800

This patch removes fancy forms of NULL.  It is based off of the patch
made on 2000/12/02 in the FreeBSD tree. If it is too large I can break
it up, into smaller parts.

Max
---------------------
PatchSet 168
Date: 2000/12/02 18:57:58
Author: will
Log:
There's no reason to use fancy forms of NULL.  Replace all instances
of NIL, NILLST, NILLGNODE, etc. with NULL.

Obtained from:		OpenBSD

Members: 
	arch.c:1.17->1.18 
	compat.c:1.19->1.20 
	cond.c:1.13->1.14 
	dir.c:1.11->1.12 
	hash.c:1.10->1.11 
	job.c:1.23->1.24 
	job.h:1.11->1.12 
	list.h:1.8->1.9 
	lst.h:1.9->1.10 
	main.c:1.43->1.44 
	make.c:1.12->1.13 
	make.h:1.13->1.14 
	parse.c:1.23->1.24 
	sprite.h:1.9->1.10 
	suff.c:1.13->1.14 
	targ.c:1.11->1.12 
	var.c:1.19->1.20 
	lst.lib/lstAppend.c:1.7->1.8 
	lst.lib/lstConcat.c:1.8->1.9 
	lst.lib/lstDatum.c:1.6->1.7 
	lst.lib/lstDeQueue.c:1.7->1.8 
	lst.lib/lstDestroy.c:1.8->1.9 
	lst.lib/lstDupl.c:1.8->1.9 
	lst.lib/lstFind.c:1.7->1.8 
	lst.lib/lstFindFrom.c:1.8->1.9 
	lst.lib/lstFirst.c:1.6->1.7 
	lst.lib/lstForEachFrom.c:1.8->1.9 
	lst.lib/lstInit.c:1.7->1.8 
	lst.lib/lstInsert.c:1.7->1.8 
	lst.lib/lstInt.h:1.7->1.8 
	lst.lib/lstIsEmpty.c:1.6->1.7 
	lst.lib/lstLast.c:1.6->1.7 
	lst.lib/lstMember.c:1.7->1.8 
	lst.lib/lstNext.c:1.7->1.8 
	lst.lib/lstOpen.c:1.6->1.7 
	lst.lib/lstRemove.c:1.7->1.8 
	lst.lib/lstReplace.c:1.6->1.7 
	lst.lib/lstSucc.c:1.6->1.7 

Index: arch.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/arch.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- arch.c	30 Nov 2000 13:56:19 -0000	1.17
+++ arch.c	2 Dec 2000 18:57:58 -0000	1.18
@@ -322,7 +322,7 @@
 		 */
 		gn = Targ_FindNode(buf, TARG_CREATE);
 
-		if (gn == NILGNODE) {
+		if (gn == NULL) {
 		    free(buf);
 		    return(FAILURE);
 		} else {
@@ -358,7 +358,7 @@
 		snprintf(nameBuf, sz, "%s(%s)", libName, member);
 		free(member);
 		gn = Targ_FindNode (nameBuf, TARG_CREATE);
-		if (gn == NILGNODE) {
+		if (gn == NULL) {
 		    free(nameBuf);
 		    return (FAILURE);
 		} else {
@@ -381,7 +381,7 @@
 	    snprintf(nameBuf, sz, "%s(%s)", libName, memName);
 	    gn = Targ_FindNode (nameBuf, TARG_CREATE);
 	    free(nameBuf);
-	    if (gn == NILGNODE) {
+	    if (gn == NULL) {
 		return (FAILURE);
 	    } else {
 		/*
@@ -492,7 +492,7 @@
 	member = cp + 1;
 
     ln = Lst_Find (archives, (ClientData) archive, ArchFindArchive);
-    if (ln != NILLNODE) {
+    if (ln != NULL) {
 	ar = (Arch *) Lst_Datum (ln);
 
 	he = Hash_FindEntry (&ar->members, member);
@@ -1051,7 +1051,7 @@
 	gn->mtime = 0;
 	return (0);
     }
-    while ((ln = Lst_Next (gn->parents)) != NILLNODE) {
+    while ((ln = Lst_Next (gn->parents)) != NULL) {
 	pgn = (GNode *) Lst_Datum (ln);
 
 	if (pgn->type & OP_ARCHV) {
Index: compat.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/compat.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- compat.c	9 Jul 2000 02:54:53 -0000	1.19
+++ compat.c	2 Dec 2000 18:57:58 -0000	1.20
@@ -77,7 +77,7 @@
 
 static char 	    meta[256];
 
-static GNode	    *curTarg = NILGNODE;
+static GNode	    *curTarg = NULL;
 static GNode	    *ENDNode;
 static void CompatInterrupt __P((int));
 static int CompatRunCommand __P((ClientData, ClientData));
@@ -108,7 +108,7 @@
 {
     GNode   *gn;
 
-    if ((curTarg != NILGNODE) && !Targ_Precious (curTarg)) {
+    if ((curTarg != NULL) && !Targ_Precious (curTarg)) {
 	char	  *p1;
 	char 	  *file = Var_Value (TARGET, curTarg, &p1);
 
@@ -122,7 +122,7 @@
 	 */
 	if (signo == SIGINT) {
 	    gn = Targ_FindNode(".INTERRUPT", TARG_NOCREATE);
-	    if (gn != NILGNODE) {
+	    if (gn != NULL) {
 		Lst_ForEach(gn->commands, CompatRunCommand, (ClientData)gn);
 	    }
 	}
@@ -444,7 +444,7 @@
 	    return (0);
 	}
 
-	if (Lst_Member (gn->iParents, pgn) != NILLNODE) {
+	if (Lst_Member (gn->iParents, pgn) != NULL) {
 	    char *p1;
 	    Var_Set (IMPSRC, Var_Value(TARGET, gn, &p1), pgn);
 	    efree(p1);
@@ -503,7 +503,7 @@
 	    if (!touchFlag) {
 		curTarg = gn;
 		Lst_ForEach (gn->commands, CompatRunCommand, (ClientData)gn);
-		curTarg = NILGNODE;
+		curTarg = NULL;
 	    } else {
 		Job_Touch (gn, gn->type & OP_SILENT);
 	    }
@@ -597,7 +597,7 @@
 	 */
 	pgn->make = FALSE;
     } else {
-	if (Lst_Member (gn->iParents, pgn) != NILLNODE) {
+	if (Lst_Member (gn->iParents, pgn) != NULL) {
 	    char *p1;
 	    Var_Set (IMPSRC, Var_Value(TARGET, gn, &p1), pgn);
 	    efree(p1);
@@ -676,7 +676,7 @@
      */
     if (!queryFlag) {
 	gn = Targ_FindNode(".BEGIN", TARG_NOCREATE);
-	if (gn != NILGNODE) {
+	if (gn != NULL) {
 	    Lst_ForEach(gn->commands, CompatRunCommand, (ClientData)gn);
             if (gn->made == ERROR) {
                 printf("\n\nStop.\n");
Index: cond.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/cond.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- cond.c	9 Jul 2000 02:54:53 -0000	1.13
+++ cond.c	2 Dec 2000 18:57:58 -0000	1.14
@@ -340,7 +340,7 @@
     Boolean result;
 
     arg[argLen] = '\0';
-    if (Lst_Find (create, (ClientData)arg, CondStrMatch) == NILLNODE) {
+    if (Lst_Find (create, (ClientData)arg, CondStrMatch) == NULL) {
 	result = FALSE;
     } else {
 	result = TRUE;
@@ -407,7 +407,7 @@
 
     arg[argLen] = '\0';
     gn = Targ_FindNode(arg, TARG_NOCREATE);
-    if ((gn != NILGNODE) && !OP_NOP(gn->type)) {
+    if ((gn != NULL) && !OP_NOP(gn->type)) {
 	result = TRUE;
     } else {
 	result = FALSE;
Index: dir.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/dir.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- dir.c	9 Jul 2000 02:54:53 -0000	1.11
+++ dir.c	2 Dec 2000 18:57:58 -0000	1.12
@@ -496,7 +496,7 @@
     Path	  *p;	    	/* Directory in the node */
 
     if (Lst_Open(path) == SUCCESS) {
-	while ((ln = Lst_Next(path)) != NILLNODE) {
+	while ((ln = Lst_Next(path)) != NULL) {
 	    p = (Path *)Lst_Datum(ln);
 	    DirMatchFiles(word, p, expansions);
 	}
@@ -722,7 +722,7 @@
      * and return the resulting string. If we don't find any such thing,
      * we go on to phase two...
      */
-    while ((ln = Lst_Next (path)) != NILLNODE) {
+    while ((ln = Lst_Next (path)) != NULL) {
 	p = (Path *) Lst_Datum (ln);
 	if (DEBUG(DIR)) {
 	    printf("%s...", p->name);
@@ -806,7 +806,7 @@
 	    printf("failed. Trying subdirectories...");
 	}
 	(void) Lst_Open (path);
-	while ((ln = Lst_Next (path)) != NILLNODE) {
+	while ((ln = Lst_Next (path)) != NULL) {
 	    p = (Path *) Lst_Datum (ln);
 	    if (p != dot) {
 		file = str_concat (p->name, name, STR_ADDSLASH);
@@ -903,7 +903,7 @@
 
     bigmisses += 1;
     ln = Lst_Last (path);
-    if (ln == NILLNODE) {
+    if (ln == NULL) {
 	return ((char *) NULL);
     } else {
 	p = (Path *) Lst_Datum (ln);
@@ -1036,9 +1036,9 @@
     register struct dirent *dp; /* entry in directory */
 
     ln = Lst_Find (openDirectories, (ClientData)name, DirFindName);
-    if (ln != NILLNODE) {
+    if (ln != NULL) {
 	p = (Path *)Lst_Datum (ln);
-	if (Lst_Member(path, (ClientData)p) == NILLNODE) {
+	if (Lst_Member(path, (ClientData)p) == NULL) {
 	    p->refCount += 1;
 	    (void)Lst_AtEnd (path, (ClientData)p);
 	}
@@ -1137,7 +1137,7 @@
     str = estrdup ("");
 
     if (Lst_Open (path) == SUCCESS) {
-	while ((ln = Lst_Next (path)) != NILLNODE) {
+	while ((ln = Lst_Next (path)) != NULL) {
 	    p = (Path *) Lst_Datum (ln);
 	    tstr = str_concat (flag, p->name, 0);
 	    str = str_concat (str, tstr, STR_ADDSPACE | STR_DOFREE);
@@ -1230,9 +1230,9 @@
     LstNode ln;
     Path    *p;
 
-    for (ln = Lst_First(path2); ln != NILLNODE; ln = Lst_Succ(ln)) {
+    for (ln = Lst_First(path2); ln != NULL; ln = Lst_Succ(ln)) {
 	p = (Path *)Lst_Datum(ln);
-	if (Lst_Member(path1, (ClientData)p) == NILLNODE) {
+	if (Lst_Member(path1, (ClientData)p) == NULL) {
 	    p->refCount += 1;
 	    (void)Lst_AtEnd(path1, (ClientData)p);
 	}
@@ -1253,7 +1253,7 @@
 	       hits * 100 / (hits + bigmisses + nearmisses) : 0));
     printf ("# %-20s referenced\thits\n", "directory");
     if (Lst_Open (openDirectories) == SUCCESS) {
-	while ((ln = Lst_Next (openDirectories)) != NILLNODE) {
+	while ((ln = Lst_Next (openDirectories)) != NULL) {
 	    p = (Path *) Lst_Datum (ln);
 	    printf ("# %-20s %10d\t%4d\n", p->name, p->refCount, p->hits);
 	}
Index: hash.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/hash.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- hash.c	9 Jul 2000 02:54:53 -0000	1.10
+++ hash.c	2 Dec 2000 18:57:58 -0000	1.11
@@ -356,7 +356,7 @@
 
 	/*
 	 * The hashEntryPtr field points to the most recently returned
-	 * entry, or is nil if we are starting up.  If not nil, we have
+	 * entry, or is NULL if we are starting up.  If not NULL, we have
 	 * to start at the next one in the chain.
 	 */
 	e = searchPtr->hashEntryPtr;
Index: job.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/job.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- job.c	19 Nov 2000 12:04:12 -0000	1.23
+++ job.c	2 Dec 2000 18:57:58 -0000	1.24
@@ -969,7 +969,7 @@
 	 * the parents. In addition, any saved commands for the node are placed
 	 * on the .END target.
 	 */
-	if (job->tailCmds != NILLNODE) {
+	if (job->tailCmds != NULL) {
 	    Lst_ForEachFrom(job->node->commands, job->tailCmds,
 			     JobSaveCommand,
 			    (ClientData)job->node);
@@ -1101,7 +1101,7 @@
 	 * No commands. Look for .DEFAULT rule from which we might infer
 	 * commands
 	 */
-	if ((DEFAULT != NILGNODE) && !Lst_IsEmpty(DEFAULT->commands)) {
+	if ((DEFAULT != NULL) && !Lst_IsEmpty(DEFAULT->commands)) {
 	    char *p1;
 	    /*
 	     * Make only looks for a .DEFAULT if the node was never the
@@ -1687,7 +1687,7 @@
     }
 
     job->node = gn;
-    job->tailCmds = NILLNODE;
+    job->tailCmds = NULL;
 
     /*
      * Set the initial value of the flags for this job based on the global
@@ -1762,7 +1762,7 @@
 	    } else {
 		LstNode	ln = Lst_Next(gn->commands);
 
-		if ((ln == NILLNODE) ||
+		if ((ln == NULL) ||
 		    JobPrintCommand((ClientData) Lst_Datum(ln),
 				    (ClientData) job))
 		{
@@ -1853,7 +1853,7 @@
 	 */
 	if (cmdsOK) {
 	    if (aborting == 0) {
-		if (job->tailCmds != NILLNODE) {
+		if (job->tailCmds != NULL) {
 		    Lst_ForEachFrom(job->node->commands, job->tailCmds,
 				    JobSaveCommand,
 				   (ClientData)job->node);
@@ -2254,10 +2254,10 @@
 
 	jnode = Lst_Find(jobs, (ClientData)&pid, JobCmpPid);
 
-	if (jnode == NILLNODE) {
+	if (jnode == NULL) {
 	    if (WIFSIGNALED(status) && (WTERMSIG(status) == SIGCONT)) {
 		jnode = Lst_Find(stoppedJobs, (ClientData) &pid, JobCmpPid);
-		if (jnode == NILLNODE) {
+		if (jnode == NULL) {
 		    Error("Resumed child (%d) not in table", pid);
 		    continue;
 		}
@@ -2358,7 +2358,7 @@
 	    if (Lst_Open(jobs) == FAILURE) {
 		Punt("Cannot open job table");
 	    }
-	    while (nfds && (ln = Lst_Next(jobs)) != NILLNODE) {
+	    while (nfds && (ln = Lst_Next(jobs)) != NULL) {
 		job = (Job *) Lst_Datum(ln);
 		if (FD_ISSET(job->inPipe, &readfds)) {
 		    JobDoOutput(job, FALSE);
@@ -2424,7 +2424,7 @@
     aborting = 	  0;
     errors = 	  0;
 
-    lastNode =	  NILGNODE;
+    lastNode =	  NULL;
 
     if (maxJobs == 1 || beVerbose == 0
 #ifdef REMOTE
@@ -2498,7 +2498,7 @@
 
     begin = Targ_FindNode(".BEGIN", TARG_NOCREATE);
 
-    if (begin != NILGNODE) {
+    if (begin != NULL) {
 	JobStart(begin, JOB_SPECIAL, (Job *)0);
 	while (nJobs) {
 	    Job_CatchOutput();
@@ -2793,7 +2793,7 @@
     aborting = ABORT_INTERRUPT;
 
    (void) Lst_Open(jobs);
-    while ((ln = Lst_Next(jobs)) != NILLNODE) {
+    while ((ln = Lst_Next(jobs)) != NULL) {
 	job = (Job *) Lst_Datum(ln);
 
 	if (!Targ_Precious(job->node)) {
@@ -2838,7 +2838,7 @@
 
 #ifdef REMOTE
    (void)Lst_Open(stoppedJobs);
-    while ((ln = Lst_Next(stoppedJobs)) != NILLNODE) {
+    while ((ln = Lst_Next(stoppedJobs)) != NULL) {
 	job = (Job *) Lst_Datum(ln);
 
 	if (job->flags & JOB_RESTART) {
@@ -2899,7 +2899,7 @@
 
     if (runINTERRUPT && !touchFlag) {
 	interrupt = Targ_FindNode(".INTERRUPT", TARG_NOCREATE);
-	if (interrupt != NILGNODE) {
+	if (interrupt != NULL) {
 	    ignoreErrors = FALSE;
 
 	    JobStart(interrupt, JOB_IGNDOTS, (Job *)0);
@@ -2926,7 +2926,7 @@
 int
 Job_End()
 {
-    if (postCommands != NILGNODE && !Lst_IsEmpty(postCommands->commands)) {
+    if (postCommands != NULL && !Lst_IsEmpty(postCommands->commands)) {
 	if (errors) {
 	    Error("Errors reported so .END ignored");
 	} else {
@@ -2996,7 +2996,7 @@
     if (nJobs) {
 
 	(void) Lst_Open(jobs);
-	while ((ln = Lst_Next(jobs)) != NILLNODE) {
+	while ((ln = Lst_Next(jobs)) != NULL) {
 	    job = (Job *) Lst_Datum(ln);
 
 	    /*
@@ -3053,9 +3053,9 @@
     }
     jnode = Lst_Find(jobs, (ClientData)hostID, JobCmpRmtID);
 
-    if (jnode == NILLNODE) {
+    if (jnode == NULL) {
 	jnode = Lst_Find(stoppedJobs, (ClientData)hostID, JobCmpRmtID);
-		if (jnode == NILLNODE) {
+		if (jnode == NULL) {
 		    if (DEBUG(JOB)) {
 			Error("Evicting host(%d) not in table", hostID);
 		    }
Index: job.h
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/job.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- job.h	17 Jan 2000 06:43:41 -0000	1.11
+++ job.h	2 Dec 2000 18:57:59 -0000	1.12
@@ -65,7 +65,7 @@
  *	1) The process id of the child shell
  *	2) The graph node describing the target being made by this job
  *	3) A LstNode for the first command to be saved after the job
- *	   completes. This is NILLNODE if there was no "..." in the job's
+ *	   completes. This is NULL if there was no "..." in the job's
  *	   commands.
  *	4) An FILE* for writing out the commands. This is only
  *	   used before the job is actually started.
Index: list.h
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/list.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- list.h	28 Aug 1999 01:03:32 -0000	1.8
+++ list.h	2 Dec 2000 18:57:59 -0000	1.9
@@ -128,8 +128,8 @@
  * ----------------------------------------------------------------------------
  */
 #define List_InitElement(elementPtr) \
-    (elementPtr)->prevPtr = (List_Links *) NIL; \
-    (elementPtr)->nextPtr = (List_Links *) NIL;
+    (elementPtr)->prevPtr = (List_Links *) NULL; \
+    (elementPtr)->nextPtr = (List_Links *) NULL;
 
 /*
  * Macros for stepping through or selecting parts of lists
Index: lst.h
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- lst.h	28 Aug 1999 01:03:32 -0000	1.9
+++ lst.h	2 Dec 2000 18:57:59 -0000	1.10
@@ -58,9 +58,6 @@
 
 typedef	struct	Lst	*Lst;
 typedef	struct	LstNode	*LstNode;
-
-#define	NILLST		((Lst) NIL)
-#define	NILLNODE	((LstNode) NIL)
 
 /*
  * NOFREE can be used as the freeProc to Lst_Destroy when the elements are
Index: main.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/main.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- main.c	30 Nov 2000 13:56:19 -0000	1.43
+++ main.c	2 Dec 2000 18:57:59 -0000	1.44
@@ -701,7 +701,7 @@
 	Targ_Init();
 	Suff_Init();
 
-	DEFAULT = NILGNODE;
+	DEFAULT = NULL;
 	(void)time(&now);
 
 	/*
@@ -712,7 +712,7 @@
 	if (!Lst_IsEmpty(create)) {
 		LstNode ln;
 
-		for (ln = Lst_First(create); ln != NILLNODE;
+		for (ln = Lst_First(create); ln != NULL;
 		    ln = Lst_Succ(ln)) {
 			char *name = (char *)Lst_Datum(ln);
 
@@ -753,7 +753,7 @@
 		if (Lst_IsEmpty(sysMkPath))
 			Fatal("make: no system rules (%s).", _PATH_DEFSYSMK);
 		ln = Lst_Find(sysMkPath, (ClientData)NULL, ReadMakefile);
-		if (ln != NILLNODE)
+		if (ln != NULL)
 			Fatal("make: cannot open %s.", (char *)Lst_Datum(ln));
 	}
 
@@ -761,7 +761,7 @@
 		LstNode ln;
 
 		ln = Lst_Find(makefiles, (ClientData)NULL, ReadMakefile);
-		if (ln != NILLNODE)
+		if (ln != NULL)
 			Fatal("make: cannot open %s.", (char *)Lst_Datum(ln));
 	} else if (!ReadMakefile("makefile", NULL))
 		(void)ReadMakefile("Makefile", NULL);
@@ -826,7 +826,7 @@
 	if (printVars) {
 		LstNode ln;
 
-		for (ln = Lst_First(variables); ln != NILLNODE;
+		for (ln = Lst_First(variables); ln != NULL;
 		    ln = Lst_Succ(ln)) {
 			char *value;
 			if (expandVars) {
Index: make.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/make.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- make.c	9 Jul 2000 02:54:54 -0000	1.12
+++ make.c	2 Dec 2000 18:57:59 -0000	1.13
@@ -340,10 +340,10 @@
 	}
 
 	if (Lst_Open (cgn->children) == SUCCESS) {
-	    while ((ln = Lst_Next (cgn->children)) != NILLNODE) {
+	    while ((ln = Lst_Next (cgn->children)) != NULL) {
 		gn = (GNode *)Lst_Datum (ln);
 
-		if (Lst_Member (pgn->children, gn) == NILLNODE) {
+		if (Lst_Member (pgn->children, gn) == NULL) {
 		    (void) Lst_AtEnd (pgn->children, gn);
 		    (void) Lst_AtEnd (gn->parents, pgn);
 		    pgn->unmade += 1;
@@ -480,7 +480,7 @@
     }
 
     if (Lst_Open (cgn->parents) == SUCCESS) {
-	while ((ln = Lst_Next (cgn->parents)) != NILLNODE) {
+	while ((ln = Lst_Next (cgn->parents)) != NULL) {
 	    pgn = (GNode *)Lst_Datum (ln);
 	    if (pgn->make) {
 		pgn->unmade -= 1;
@@ -514,11 +514,11 @@
      * it means we need to place it in the queue as it restrained itself
      * before.
      */
-    for (ln = Lst_First(cgn->successors); ln != NILLNODE; ln = Lst_Succ(ln)) {
+    for (ln = Lst_First(cgn->successors); ln != NULL; ln = Lst_Succ(ln)) {
 	GNode	*succ = (GNode *)Lst_Datum(ln);
 
 	if (succ->make && succ->unmade == 0 && succ->made == UNMADE &&
-	    Lst_Member(toBeMade, (ClientData)succ) == NILLNODE)
+	    Lst_Member(toBeMade, (ClientData)succ) == NULL)
 	{
 	    (void)Lst_EnQueue(toBeMade, (ClientData)succ);
 	}
@@ -532,7 +532,7 @@
 	char    *p1;
 	char	*cpref = Var_Value(PREFIX, cgn, &p1);
 
-	while ((ln = Lst_Next (cgn->iParents)) != NILLNODE) {
+	while ((ln = Lst_Next (cgn->iParents)) != NULL) {
 	    pgn = (GNode *)Lst_Datum (ln);
 	    if (pgn->make) {
 		Var_Set (IMPSRC, cname, pgn);
@@ -690,7 +690,7 @@
 	if (!Lst_IsEmpty(gn->preds)) {
 	    LstNode ln;
 
-	    for (ln = Lst_First(gn->preds); ln != NILLNODE; ln = Lst_Succ(ln)){
+	    for (ln = Lst_First(gn->preds); ln != NULL; ln = Lst_Succ(ln)){
 		GNode	*pgn = (GNode *)Lst_Datum(ln);
 
 		if (pgn->make && pgn->made == UNMADE) {
@@ -701,12 +701,12 @@
 		}
 	    }
 	    /*
-	     * If ln isn't nil, there's a predecessor as yet unmade, so we
+	     * If ln isn't NULL, there's a predecessor as yet unmade, so we
 	     * just drop this node on the floor. When the node in question
 	     * has been made, it will notice this node as being ready to
 	     * make but as yet unmade and will place the node on the queue.
 	     */
-	    if (ln != NILLNODE) {
+	    if (ln != NULL) {
 		continue;
 	    }
 	}
Index: make.h
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/make.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- make.h	14 May 2000 22:24:28 -0000	1.13
+++ make.h	2 Dec 2000 18:57:59 -0000	1.14
@@ -164,11 +164,6 @@
 } GNode;
 
 /*
- * Manifest constants
- */
-#define NILGNODE	((GNode *) NIL)
-
-/*
  * The OP_ constants are used when parsing a dependency line as a way of
  * communicating to other parts of the program the way in which a target
  * should be made. These constants are bitwise-OR'ed together and
@@ -230,7 +225,7 @@
  * do if the desired node(s) is (are) not found. If the TARG_CREATE constant
  * is given, a new, empty node will be created for the target, placed in the
  * table of all targets and its address returned. If TARG_NOCREATE is given,
- * a NIL pointer will be returned.
+ * a NULL pointer will be returned.
  */
 #define TARG_CREATE	0x01	  /* create node if not found */
 #define TARG_NOCREATE	0x00	  /* don't create it */
Index: parse.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/parse.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- parse.c	9 Jul 2000 02:54:54 -0000	1.23
+++ parse.c	2 Dec 2000 18:57:59 -0000	1.24
@@ -183,7 +183,7 @@
 static int waiting;
 
 /*
- * Predecessor node for handling .ORDER. Initialized to NILGNODE when .ORDER
+ * Predecessor node for handling .ORDER. Initialized to NULL when .ORDER
  * seen, then set to each successive source on the line.
  */
 static GNode	*predecessor;
@@ -365,7 +365,7 @@
 {
     GNode          *pgn = (GNode *) pgnp;
     GNode          *cgn = (GNode *) cgnp;
-    if (Lst_Member (pgn->children, (ClientData)cgn) == NILLNODE) {
+    if (Lst_Member (pgn->children, (ClientData)cgn) == NULL) {
 	(void)Lst_AtEnd (pgn->children, (ClientData)cgn);
 	if (specType == Not) {
 	    (void)Lst_AtEnd (cgn->parents, (ClientData)pgn);
@@ -556,7 +556,7 @@
 	 * source and the current one.
 	 */
 	gn = Targ_FindNode(src, TARG_CREATE);
-	if (predecessor != NILGNODE) {
+	if (predecessor != NULL) {
 	    (void)Lst_AtEnd(predecessor->successors, (ClientData)gn);
 	    (void)Lst_AtEnd(gn->preds, (ClientData)predecessor);
 	}
@@ -588,7 +588,7 @@
 	    register GNode  	*cohort;
 	    register LstNode	ln;
 
-	    for (ln=Lst_First(gn->cohorts); ln != NILLNODE; ln = Lst_Succ(ln)){
+	    for (ln=Lst_First(gn->cohorts); ln != NULL; ln = Lst_Succ(ln)){
 		cohort = (GNode *)Lst_Datum(ln);
 		if (tOp) {
 		    cohort->type |= tOp;
@@ -843,7 +843,7 @@
 		 *			main target.
 		 *  	.NOTPARALLEL	Make only one target at a time.
 		 *  	.SINGLESHELL	Create a shell for each command.
-		 *  	.ORDER	    	Must set initial predecessor to NIL
+		 *  	.ORDER	    	Must set initial predecessor to NULL
 		 */
 		switch (specType) {
 		    case ExPath:
@@ -881,7 +881,7 @@
 			compatMake = 1;
 			break;
 		    case Order:
-			predecessor = NILGNODE;
+			predecessor = NULL;
 			break;
 		    default:
 			break;
@@ -896,7 +896,7 @@
 
 		specType = ExPath;
 		path = Suff_GetPath (&line[5]);
-		if (path == NILLST) {
+		if (path == NULL) {
 		    Parse_Error (PARSE_FATAL,
 				 "Suffix '%s' not defined (yet)",
 				 &line[5]);
@@ -1204,7 +1204,7 @@
 	}
     }
 
-    if (mainNode == NILGNODE) {
+    if (mainNode == NULL) {
 	/*
 	 * If we have yet to decide on a main target to make, in the
 	 * absence of any user input, we want the first target on
@@ -2578,7 +2578,7 @@
 void
 Parse_Init ()
 {
-    mainNode = NILGNODE;
+    mainNode = NULL;
     parseIncPath = Lst_Init (FALSE);
     sysIncPath = Lst_Init (FALSE);
     includes = Lst_Init (FALSE);
@@ -2618,7 +2618,7 @@
 
     listmain = Lst_Init (FALSE);
 
-    if (mainNode == NILGNODE) {
+    if (mainNode == NULL) {
 	Punt ("no target to make.");
     	/*NOTREACHED*/
     } else if (mainNode->type & OP_DOUBLEDEP) {
Index: sprite.h
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/sprite.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- sprite.h	28 Aug 1999 01:03:36 -0000	1.9
+++ sprite.h	2 Dec 2000 18:57:59 -0000	1.10
@@ -87,8 +87,6 @@
  * by user processes.
  */
 
-#define NIL 		~0
-#define USER_NIL 	0
 #ifndef NULL
 #define NULL	 	0
 #endif /* NULL */
Index: suff.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/suff.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- suff.c	9 Jul 2000 02:54:54 -0000	1.13
+++ suff.c	2 Dec 2000 18:57:59 -0000	1.14
@@ -90,7 +90,7 @@
  *
  *	Suff_FindDeps	    	Find implicit sources for and the location of
  *	    	  	    	a target based on its suffix. Returns the
- *	    	  	    	bottom-most node added to the graph or NILGNODE
+ *	    	  	    	bottom-most node added to the graph or NULL
  *	    	  	    	if the target had no implicit sources.
  */
 
@@ -378,7 +378,7 @@
     Suff *s;
 {
     LstNode ln = Lst_Member(l, (ClientData)s);
-    if (ln != NILLNODE) {
+    if (ln != NULL) {
 	Lst_Remove(l, ln);
 	s->refCount--;
     }
@@ -408,7 +408,7 @@
     if (Lst_Open (l) == FAILURE) {
 	return;
     }
-    while ((ln = Lst_Next (l)) != NILLNODE) {
+    while ((ln = Lst_Next (l)) != NULL) {
 	s2 = (Suff *) Lst_Datum (ln);
 	if (s2->sNum >= s->sNum) {
 	    break;
@@ -419,7 +419,7 @@
     if (DEBUG(SUFF)) {
 	printf("inserting %s(%d)...", s->name, s->sNum);
     }
-    if (ln == NILLNODE) {
+    if (ln == NULL) {
 	if (DEBUG(SUFF)) {
 	    printf("at end of list\n");
 	}
@@ -492,8 +492,8 @@
     Suff    	    	*single = NULL;/* Source of possible transformation to
 				     * null suffix */
 
-    srcLn = NILLNODE;
-    singleLn = NILLNODE;
+    srcLn = NULL;
+    singleLn = NULL;
 
     /*
      * Loop looking first for a suffix that matches the start of the
@@ -502,17 +502,17 @@
      * parsed the string.
      */
     for (;;) {
-	if (srcLn == NILLNODE) {
+	if (srcLn == NULL) {
 	    srcLn = Lst_Find(sufflist, (ClientData)str, SuffSuffIsPrefix);
 	} else {
 	    srcLn = Lst_FindFrom (sufflist, Lst_Succ(srcLn), (ClientData)str,
 				  SuffSuffIsPrefix);
 	}
-	if (srcLn == NILLNODE) {
+	if (srcLn == NULL) {
 	    /*
 	     * Ran out of source suffixes -- no such rule
 	     */
-	    if (singleLn != NILLNODE) {
+	    if (singleLn != NULL) {
 		/*
 		 * Not so fast Mr. Smith! There was a suffix that encompassed
 		 * the entire string, so we assume it was a transformation
@@ -535,7 +535,7 @@
 	    singleLn = srcLn;
 	} else {
 	    targLn = Lst_Find(sufflist, (ClientData)str2, SuffSuffHasNameP);
-	    if (targLn != NILLNODE) {
+	    if (targLn != NULL) {
 		*srcPtr = src;
 		*targPtr = (Suff *)Lst_Datum(targLn);
 		return (TRUE);
@@ -591,7 +591,7 @@
     LstNode 	  ln;	    	/* Node for existing transformation */
 
     ln = Lst_Find (transforms, (ClientData)line, SuffGNHasNameP);
-    if (ln == NILLNODE) {
+    if (ln == NULL) {
 	/*
 	 * Make a new graph node for the transformation. It will be filled in
 	 * by the Parse module.
@@ -667,7 +667,7 @@
 
 	/*
 	 * Remove the source from the target's children list. We check for a
-	 * nil return to handle a beanhead saying something like
+	 * NULL return to handle a beanhead saying something like
 	 *  .c.o .c.o:
 	 *
 	 * We'll be called twice when the next target is seen, but .c and .o
@@ -748,7 +748,7 @@
 	 * Replace the start of the target suffix
 	 */
 	cp[1] = s->name[0];
-	if (ln != NILLNODE) {
+	if (ln != NULL) {
 	    /*
 	     * Found it -- establish the proper relationship
 	     */
@@ -782,7 +782,7 @@
     LstNode 	  ln;
 
     ln = Lst_Find (sufflist, (ClientData)str, SuffSuffHasNameP);
-    if (ln == NILLNODE) {
+    if (ln == NULL) {
 	s = (Suff *) emalloc (sizeof (Suff));
 
 	s->name =   	estrdup (str);
@@ -810,7 +810,7 @@
  *	Return the search path for the given suffix, if it's defined.
  *
  * Results:
- *	The searchPath for the desired suffix or NILLST if the suffix isn't
+ *	The searchPath for the desired suffix or NULL if the suffix isn't
  *	defined.
  *
  * Side Effects:
@@ -825,8 +825,8 @@
     Suff    	  *s;
 
     ln = Lst_Find (sufflist, (ClientData)sname, SuffSuffHasNameP);
-    if (ln == NILLNODE) {
-	return (NILLST);
+    if (ln == NULL) {
+	return (NULL);
     } else {
 	s = (Suff *) Lst_Datum (ln);
 	return (s->searchPath);
@@ -867,7 +867,7 @@
     inIncludes = Lst_Init(FALSE);
     inLibs = Lst_Init(FALSE);
 
-    while ((ln = Lst_Next (sufflist)) != NILLNODE) {
+    while ((ln = Lst_Next (sufflist)) != NULL) {
 	s = (Suff *) Lst_Datum (ln);
 	if (!Lst_IsEmpty (s->searchPath)) {
 #ifdef INCLUDES
@@ -921,7 +921,7 @@
     Suff	  *s;
 
     ln = Lst_Find (sufflist, (ClientData)sname, SuffSuffHasNameP);
-    if (ln != NILLNODE) {
+    if (ln != NULL) {
 	s = (Suff *) Lst_Datum (ln);
 	s->flags |= SUFF_INCLUDE;
     }
@@ -951,7 +951,7 @@
     Suff	  *s;
 
     ln = Lst_Find (sufflist, (ClientData)sname, SuffSuffHasNameP);
-    if (ln != NILLNODE) {
+    if (ln != NULL) {
 	s = (Suff *) Lst_Datum (ln);
 	s->flags |= SUFF_LIBRARY;
     }
@@ -995,7 +995,7 @@
 	s2->file =  	estrdup(targ->pref);
 	s2->pref =  	targ->pref;
 	s2->parent = 	targ;
-	s2->node =  	NILGNODE;
+	s2->node =  	NULL;
 	s2->suff =  	s;
 	s->refCount++;
 	s2->children =	0;
@@ -1013,7 +1013,7 @@
     s2->file = 	    str_concat (targ->pref, s->name, 0);
     s2->pref =	    targ->pref;
     s2->parent =    targ;
-    s2->node = 	    NILGNODE;
+    s2->node = 	    NULL;
     s2->suff = 	    s;
     s->refCount++;
     s2->children =  0;
@@ -1085,7 +1085,7 @@
 #endif
 
 
-    while ((ln = Lst_Next (l)) != NILLNODE) {
+    while ((ln = Lst_Next (l)) != NULL) {
 	s = (Src *) Lst_Datum (ln);
 	if (s->children == 0) {
 	    free ((Address)s->file);
@@ -1094,7 +1094,7 @@
 	    else {
 #ifdef DEBUG_SRC
 		LstNode ln = Lst_Member(s->parent->cp, (ClientData)s);
-		if (ln != NILLNODE)
+		if (ln != NULL)
 		    Lst_Remove(s->parent->cp, ln);
 #endif
 		--s->parent->children;
@@ -1157,7 +1157,7 @@
 	 * A file is considered to exist if either a node exists in the
 	 * graph for it or the file actually exists.
 	 */
-	if (Targ_FindNode(s->file, TARG_NOCREATE) != NILGNODE) {
+	if (Targ_FindNode(s->file, TARG_NOCREATE) != NULL) {
 #ifdef DEBUG_SRC
 	    printf("remove %x from %x\n", s, srcs);
 #endif
@@ -1196,7 +1196,7 @@
  *	a Src structure is put together for it and returned.
  *
  * Results:
- *	The Src structure of the "winning" child, or NIL if no such beast.
+ *	The Src structure of the "winning" child, or NULL if no such beast.
  *
  * Side Effects:
  *	A Src structure may be allocated.
@@ -1220,7 +1220,7 @@
     (void) Lst_Open (t->children);
     prefLen = strlen (targ->pref);
 
-    while ((ln = Lst_Next (t->children)) != NILLNODE) {
+    while ((ln = Lst_Next (t->children)) != NULL) {
 	s = (GNode *)Lst_Datum (ln);
 
 	cp = strrchr (s->name, '/');
@@ -1236,7 +1236,7 @@
 	     */
 	    ln = Lst_Find (sufflist, (ClientData)&cp[prefLen],
 			   SuffSuffHasNameP);
-	    if (ln != NILLNODE) {
+	    if (ln != NULL) {
 		/*
 		 * It even has a known suffix, see if there's a transformation
 		 * defined between the node's suffix and the target's suffix.
@@ -1246,7 +1246,7 @@
 		suff = (Suff *)Lst_Datum (ln);
 
 		if (Lst_Member (suff->parents,
-				(ClientData)targ->suff) != NILLNODE)
+				(ClientData)targ->suff) != NULL)
 		{
 		    /*
 		     * Hot Damn! Create a new Src structure to describe
@@ -1416,7 +1416,7 @@
 		if (DEBUG(SUFF)) {
 		    printf("%s...", gn->name);
 		}
-		if (Lst_Member(pgn->children, (ClientData)gn) == NILLNODE) {
+		if (Lst_Member(pgn->children, (ClientData)gn) == NULL) {
 		    (void)Lst_Append(pgn->children, prevLN, (ClientData)gn);
 		    prevLN = Lst_Succ(prevLN);
 		    (void)Lst_AtEnd(gn->parents, (ClientData)pgn);
@@ -1458,7 +1458,7 @@
 	    printf("Wildcard expanding \"%s\"...", cgn->name);
 	}
 
-	if (ln != NILLNODE) {
+	if (ln != NULL) {
 	    Suff    *s = (Suff *)Lst_Datum(ln);
 
 	    if (DEBUG(SUFF)) {
@@ -1493,7 +1493,7 @@
 	     * If gn isn't already a child of the parent, make it so and
 	     * up the parent's count of unmade children.
 	     */
-	    if (Lst_Member(pgn->children, (ClientData)gn) == NILLNODE) {
+	    if (Lst_Member(pgn->children, (ClientData)gn) == NULL) {
 		(void)Lst_Append(pgn->children, prevLN, (ClientData)gn);
 		prevLN = Lst_Succ(prevLN);
 		(void)Lst_AtEnd(gn->parents, (ClientData)pgn);
@@ -1550,7 +1550,7 @@
     char    	*tname;	    /* Name of transformation rule */
     GNode   	*gn;	    /* Node for same */
 
-    if (Lst_Member(tGn->children, (ClientData)sGn) == NILLNODE) {
+    if (Lst_Member(tGn->children, (ClientData)sGn) == NULL) {
 	/*
 	 * Not already linked, so form the proper links between the
 	 * target and source.
@@ -1567,10 +1567,10 @@
 	 * sGn gets the target in its iParents list, however, as that
 	 * will be sufficient to get the .IMPSRC variable set for tGn
 	 */
-	for (ln=Lst_First(sGn->cohorts); ln != NILLNODE; ln=Lst_Succ(ln)) {
+	for (ln=Lst_First(sGn->cohorts); ln != NULL; ln=Lst_Succ(ln)) {
 	    gn = (GNode *)Lst_Datum(ln);
 
-	    if (Lst_Member(tGn->children, (ClientData)gn) == NILLNODE) {
+	    if (Lst_Member(tGn->children, (ClientData)gn) == NULL) {
 		/*
 		 * Not already linked, so form the proper links between the
 		 * target and source.
@@ -1588,7 +1588,7 @@
     ln = Lst_Find(transforms, (ClientData)tname, SuffGNHasNameP);
     free(tname);
 
-    if (ln == NILLNODE) {
+    if (ln == NULL) {
 	/*
 	 * Not really such a transformation rule (can happen when we're
 	 * called to link an OP_MEMBER and OP_ARCHV node), so return
@@ -1617,7 +1617,7 @@
      * Deal with wildcards and variables in any acquired sources
      */
     ln = Lst_Succ(ln);
-    if (ln != NILLNODE) {
+    if (ln != NULL) {
 	Lst_ForEachFrom(tGn->children, ln,
 			SuffExpandChildren, (ClientData)tGn);
     }
@@ -1686,7 +1686,7 @@
     /*
      * Create the link between the two nodes right off
      */
-    if (Lst_Member(gn->children, (ClientData)mem) == NILLNODE) {
+    if (Lst_Member(gn->children, (ClientData)mem) == NULL) {
 	(void)Lst_AtEnd(gn->children, (ClientData)mem);
 	(void)Lst_AtEnd(mem->parents, (ClientData)gn);
 	gn->unmade += 1;
@@ -1734,7 +1734,7 @@
 	 */
 	ln = Lst_Find(ms->parents, eoarch, SuffSuffIsSuffixP);
 
-	if (ln != NILLNODE) {
+	if (ln != NULL) {
 	    /*
 	     * Got one -- apply it
 	     */
@@ -1830,13 +1830,13 @@
      * Should we find one, we discard the one we found before.
      */
 
-    while (ln != NILLNODE) {
+    while (ln != NULL) {
 	/*
 	 * Look for next possible suffix...
 	 */
 	ln = Lst_FindFrom(sufflist, ln, eoname, SuffSuffIsSuffixP);
 
-	if (ln != NILLNODE) {
+	if (ln != NULL) {
 	    int	    prefLen;	    /* Length of the prefix */
 	    Src	    *targ;
 
@@ -2059,7 +2059,7 @@
 	     * up to, but not including, the parent node.
 	     */
 	    while (bottom && bottom->parent != NULL) {
-		if (Lst_Member(slst, (ClientData) bottom) == NILLNODE) {
+		if (Lst_Member(slst, (ClientData) bottom) == NULL) {
 		    Lst_AtEnd(slst, (ClientData) bottom);
 		}
 		bottom = bottom->parent;
@@ -2087,7 +2087,7 @@
      * transformation rule. Also, the unmade field of gn is incremented.
      * Etc.
      */
-    if (bottom->node == NILGNODE) {
+    if (bottom->node == NULL) {
 	bottom->node = Targ_FindNode(bottom->file, TARG_CREATE);
     }
 
@@ -2099,7 +2099,7 @@
 	src->node->suffix = src->suff;
 	src->node->suffix->refCount++;
 
-	if (targ->node == NILGNODE) {
+	if (targ->node == NULL) {
 	    targ->node = Targ_FindNode(targ->file, TARG_CREATE);
 	}
 
@@ -2141,7 +2141,7 @@
      */
 sfnd_return:
     if (bottom)
-	if (Lst_Member(slst, (ClientData) bottom) == NILLNODE)
+	if (Lst_Member(slst, (ClientData) bottom) == NULL)
 	    Lst_AtEnd(slst, (ClientData) bottom);
 
     while (SuffRemoveSrc(srcs) || SuffRemoveSrc(targs))
@@ -2226,7 +2226,7 @@
 	ln = Lst_Find (sufflist, (ClientData)LIBSUFF, SuffSuffHasNameP);
 	if (gn->suffix)
 	    gn->suffix->refCount--;
-	if (ln != NILLNODE) {
+	if (ln != NULL) {
 	    gn->suffix = s = (Suff *) Lst_Datum (ln);
 	    gn->suffix->refCount++;
 	    Arch_FindLib (gn, s->searchPath);
@@ -2270,7 +2270,7 @@
     LstNode ln;
 
     ln = Lst_Find(sufflist, (ClientData)name, SuffSuffHasNameP);
-    if (ln != NILLNODE) {
+    if (ln != NULL) {
 	s = (Suff *)Lst_Datum(ln);
 	if (suffNull != (Suff *)NULL) {
 	    suffNull->flags &= ~SUFF_NULL;
Index: targ.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/targ.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- targ.c	9 Jul 2000 02:54:54 -0000	1.11
+++ targ.c	2 Dec 2000 18:57:59 -0000	1.12
@@ -231,7 +231,7 @@
  *	Find a node in the list using the given name for matching
  *
  * Results:
- *	The node in the list if it was. If it wasn't, return NILGNODE of
+ *	The node in the list if it was. If it wasn't, return NULL of
  *	flags was TARG_NOCREATE or the newly created and initialized node
  *	if it was TARG_CREATE
  *
@@ -263,7 +263,7 @@
     }
 
     if (he == (Hash_Entry *) NULL) {
-	return (NILGNODE);
+	return (NULL);
     } else {
 	return ((GNode *) Hash_GetValue (he));
     }
@@ -300,10 +300,10 @@
     if (Lst_Open (names) == FAILURE) {
 	return (nodes);
     }
-    while ((ln = Lst_Next (names)) != NILLNODE) {
+    while ((ln = Lst_Next (names)) != NULL) {
 	name = (char *)Lst_Datum(ln);
 	gn = Targ_FindNode (name, flags);
-	if (gn != NILGNODE) {
+	if (gn != NULL) {
 	    /*
 	     * Note: Lst_AtEnd must come before the Lst_Concat so the nodes
 	     * are added to the list in the order in which they were
Index: var.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/var.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- var.c	9 Oct 2000 04:53:36 -0000	1.19
+++ var.c	2 Dec 2000 18:57:59 -0000	1.20
@@ -221,7 +221,7 @@
  *
  * Results:
  *	A pointer to the structure describing the desired variable or
- *	NIL if the variable does not exist.
+ *	NULL if the variable does not exist.
  *
  * Side Effects:
  *	None
@@ -283,7 +283,7 @@
      * the -E flag to use environment-variable-override for.
      */
     if (Lst_Find (envFirstVars, (ClientData)name,
-		  (int (*)(ClientData, ClientData)) strcmp) != NILLNODE)
+		  (int (*)(ClientData, ClientData)) strcmp) != NULL)
     {
 	localCheckEnvFirst = TRUE;
     } else {
@@ -297,15 +297,15 @@
      */
     var = Lst_Find (ctxt->context, (ClientData)name, VarCmp);
 
-    if ((var == NILLNODE) && (flags & FIND_CMD) && (ctxt != VAR_CMD)) {
+    if ((var == NULL) && (flags & FIND_CMD) && (ctxt != VAR_CMD)) {
 	var = Lst_Find (VAR_CMD->context, (ClientData)name, VarCmp);
     }
-    if ((var == NILLNODE) && (flags & FIND_GLOBAL) && (ctxt != VAR_GLOBAL) &&
+    if ((var == NULL) && (flags & FIND_GLOBAL) && (ctxt != VAR_GLOBAL) &&
 	!checkEnvFirst && !localCheckEnvFirst)
     {
 	var = Lst_Find (VAR_GLOBAL->context, (ClientData)name, VarCmp);
     }
-    if ((var == NILLNODE) && (flags & FIND_ENV)) {
+    if ((var == NULL) && (flags & FIND_ENV)) {
 	char *env;
 
 	if ((env = getenv (name)) != NULL) {
@@ -325,16 +325,16 @@
 		   (flags & FIND_GLOBAL) && (ctxt != VAR_GLOBAL))
 	{
 	    var = Lst_Find (VAR_GLOBAL->context, (ClientData)name, VarCmp);
-	    if (var == NILLNODE) {
-		return ((Var *) NIL);
+	    if (var == NULL) {
+		return ((Var *) NULL);
 	    } else {
 		return ((Var *)Lst_Datum(var));
 	    }
 	} else {
-	    return((Var *)NIL);
+	    return((Var *)NULL);
 	}
-    } else if (var == NILLNODE) {
-	return ((Var *) NIL);
+    } else if (var == NULL) {
+	return ((Var *) NULL);
     } else {
 	return ((Var *) Lst_Datum (var));
     }
@@ -429,7 +429,7 @@
 	printf("%s:delete %s\n", ctxt->name, name);
     }
     ln = Lst_Find(ctxt->context, (ClientData)name, VarCmp);
-    if (ln != NILLNODE) {
+    if (ln != NULL) {
 	register Var 	  *v;
 
 	v = (Var *)Lst_Datum(ln);
@@ -475,7 +475,7 @@
      * point in searching them all just to save a bit of memory...
      */
     v = VarFind (name, ctxt, 0);
-    if (v == (Var *) NIL) {
+    if (v == (Var *) NULL) {
 	VarAdd (name, val, ctxt);
     } else {
 	Buf_Discard(v->val, Buf_Size(v->val));
@@ -526,7 +526,7 @@
 
     v = VarFind (name, ctxt, (ctxt == VAR_GLOBAL) ? FIND_ENV : 0);
 
-    if (v == (Var *) NIL) {
+    if (v == (Var *) NULL) {
 	VarAdd (name, val, ctxt);
     } else {
 	Buf_AddByte(v->val, (Byte)' ');
@@ -572,7 +572,7 @@
 
     v = VarFind(name, ctxt, FIND_CMD|FIND_GLOBAL|FIND_ENV);
 
-    if (v == (Var *)NIL) {
+    if (v == (Var *)NULL) {
 	return(FALSE);
     } else if (v->flags & VAR_FROM_ENV) {
 	free(v->name);
@@ -604,7 +604,7 @@
 
     v = VarFind (name, ctxt, FIND_ENV | FIND_GLOBAL | FIND_CMD);
     *frp = NULL;
-    if (v != (Var *) NIL) {
+    if (v != (Var *) NULL) {
 	char *p = ((char *)Buf_GetAll(v->val, (int *)NULL));
 	if (v->flags & VAR_FROM_ENV) {
 	    Buf_Destroy(v->val, FALSE);
@@ -1494,7 +1494,7 @@
 	name[1] = '\0';
 
 	v = VarFind (name, ctxt, FIND_ENV | FIND_GLOBAL | FIND_CMD);
-	if (v == (Var *)NIL) {
+	if (v == (Var *)NULL) {
 	    *lengthPtr = 2;
 
 	    if ((ctxt == VAR_CMD) || (ctxt == VAR_GLOBAL)) {
@@ -1574,7 +1574,7 @@
 	vlen = strlen(str);
 
 	v = VarFind (str, ctxt, FIND_ENV | FIND_GLOBAL | FIND_CMD);
-	if ((v == (Var *)NIL) && (ctxt != VAR_CMD) && (ctxt != VAR_GLOBAL) &&
+	if ((v == (Var *)NULL) && (ctxt != VAR_CMD) && (ctxt != VAR_GLOBAL) &&
 	    (vlen == 2) && (str[1] == 'F' || str[1] == 'D'))
 	{
 	    /*
@@ -1627,7 +1627,7 @@
 	    }
 	}
 
-	if (v == (Var *)NIL) {
+	if (v == (Var *)NULL) {
 	    if (((vlen == 1) ||
 		 (((vlen == 2) && (str[1] == 'F' ||
 					 str[1] == 'D')))) &&
Index: lst.lib/lstAppend.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstAppend.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- lst.lib/lstAppend.c	9 Jul 2000 00:08:47 -0000	1.7
+++ lst.lib/lstAppend.c	2 Dec 2000 18:58:01 -0000	1.8
@@ -60,7 +60,7 @@
  *	A new ListNode is created and linked in to the List. The lastPtr
  *	field of the List will be altered if ln is the last node in the
  *	list. lastPtr and firstPtr will alter if the list was empty and
- *	ln was NILLNODE.
+ *	ln was NULL.
  *
  *-----------------------------------------------------------------------
  */
@@ -74,7 +74,7 @@
     register ListNode	lNode;
     register ListNode	nLNode;
 
-    if (LstValid (l) && (ln == NILLNODE && LstIsEmpty (l))) {
+    if (LstValid (l) && (ln == NULL && LstIsEmpty (l))) {
 	goto ok;
     }
 
@@ -90,11 +90,11 @@
     nLNode->datum = d;
     nLNode->useCount = nLNode->flags = 0;
 
-    if (lNode == NilListNode) {
+    if (lNode == NULL) {
 	if (list->isCirc) {
 	    nLNode->nextPtr = nLNode->prevPtr = nLNode;
 	} else {
-	    nLNode->nextPtr = nLNode->prevPtr = NilListNode;
+	    nLNode->nextPtr = nLNode->prevPtr = NULL;
 	}
 	list->firstPtr = list->lastPtr = nLNode;
     } else {
@@ -102,7 +102,7 @@
 	nLNode->nextPtr = lNode->nextPtr;
 
 	lNode->nextPtr = nLNode;
-	if (nLNode->nextPtr != NilListNode) {
+	if (nLNode->nextPtr != NULL) {
 	    nLNode->nextPtr->prevPtr = nLNode;
 	}
 
Index: lst.lib/lstConcat.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstConcat.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- lst.lib/lstConcat.c	9 Jul 2000 00:08:47 -0000	1.8
+++ lst.lib/lstConcat.c	2 Dec 2000 18:58:01 -0000	1.9
@@ -84,16 +84,16 @@
     }
 
     if (flags == LST_CONCLINK) {
-	if (list2->firstPtr != NilListNode) {
+	if (list2->firstPtr != NULL) {
 	    /*
 	     * We set the nextPtr of the
-	     * last element of list two to be NIL to make the loop easier and
+	     * last element of list two to be NULL to make the loop easier and
 	     * so we don't need an extra case should the first list turn
 	     * out to be non-circular -- the final element will already point
-	     * to NIL space and the first element will be untouched if it
-	     * existed before and will also point to NIL space if it didn't.
+	     * to NULL space and the first element will be untouched if it
+	     * existed before and will also point to NULL space if it didn't.
 	     */
-	    list2->lastPtr->nextPtr = NilListNode;
+	    list2->lastPtr->nextPtr = NULL;
 	    /*
 	     * So long as the second list isn't empty, we just link the
 	     * first element of the second list to the last element of the
@@ -103,14 +103,14 @@
 	     * the last element of the first list.
 	     */
 	    list2->firstPtr->prevPtr = list1->lastPtr;
-	    if (list1->lastPtr != NilListNode) {
+	    if (list1->lastPtr != NULL) {
  		list1->lastPtr->nextPtr = list2->firstPtr;
 	    } else {
 		list1->firstPtr = list2->firstPtr;
 	    }
 	    list1->lastPtr = list2->lastPtr;
 	}
-	if (list1->isCirc && list1->firstPtr != NilListNode) {
+	if (list1->isCirc && list1->firstPtr != NULL) {
 	    /*
 	     * 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
@@ -120,27 +120,27 @@
 	    list1->lastPtr->nextPtr = list1->firstPtr;
 	}
 	free ((Address)l2);
-    } else if (list2->firstPtr != NilListNode) {
+    } else if (list2->firstPtr != NULL) {
 	/*
-	 * We set the nextPtr of the last element of list 2 to be nil to make
+	 * We set the nextPtr of the last element of list 2 to be NULL to make
 	 * the loop less difficult. The loop simply goes through the entire
 	 * second list creating new LstNodes and filling in the nextPtr, and
 	 * prevPtr to fit into l1 and its datum field from the
 	 * datum field of the corresponding element in l2. The 'last' node
 	 * follows the last of the new nodes along until the entire l2 has
 	 * been appended. Only then does the bookkeeping catch up with the
-	 * changes. During the first iteration of the loop, if 'last' is nil,
+	 * changes. During the first iteration of the loop, if 'last' is NULL,
 	 * the first list must have been empty so the newly-created node is
 	 * made the first node of the list.
 	 */
-	list2->lastPtr->nextPtr = NilListNode;
+	list2->lastPtr->nextPtr = NULL;
 	for (last = list1->lastPtr, ln = list2->firstPtr;
-	     ln != NilListNode;
+	     ln != NULL;
 	     ln = ln->nextPtr)
 	{
 	    PAlloc (nln, ListNode);
 	    nln->datum = ln->datum;
-	    if (last != NilListNode) {
+	    if (last != NULL) {
 		last->nextPtr = nln;
 	    } else {
 		list1->firstPtr = nln;
@@ -166,7 +166,7 @@
 	    list1->lastPtr->nextPtr = list1->firstPtr;
 	    list1->firstPtr->prevPtr = list1->lastPtr;
 	} else {
-	    last->nextPtr = NilListNode;
+	    last->nextPtr = NULL;
 	}
 
 	if (list2->isCirc) {
Index: lst.lib/lstDatum.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstDatum.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- lst.lib/lstDatum.c	9 Jul 2000 00:08:47 -0000	1.6
+++ lst.lib/lstDatum.c	2 Dec 2000 18:58:01 -0000	1.7
@@ -54,7 +54,7 @@
  *	Return the datum stored in the given node.
  *
  * Results:
- *	The datum or (ick!) NIL if the node is invalid.
+ *	The datum or (ick!) NULL if the node is invalid.
  *
  * Side Effects:
  *	None.
@@ -65,10 +65,10 @@
 Lst_Datum (ln)
     LstNode	ln;
 {
-    if (ln != NILLNODE) {
+    if (ln != NULL) {
 	return (((ListNode)ln)->datum);
     } else {
-	return ((ClientData) NIL);
+	return ((ClientData) NULL);
     }
 }
 
Index: lst.lib/lstDeQueue.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstDeQueue.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- lst.lib/lstDeQueue.c	9 Jul 2000 00:08:47 -0000	1.7
+++ lst.lib/lstDeQueue.c	2 Dec 2000 18:58:01 -0000	1.8
@@ -54,7 +54,7 @@
  *	Remove and return the datum at the head of the given list.
  *
  * Results:
- *	The datum in the node at the head or (ick) NIL if the list
+ *	The datum in the node at the head or (ick) NULL if the list
  *	is empty.
  *
  * Side Effects:
@@ -70,13 +70,13 @@
     register ListNode	tln;
 
     tln = (ListNode) Lst_First (l);
-    if (tln == NilListNode) {
-	return ((ClientData) NIL);
+    if (tln == NULL) {
+	return ((ClientData) NULL);
     }
 
     rd = tln->datum;
     if (Lst_Remove (l, (LstNode)tln) == FAILURE) {
-	return ((ClientData) NIL);
+	return ((ClientData) NULL);
     } else {
 	return (rd);
     }
Index: lst.lib/lstDestroy.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstDestroy.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- lst.lib/lstDestroy.c	9 Jul 2000 00:08:47 -0000	1.8
+++ lst.lib/lstDestroy.c	2 Dec 2000 18:58:01 -0000	1.9
@@ -69,10 +69,10 @@
     register void	(*freeProc) __P((ClientData));
 {
     register ListNode	ln;
-    register ListNode	tln = NilListNode;
+    register ListNode	tln = NULL;
     register List 	list = (List)l;
 
-    if (l == NILLST || ! l) {
+    if (l == NULL || ! l) {
 	/*
 	 * Note the check for l == (Lst)0 to catch uninitialized static Lst's.
 	 * Gross, but useful.
@@ -81,21 +81,21 @@
     }
 
     /* To ease scanning */
-    if (list->lastPtr != NilListNode)
-	list->lastPtr->nextPtr = NilListNode;
+    if (list->lastPtr != NULL)
+	list->lastPtr->nextPtr = NULL;
     else {
 	free ((Address)l);
 	return;
     }
 
     if (freeProc) {
-	for (ln = list->firstPtr; ln != NilListNode; ln = tln) {
+	for (ln = list->firstPtr; ln != NULL; ln = tln) {
 	     tln = ln->nextPtr;
 	     (*freeProc) (ln->datum);
 	     free ((Address)ln);
 	}
     } else {
-	for (ln = list->firstPtr; ln != NilListNode; ln = tln) {
+	for (ln = list->firstPtr; ln != NULL; ln = tln) {
 	     tln = ln->nextPtr;
 	     free ((Address)ln);
 	}
Index: lst.lib/lstDupl.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstDupl.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- lst.lib/lstDupl.c	9 Jul 2000 00:08:47 -0000	1.8
+++ lst.lib/lstDupl.c	2 Dec 2000 18:58:01 -0000	1.9
@@ -56,7 +56,7 @@
  *	given, the individual client elements will be duplicated as well.
  *
  * Results:
- *	The new Lst structure or NILLST if failure.
+ *	The new Lst structure or NULL if failure.
  *
  * Side Effects:
  *	A new list is created.
@@ -73,26 +73,26 @@
     register List 	list = (List)l;
 
     if (!LstValid (l)) {
-	return (NILLST);
+	return (NULL);
     }
 
     nl = Lst_Init (list->isCirc);
-    if (nl == NILLST) {
-	return (NILLST);
+    if (nl == NULL) {
+	return (NULL);
     }
 
     ln = list->firstPtr;
-    while (ln != NilListNode) {
+    while (ln != NULL) {
 	if (copyProc != NOCOPY) {
 	    if (Lst_AtEnd (nl, (*copyProc) (ln->datum)) == FAILURE) {
-		return (NILLST);
+		return (NULL);
 	    }
 	} else if (Lst_AtEnd (nl, ln->datum) == FAILURE) {
-	    return (NILLST);
+	    return (NULL);
 	}
 
 	if (list->isCirc && ln == list->lastPtr) {
-	    ln = NilListNode;
+	    ln = NULL;
 	} else {
 	    ln = ln->nextPtr;
 	}
Index: lst.lib/lstFind.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstFind.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- lst.lib/lstFind.c	9 Jul 2000 00:08:47 -0000	1.7
+++ lst.lib/lstFind.c	2 Dec 2000 18:58:01 -0000	1.8
@@ -55,7 +55,7 @@
  *	and the given datum.
  *
  * Results:
- *	The found node or NILLNODE if none matches.
+ *	The found node or NULL if none matches.
  *
  * Side Effects:
  *	None.
Index: lst.lib/lstFindFrom.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstFindFrom.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- lst.lib/lstFindFrom.c	9 Jul 2000 00:08:47 -0000	1.8
+++ lst.lib/lstFindFrom.c	2 Dec 2000 18:58:01 -0000	1.9
@@ -56,7 +56,7 @@
  *	determine when it has been found.
  *
  * Results:
- *	The found node or NILLNODE
+ *	The found node or NULL
  *
  * Side Effects:
  *	None.
@@ -74,7 +74,7 @@
     Boolean		found = FALSE;
 
     if (!LstValid (l) || LstIsEmpty (l) || !LstNodeValid (ln, l)) {
-	return (NILLNODE);
+	return (NULL);
     }
 
     tln = (ListNode)ln;
@@ -86,12 +86,12 @@
 	} else {
 	    tln = tln->nextPtr;
 	}
-    } while (tln != (ListNode)ln && tln != NilListNode);
+    } while (tln != (ListNode)ln && tln != NULL);
 
     if (found) {
 	return ((LstNode)tln);
     } else {
-	return (NILLNODE);
+	return (NULL);
     }
 }
 
Index: lst.lib/lstFirst.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstFirst.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- lst.lib/lstFirst.c	9 Jul 2000 00:08:47 -0000	1.6
+++ lst.lib/lstFirst.c	2 Dec 2000 18:58:01 -0000	1.7
@@ -54,7 +54,7 @@
  *	Return the first node on the given list.
  *
  * Results:
- *	The first node or NILLNODE if the list is empty.
+ *	The first node or NULL if the list is empty.
  *
  * Side Effects:
  *	None.
@@ -66,7 +66,7 @@
     Lst	l;
 {
     if (!LstValid (l) || LstIsEmpty (l)) {
-	return (NILLNODE);
+	return (NULL);
     } else {
 	return ((LstNode)((List)l)->firstPtr);
     }
Index: lst.lib/lstForEachFrom.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstForEachFrom.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- lst.lib/lstForEachFrom.c	9 Jul 2000 00:08:47 -0000	1.8
+++ lst.lib/lstForEachFrom.c	2 Dec 2000 18:58:01 -0000	1.9
@@ -101,7 +101,7 @@
 	 *    doesn't exist.
 	 */
 	done = (next == tln->nextPtr &&
-		(next == NilListNode || next == list->firstPtr));
+		(next == NULL || next == list->firstPtr));
 
 	next = tln->nextPtr;
 
Index: lst.lib/lstInit.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstInit.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- lst.lib/lstInit.c	9 Jul 2000 00:08:47 -0000	1.7
+++ lst.lib/lstInit.c	2 Dec 2000 18:58:01 -0000	1.8
@@ -69,8 +69,8 @@
 
     PAlloc (nList, List);
 
-    nList->firstPtr = NilListNode;
-    nList->lastPtr = NilListNode;
+    nList->firstPtr = NULL;
+    nList->lastPtr = NULL;
     nList->isOpen = FALSE;
     nList->isCirc = circ;
     nList->atEnd = Unknown;
Index: lst.lib/lstInsert.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstInsert.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- lst.lib/lstInsert.c	9 Jul 2000 00:08:47 -0000	1.7
+++ lst.lib/lstInsert.c	2 Dec 2000 18:58:01 -0000	1.8
@@ -77,7 +77,7 @@
     /*
      * check validity of arguments
      */
-    if (LstValid (l) && (LstIsEmpty (l) && ln == NILLNODE))
+    if (LstValid (l) && (LstIsEmpty (l) && ln == NULL))
 	goto ok;
 
     if (!LstValid (l) || LstIsEmpty (l) || !LstNodeValid (ln, l)) {
@@ -90,18 +90,18 @@
     nLNode->datum = d;
     nLNode->useCount = nLNode->flags = 0;
 
-    if (ln == NILLNODE) {
+    if (ln == NULL) {
 	if (list->isCirc) {
 	    nLNode->prevPtr = nLNode->nextPtr = nLNode;
 	} else {
-	    nLNode->prevPtr = nLNode->nextPtr = NilListNode;
+	    nLNode->prevPtr = nLNode->nextPtr = NULL;
 	}
 	list->firstPtr = list->lastPtr = nLNode;
     } else {
 	nLNode->prevPtr = lNode->prevPtr;
 	nLNode->nextPtr = lNode;
 
-	if (nLNode->prevPtr != NilListNode) {
+	if (nLNode->prevPtr != NULL) {
 	    nLNode->prevPtr->nextPtr = nLNode;
 	}
 	lNode->prevPtr = nLNode;
Index: lst.lib/lstInt.h
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstInt.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- lst.lib/lstInt.h	28 Aug 1999 01:03:53 -0000	1.7
+++ lst.lib/lstInt.h	2 Dec 2000 18:58:01 -0000	1.8
@@ -61,8 +61,6 @@
  */
 #define LN_DELETED  	0x0001      /* List node should be removed when done */
 
-#define NilListNode	((ListNode)-1)
-
 typedef enum {
     Head, Middle, Tail, Unknown
 } Where;
@@ -77,14 +75,12 @@
  */
 	Where	  	atEnd;	  /* Where in the list the last access was */
 	Boolean	  	isOpen;	  /* true if list has been Lst_Open'ed */
-	ListNode  	curPtr;	  /* current node, if open. NilListNode if
+	ListNode  	curPtr;	  /* current node, if open. NULL if
 				   * *just* opened */
 	ListNode  	prevPtr;  /* Previous node, if open. Used by
 				   * Lst_Remove */
 } *List;
 
-#define NilList	  	((List)-1)
-
 /*
  * PAlloc (var, ptype) --
  *	Allocate a pointer-typedef structure 'ptype' into the variable 'var'
@@ -95,18 +91,18 @@
  * LstValid (l) --
  *	Return TRUE if the list l is valid
  */
-#define LstValid(l)	(((Lst)l == NILLST) ? FALSE : TRUE)
+#define LstValid(l)	(((Lst)l == NULL) ? FALSE : TRUE)
 
 /*
  * LstNodeValid (ln, l) --
  *	Return TRUE if the LstNode ln is valid with respect to l
  */
-#define LstNodeValid(ln, l)	((((LstNode)ln) == NILLNODE) ? FALSE : TRUE)
+#define LstNodeValid(ln, l)	((((LstNode)ln) == NULL) ? FALSE : TRUE)
 
 /*
  * LstIsEmpty (l) --
  *	TRUE if the list l is empty.
  */
-#define LstIsEmpty(l)	(((List)l)->firstPtr == NilListNode)
+#define LstIsEmpty(l)	(((List)l)->firstPtr == NULL)
 
 #endif /* _LSTINT_H_ */
Index: lst.lib/lstIsEmpty.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstIsEmpty.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- lst.lib/lstIsEmpty.c	9 Jul 2000 00:08:47 -0000	1.6
+++ lst.lib/lstIsEmpty.c	2 Dec 2000 18:58:01 -0000	1.7
@@ -59,8 +59,8 @@
  * Side Effects:
  *	None.
  *
- *	A list is considered empty if its firstPtr == NilListNode (or if
- *	the list itself is NILLIST).
+ *	A list is considered empty if its firstPtr == NULL (or if
+ *	the list itself is NULLLIST).
  *-----------------------------------------------------------------------
  */
 Boolean
Index: lst.lib/lstLast.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstLast.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- lst.lib/lstLast.c	9 Jul 2000 00:08:47 -0000	1.6
+++ lst.lib/lstLast.c	2 Dec 2000 18:58:01 -0000	1.7
@@ -54,7 +54,7 @@
  *	Return the last node on the list l.
  *
  * Results:
- *	The requested node or NILLNODE if the list is empty.
+ *	The requested node or NULL if the list is empty.
  *
  * Side Effects:
  *	None.
@@ -66,7 +66,7 @@
     Lst	    l;
 {
     if (!LstValid(l) || LstIsEmpty (l)) {
-	return (NILLNODE);
+	return (NULL);
     } else {
 	return ((LstNode)((List)l)->lastPtr);
     }
Index: lst.lib/lstMember.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstMember.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- lst.lib/lstMember.c	9 Jul 2000 00:08:47 -0000	1.7
+++ lst.lib/lstMember.c	2 Dec 2000 18:58:01 -0000	1.8
@@ -57,8 +57,8 @@
     register ListNode	lNode;
 
     lNode = list->firstPtr;
-    if (lNode == NilListNode) {
-	return NILLNODE;
+    if (lNode == NULL) {
+	return NULL;
     }
 
     do {
@@ -66,7 +66,7 @@
 	    return (LstNode)lNode;
 	}
 	lNode = lNode->nextPtr;
-    } while (lNode != NilListNode && lNode != list->firstPtr);
+    } while (lNode != NULL && lNode != list->firstPtr);
 
-    return NILLNODE;
+    return NULL;
 }
Index: lst.lib/lstNext.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstNext.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- lst.lib/lstNext.c	9 Jul 2000 00:08:47 -0000	1.7
+++ lst.lib/lstNext.c	2 Dec 2000 18:58:01 -0000	1.8
@@ -59,8 +59,8 @@
  *	Return the next node for the given list.
  *
  * Results:
- *	The next node or NILLNODE if the list has yet to be opened. Also
- *	if the list is non-circular and the end has been reached, NILLNODE
+ *	The next node or NULL if the list has yet to be opened. Also
+ *	if the list is non-circular and the end has been reached, NULL
  *	is returned.
  *
  * Side Effects:
@@ -77,12 +77,12 @@
 
     if ((LstValid (l) == FALSE) ||
 	(list->isOpen == FALSE)) {
-	    return (NILLNODE);
+	    return (NULL);
     }
 
     list->prevPtr = list->curPtr;
 
-    if (list->curPtr == NilListNode) {
+    if (list->curPtr == NULL) {
 	if (list->atEnd == Unknown) {
 	    /*
 	     * If we're just starting out, atEnd will be Unknown.
@@ -92,14 +92,14 @@
 	    list->curPtr = tln = list->firstPtr;
 	    list->atEnd = Middle;
 	} else {
-	    tln = NilListNode;
+	    tln = NULL;
 	    list->atEnd = Tail;
 	}
     } else {
 	tln = list->curPtr->nextPtr;
 	list->curPtr = tln;
 
-	if (tln == list->firstPtr || tln == NilListNode) {
+	if (tln == list->firstPtr || tln == NULL) {
 	    /*
 	     * If back at the front, then we've hit the end...
 	     */
Index: lst.lib/lstOpen.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstOpen.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- lst.lib/lstOpen.c	9 Jul 2000 00:08:47 -0000	1.6
+++ lst.lib/lstOpen.c	2 Dec 2000 18:58:01 -0000	1.7
@@ -62,7 +62,7 @@
  *	SUCCESS or FAILURE.
  *
  * Side Effects:
- *	isOpen is set TRUE and curPtr is set to NilListNode so the
+ *	isOpen is set TRUE and curPtr is set to NULL so the
  *	other sequential functions no it was just opened and can choose
  *	the first element accessed based on this.
  *
@@ -77,7 +77,7 @@
 	}
 	((List) l)->isOpen = TRUE;
 	((List) l)->atEnd = LstIsEmpty (l) ? Head : Unknown;
-	((List) l)->curPtr = NilListNode;
+	((List) l)->curPtr = NULL;
 
 	return (SUCCESS);
 }
Index: lst.lib/lstRemove.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstRemove.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- lst.lib/lstRemove.c	9 Jul 2000 00:08:47 -0000	1.7
+++ lst.lib/lstRemove.c	2 Dec 2000 18:58:01 -0000	1.8
@@ -57,7 +57,7 @@
  *	SUCCESS or FAILURE.
  *
  * Side Effects:
- *	The list's firstPtr will be set to NilListNode if ln is the last
+ *	The list's firstPtr will be set to NULL if ln is the last
  *	node on the list. firsPtr and lastPtr will be altered if ln is
  *	either the first or last node, respectively, on the list.
  *
@@ -79,10 +79,10 @@
     /*
      * unlink it from the list
      */
-    if (lNode->nextPtr != NilListNode) {
+    if (lNode->nextPtr != NULL) {
 	lNode->nextPtr->prevPtr = lNode->prevPtr;
     }
-    if (lNode->prevPtr != NilListNode) {
+    if (lNode->prevPtr != NULL) {
 	lNode->prevPtr->nextPtr = lNode->nextPtr;
     }
 
@@ -100,12 +100,12 @@
     /*
      * Sequential access stuff. If the node we're removing is the current
      * node in the list, reset the current node to the previous one. If the
-     * previous one was non-existent (prevPtr == NilListNode), we set the
+     * previous one was non-existent (prevPtr == NULL), we set the
      * end to be Unknown, since it is.
      */
     if (list->isOpen && (list->curPtr == lNode)) {
 	list->curPtr = list->prevPtr;
-	if (list->curPtr == NilListNode) {
+	if (list->curPtr == NULL) {
 	    list->atEnd = Unknown;
 	}
     }
@@ -116,7 +116,7 @@
      * this case). The list is, therefore, empty and is marked as such
      */
     if (list->firstPtr == lNode) {
-	list->firstPtr = NilListNode;
+	list->firstPtr = NULL;
     }
 
     /*
Index: lst.lib/lstReplace.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstReplace.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- lst.lib/lstReplace.c	9 Jul 2000 00:08:47 -0000	1.6
+++ lst.lib/lstReplace.c	2 Dec 2000 18:58:01 -0000	1.7
@@ -66,7 +66,7 @@
     register LstNode	ln;
     ClientData	  	d;
 {
-    if (ln == NILLNODE) {
+    if (ln == NULL) {
 	return (FAILURE);
     } else {
 	((ListNode) ln)->datum = d;
Index: lst.lib/lstSucc.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.lib/lstSucc.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- lst.lib/lstSucc.c	9 Jul 2000 00:08:47 -0000	1.6
+++ lst.lib/lstSucc.c	2 Dec 2000 18:58:01 -0000	1.7
@@ -67,8 +67,8 @@
 Lst_Succ (ln)
     LstNode	ln;
 {
-    if (ln == NILLNODE) {
-	return (NILLNODE);
+    if (ln == NULL) {
+	return (NULL);
     } else {
 	return ((LstNode) ((ListNode) ln)->nextPtr);
     }

===================================================================
diff -ru orig/dir.c y/dir.c
--- dir.c	Wed Nov 10 16:57:45 2004
+++ dir.c	Wed Nov 10 16:58:03 2004
@@ -220,7 +220,7 @@
      */
     Dir_AddDir (openDirectories, ".");
     dot = (Path *) Lst_DeQueue (openDirectories);
-    if (dot == (Path *) NILLNODE)
+    if (dot == (Path *) NULL)
 	err(1, "cannot open current directory");
 
     /*
diff -ru orig/suff.c y/suff.c
--- suff.c	Wed Nov 10 16:57:45 2004
+++ suff.c	Wed Nov 10 16:58:03 2004
@@ -735,7 +735,7 @@
 	    s2 = suffNull;
 	else {
 	    ln = Lst_Find(sufflist, (ClientData)cp, SuffSuffHasNameP);
-	    if (ln != NILLNODE)
+	    if (ln != NULL)
 		s2 = (Suff *)Lst_Datum(ln);
 	}
 	if (s2 != NULL) {
diff -ru orig/var.c y/var.c
--- var.c	Wed Nov 10 16:57:45 2004
+++ var.c	Wed Nov 10 16:58:03 2004
@@ -487,7 +487,7 @@
      * Any variables given on the command line are automatically exported
      * to the environment (as per POSIX standard)
      */
-    if (ctxt == VAR_CMD || (v != (Var *)NIL && (v->flags & VAR_TO_ENV))) {
+    if (ctxt == VAR_CMD || (v != (Var *)NULL && (v->flags & VAR_TO_ENV))) {
 	setenv(name, val, 1);
     }
 }
@@ -1617,7 +1617,7 @@
 		    vname[1] = '\0';
 		    v = VarFind(vname, ctxt, 0);
 
-		    if (v != (Var *)NIL && !haveModifier) {
+		    if (v != (Var *)NULL && !haveModifier) {
 			/*
 			 * No need for nested expansion or anything, as we're
 			 * the only one who sets these things and we sure don't


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]