summaryrefslogtreecommitdiff
path: root/devel/bmake/files/lst.lib/lstDupl.c
diff options
context:
space:
mode:
Diffstat (limited to 'devel/bmake/files/lst.lib/lstDupl.c')
-rw-r--r--devel/bmake/files/lst.lib/lstDupl.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/devel/bmake/files/lst.lib/lstDupl.c b/devel/bmake/files/lst.lib/lstDupl.c
index d47e408e7ed..e81320828c8 100644
--- a/devel/bmake/files/lst.lib/lstDupl.c
+++ b/devel/bmake/files/lst.lib/lstDupl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lstDupl.c,v 1.2 2008/03/09 19:54:29 joerg Exp $ */
+/* $NetBSD: lstDupl.c,v 1.3 2009/09/18 21:27:26 joerg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -33,14 +33,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lstDupl.c,v 1.2 2008/03/09 19:54:29 joerg Exp $";
+static char rcsid[] = "$NetBSD: lstDupl.c,v 1.3 2009/09/18 21:27:26 joerg Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)lstDupl.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: lstDupl.c,v 1.2 2008/03/09 19:54:29 joerg Exp $");
+__RCSID("$NetBSD: lstDupl.c,v 1.3 2009/09/18 21:27:26 joerg Exp $");
#endif
#endif /* not lint */
#endif
@@ -56,15 +56,15 @@ __RCSID("$NetBSD: lstDupl.c,v 1.2 2008/03/09 19:54:29 joerg Exp $");
/*-
*-----------------------------------------------------------------------
* Lst_Duplicate --
- * Duplicate an entire list. If a function to copy a ClientData is
+ * Duplicate an entire list. If a function to copy a void *is
* given, the individual client elements will be duplicated as well.
*
* Input:
* l the list to duplicate
- * copyProc A function to duplicate each ClientData
+ * copyProc A function to duplicate each void *
*
* Results:
- * The new Lst structure or NILLST if failure.
+ * The new Lst structure or NULL if failure.
*
* Side Effects:
* A new list is created.
@@ -78,26 +78,26 @@ Lst_Duplicate(Lst l, DuplicateProc *copyProc)
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) {
- if (copyProc != NOCOPY) {
+ while (ln != NULL) {
+ if (copyProc != NULL) {
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;
}