summaryrefslogtreecommitdiff
path: root/usr.bin/make/lst.lib/lstInsert.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-11-30 21:09:23 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-11-30 21:09:23 +0000
commit67e9b81bf2c3acfeba94fdb222f197904c16cfef (patch)
treed3c86e29fa60fc56eb72f9263478434f9b2f3607 /usr.bin/make/lst.lib/lstInsert.c
parent66030e0876e2f9722b759c1df2901e526a7be102 (diff)
Sync with NetBSD:
- Merge in FreeBSD and Lite2 changes. - Fix bug where a non-archive target with a .a suffix would always be considered to be out of date, since it does not have a TOC. - Fix NetBSD PR #2930: declare missing variable.
Diffstat (limited to 'usr.bin/make/lst.lib/lstInsert.c')
-rw-r--r--usr.bin/make/lst.lib/lstInsert.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/make/lst.lib/lstInsert.c b/usr.bin/make/lst.lib/lstInsert.c
index 95e9a0ddc35..194f65b0bb5 100644
--- a/usr.bin/make/lst.lib/lstInsert.c
+++ b/usr.bin/make/lst.lib/lstInsert.c
@@ -1,9 +1,9 @@
-/* $OpenBSD: lstInsert.c,v 1.2 1996/06/26 05:36:51 deraadt Exp $ */
-/* $NetBSD: lstInsert.c,v 1.4 1995/06/14 15:21:21 christos Exp $ */
+/* $OpenBSD: lstInsert.c,v 1.3 1996/11/30 21:09:17 millert Exp $ */
+/* $NetBSD: lstInsert.c,v 1.5 1996/11/06 17:59:44 christos Exp $ */
/*
- * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1988, 1989, 1990, 1993
+ * The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Adam de Boor.
@@ -39,9 +39,9 @@
#ifndef lint
#if 0
-static char sccsid[] = "@(#)lstInsert.c 5.3 (Berkeley) 6/1/90";
+static char sccsid[] = "@(#)lstInsert.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstInsert.c,v 1.2 1996/06/26 05:36:51 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: lstInsert.c,v 1.3 1996/11/30 21:09:17 millert Exp $";
#endif
#endif /* not lint */
@@ -83,17 +83,17 @@ Lst_Insert (l, ln, d)
*/
if (LstValid (l) && (LstIsEmpty (l) && ln == NILLNODE))
goto ok;
-
+
if (!LstValid (l) || LstIsEmpty (l) || !LstNodeValid (ln, l)) {
return (FAILURE);
}
-
+
ok:
PAlloc (nLNode, ListNode);
-
+
nLNode->datum = d;
nLNode->useCount = nLNode->flags = 0;
-
+
if (ln == NILLNODE) {
if (list->isCirc) {
nLNode->prevPtr = nLNode->nextPtr = nLNode;
@@ -104,17 +104,17 @@ Lst_Insert (l, ln, d)
} else {
nLNode->prevPtr = lNode->prevPtr;
nLNode->nextPtr = lNode;
-
+
if (nLNode->prevPtr != NilListNode) {
nLNode->prevPtr->nextPtr = nLNode;
}
lNode->prevPtr = nLNode;
-
+
if (lNode == list->firstPtr) {
list->firstPtr = nLNode;
}
}
-
+
return (SUCCESS);
}
-
+