Changeset 24 for branches/FREEBSD/src/kmk/lst.lib/lstRemove.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/lstRemove.c
r9 r24 34 34 * SUCH DAMAGE. 35 35 * 36 * @(#)lstRemove.c 8.1 (Berkeley) 6/6/9336 * $FreeBSD: src/usr.bin/make/lst.lib/lstRemove.c,v 1.6 1999/08/28 01:03:56 peter Exp $ 37 37 */ 38 38 39 39 #ifndef lint 40 #include <sys/cdefs.h> 41 __FBSDID("$FreeBSD: src/usr.bin/make/lst.lib/lstRemove.c,v 1.10 2002/10/09 02:00:22 jmallett Exp $"); 40 static char sccsid[] = "@(#)lstRemove.c 8.1 (Berkeley) 6/6/93"; 42 41 #endif /* not lint */ 43 42 … … 58 57 * 59 58 * Side Effects: 60 * The list's firstPtr will be set to N ULLif ln is the last59 * The list's firstPtr will be set to NilListNode if ln is the last 61 60 * node on the list. firsPtr and lastPtr will be altered if ln is 62 61 * either the first or last node, respectively, on the list. … … 80 79 * unlink it from the list 81 80 */ 82 if (lNode->nextPtr != N ULL) {81 if (lNode->nextPtr != NilListNode) { 83 82 lNode->nextPtr->prevPtr = lNode->prevPtr; 84 83 } 85 if (lNode->prevPtr != N ULL) {84 if (lNode->prevPtr != NilListNode) { 86 85 lNode->prevPtr->nextPtr = lNode->nextPtr; 87 86 } … … 101 100 * Sequential access stuff. If the node we're removing is the current 102 101 * node in the list, reset the current node to the previous one. If the 103 * previous one was non-existent (prevPtr == N ULL), we set the102 * previous one was non-existent (prevPtr == NilListNode), we set the 104 103 * end to be Unknown, since it is. 105 104 */ 106 105 if (list->isOpen && (list->curPtr == lNode)) { 107 106 list->curPtr = list->prevPtr; 108 if (list->curPtr == N ULL) {107 if (list->curPtr == NilListNode) { 109 108 list->atEnd = Unknown; 110 109 } … … 117 116 */ 118 117 if (list->firstPtr == lNode) { 119 list->firstPtr = N ULL;118 list->firstPtr = NilListNode; 120 119 } 121 120 … … 125 124 */ 126 125 if (lNode->useCount == 0) { 127 free ( ln);126 free ((Address)ln); 128 127 } else { 129 128 lNode->flags |= LN_DELETED;
Note:
See TracChangeset
for help on using the changeset viewer.