Changeset 24 for branches/FREEBSD/src/kmk/lst.lib/lstInsert.c
- Timestamp:
- Nov 26, 2002, 10:24:54 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/FREEBSD/src/kmk/lst.lib/lstInsert.c
r9 r24 34 34 * SUCH DAMAGE. 35 35 * 36 * @(#)lstInsert.c 8.1 (Berkeley) 6/6/9336 * $FreeBSD: src/usr.bin/make/lst.lib/lstInsert.c,v 1.6 1999/08/28 01:03:52 peter Exp $ 37 37 */ 38 38 39 39 #ifndef lint 40 #include <sys/cdefs.h> 41 __FBSDID("$FreeBSD: src/usr.bin/make/lst.lib/lstInsert.c,v 1.10 2002/10/09 02:00:22 jmallett Exp $"); 40 static char sccsid[] = "@(#)lstInsert.c 8.1 (Berkeley) 6/6/93"; 42 41 #endif /* not lint */ 43 42 … … 68 67 Lst l; /* list to manipulate */ 69 68 LstNode ln; /* node before which to insert d */ 70 void *d; /* datum to be inserted */69 ClientData d; /* datum to be inserted */ 71 70 { 72 71 register ListNode nLNode; /* new lnode for d */ … … 78 77 * check validity of arguments 79 78 */ 80 if (LstValid (l) && (LstIsEmpty (l) && ln == N ULL))79 if (LstValid (l) && (LstIsEmpty (l) && ln == NILLNODE)) 81 80 goto ok; 82 81 … … 91 90 nLNode->useCount = nLNode->flags = 0; 92 91 93 if (ln == N ULL) {92 if (ln == NILLNODE) { 94 93 if (list->isCirc) { 95 94 nLNode->prevPtr = nLNode->nextPtr = nLNode; 96 95 } else { 97 nLNode->prevPtr = nLNode->nextPtr = N ULL;96 nLNode->prevPtr = nLNode->nextPtr = NilListNode; 98 97 } 99 98 list->firstPtr = list->lastPtr = nLNode; … … 102 101 nLNode->nextPtr = lNode; 103 102 104 if (nLNode->prevPtr != N ULL) {103 if (nLNode->prevPtr != NilListNode) { 105 104 nLNode->prevPtr->nextPtr = nLNode; 106 105 }
Note:
See TracChangeset
for help on using the changeset viewer.