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/lstInt.h

    r9 r24  
    3535 *
    3636 *      from: @(#)lstInt.h      8.1 (Berkeley) 6/6/93
    37  * $FreeBSD: src/usr.bin/make/lst.lib/lstInt.h,v 1.10 2002/07/15 06:57:25 jmallett Exp $
     37 * $FreeBSD: src/usr.bin/make/lst.lib/lstInt.h,v 1.7 1999/08/28 01:03:53 peter Exp $
    3838 */
    3939
     
    5151        struct ListNode *prevPtr;   /* previous element in list */
    5252        struct ListNode *nextPtr;   /* next in list */
    53         int             useCount:8, /* Count of functions using the node.
     53        short           useCount:8, /* Count of functions using the node.
    5454                                     * node may not be deleted until count
    5555                                     * goes to 0 */
    5656                        flags:8;    /* Node status flags */
    57         void *  datum;      /* datum associated with this element */
     57        ClientData      datum;      /* datum associated with this element */
    5858} *ListNode;
    5959/*
     
    6161 */
    6262#define LN_DELETED      0x0001      /* List node should be removed when done */
     63
     64#define NilListNode     ((ListNode)-1)
    6365
    6466typedef enum {
     
    7678        Where           atEnd;    /* Where in the list the last access was */
    7779        Boolean         isOpen;   /* true if list has been Lst_Open'ed */
    78         ListNode        curPtr;   /* current node, if open. NULL if
     80        ListNode        curPtr;   /* current node, if open. NilListNode if
    7981                                   * *just* opened */
    8082        ListNode        prevPtr;  /* Previous node, if open. Used by
    8183                                   * Lst_Remove */
    8284} *List;
     85
     86#define NilList         ((List)-1)
    8387
    8488/*
     
    9296 *      Return TRUE if the list l is valid
    9397 */
    94 #define LstValid(l)     (((Lst)l == NULL) ? FALSE : TRUE)
     98#define LstValid(l)     (((Lst)l == NILLST) ? FALSE : TRUE)
    9599
    96100/*
     
    98102 *      Return TRUE if the LstNode ln is valid with respect to l
    99103 */
    100 #define LstNodeValid(ln, l)     ((((LstNode)ln) == NULL) ? FALSE : TRUE)
     104#define LstNodeValid(ln, l)     ((((LstNode)ln) == NILLNODE) ? FALSE : TRUE)
    101105
    102106/*
     
    104108 *      TRUE if the list l is empty.
    105109 */
    106 #define LstIsEmpty(l)   (((List)l)->firstPtr == NULL)
     110#define LstIsEmpty(l)   (((List)l)->firstPtr == NilListNode)
    107111
    108112#endif /* _LSTINT_H_ */
Note: See TracChangeset for help on using the changeset viewer.