Ignore:
Timestamp:
Nov 26, 2002, 10:24:54 PM (23 years ago)
Author:
bird
Message:

Import of RELENG_4_7_0_RELEASE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/FREEBSD/src/kmk/lst.lib/lstRemove.c

    r9 r24  
    3434 * SUCH DAMAGE.
    3535 *
    36  * @(#)lstRemove.c      8.1 (Berkeley) 6/6/93
     36 * $FreeBSD: src/usr.bin/make/lst.lib/lstRemove.c,v 1.6 1999/08/28 01:03:56 peter Exp $
    3737 */
    3838
    3939#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 $");
     40static char sccsid[] = "@(#)lstRemove.c 8.1 (Berkeley) 6/6/93";
    4241#endif /* not lint */
    4342
     
    5857 *
    5958 * Side Effects:
    60  *      The list's firstPtr will be set to NULL if ln is the last
     59 *      The list's firstPtr will be set to NilListNode if ln is the last
    6160 *      node on the list. firsPtr and lastPtr will be altered if ln is
    6261 *      either the first or last node, respectively, on the list.
     
    8079     * unlink it from the list
    8180     */
    82     if (lNode->nextPtr != NULL) {
     81    if (lNode->nextPtr != NilListNode) {
    8382        lNode->nextPtr->prevPtr = lNode->prevPtr;
    8483    }
    85     if (lNode->prevPtr != NULL) {
     84    if (lNode->prevPtr != NilListNode) {
    8685        lNode->prevPtr->nextPtr = lNode->nextPtr;
    8786    }
     
    101100     * Sequential access stuff. If the node we're removing is the current
    102101     * node in the list, reset the current node to the previous one. If the
    103      * previous one was non-existent (prevPtr == NULL), we set the
     102     * previous one was non-existent (prevPtr == NilListNode), we set the
    104103     * end to be Unknown, since it is.
    105104     */
    106105    if (list->isOpen && (list->curPtr == lNode)) {
    107106        list->curPtr = list->prevPtr;
    108         if (list->curPtr == NULL) {
     107        if (list->curPtr == NilListNode) {
    109108            list->atEnd = Unknown;
    110109        }
     
    117116     */
    118117    if (list->firstPtr == lNode) {
    119         list->firstPtr = NULL;
     118        list->firstPtr = NilListNode;
    120119    }
    121120
     
    125124     */
    126125    if (lNode->useCount == 0) {
    127         free (ln);
     126        free ((Address)ln);
    128127    } else {
    129128        lNode->flags |= LN_DELETED;
Note: See TracChangeset for help on using the changeset viewer.