Changeset 24 for branches/FREEBSD/src/kmk/lst.lib/lstAppend.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/lstAppend.c
r9 r24 34 34 * SUCH DAMAGE. 35 35 * 36 * @(#)lstAppend.c 8.1 (Berkeley) 6/6/9336 * $FreeBSD: src/usr.bin/make/lst.lib/lstAppend.c,v 1.6 1999/08/28 01:03:45 peter Exp $ 37 37 */ 38 38 39 39 #ifndef lint 40 #include <sys/cdefs.h> 41 __FBSDID("$FreeBSD: src/usr.bin/make/lst.lib/lstAppend.c,v 1.10 2002/10/09 02:00:22 jmallett Exp $"); 40 static char sccsid[] = "@(#)lstAppend.c 8.1 (Berkeley) 6/6/93"; 42 41 #endif /* not lint */ 43 42 … … 61 60 * field of the List will be altered if ln is the last node in the 62 61 * list. lastPtr and firstPtr will alter if the list was empty and 63 * ln was N ULL.62 * ln was NILLNODE. 64 63 * 65 64 *----------------------------------------------------------------------- … … 69 68 Lst l; /* affected list */ 70 69 LstNode ln; /* node after which to append the datum */ 71 void *d; /* said datum */70 ClientData d; /* said datum */ 72 71 { 73 72 register List list; … … 75 74 register ListNode nLNode; 76 75 77 if (LstValid (l) && (ln == N ULL&& LstIsEmpty (l))) {76 if (LstValid (l) && (ln == NILLNODE && LstIsEmpty (l))) { 78 77 goto ok; 79 78 } … … 91 90 nLNode->useCount = nLNode->flags = 0; 92 91 93 if (lNode == N ULL) {92 if (lNode == NilListNode) { 94 93 if (list->isCirc) { 95 94 nLNode->nextPtr = nLNode->prevPtr = nLNode; 96 95 } else { 97 nLNode->nextPtr = nLNode->prevPtr = N ULL;96 nLNode->nextPtr = nLNode->prevPtr = NilListNode; 98 97 } 99 98 list->firstPtr = list->lastPtr = nLNode; … … 103 102 104 103 lNode->nextPtr = nLNode; 105 if (nLNode->nextPtr != N ULL) {104 if (nLNode->nextPtr != NilListNode) { 106 105 nLNode->nextPtr->prevPtr = nLNode; 107 106 }
Note:
See TracChangeset
for help on using the changeset viewer.