summaryrefslogtreecommitdiff
path: root/usr.bin/make/dir.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-12-18 21:53:35 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-12-18 21:53:35 +0000
commit55cf72374a6a0695c5f50929233d06baccf648f7 (patch)
treeed27b73215fc2d04eb4940923b41124839f62167 /usr.bin/make/dir.c
parente4bc6799b57e2d16e3a510719ddd8e746dda9879 (diff)
NIL, NILGNODE, etc, are only glorified NULL.
Get rid of them. Get rid of list.h, nothing uses it anyway.
Diffstat (limited to 'usr.bin/make/dir.c')
-rw-r--r--usr.bin/make/dir.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index b2854c9700b..5c98dd91c45 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.c,v 1.10 1999/12/18 02:11:26 espie Exp $ */
+/* $OpenBSD: dir.c,v 1.11 1999/12/18 21:53:32 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.10 1999/12/18 02:11:26 espie Exp $";
+static char rcsid[] = "$OpenBSD: dir.c,v 1.11 1999/12/18 21:53:32 espie Exp $";
#endif
#endif /* not lint */
@@ -523,7 +523,7 @@ DirExpandInt(word, path, expansions)
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);
}
@@ -749,7 +749,7 @@ Dir_FindFile (name, path)
* 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);
@@ -833,7 +833,7 @@ Dir_FindFile (name, path)
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);
@@ -930,7 +930,7 @@ Dir_FindFile (name, path)
bigmisses += 1;
ln = Lst_Last (path);
- if (ln == NILLNODE) {
+ if (ln == NULL) {
return ((char *) NULL);
} else {
p = (Path *) Lst_Datum (ln);
@@ -1063,9 +1063,9 @@ Dir_AddDir (path, name)
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);
}
@@ -1164,7 +1164,7 @@ Dir_MakeFlags (flag, path)
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);
@@ -1257,9 +1257,9 @@ Dir_Concat(path1, path2)
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);
}
@@ -1280,7 +1280,7 @@ Dir_PrintDirectories()
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);
}