diff options
author | joerg <joerg@pkgsrc.org> | 2009-09-18 21:27:25 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2009-09-18 21:27:25 +0000 |
commit | 0e4ebdb6f74d932373911427665f276e2f31a73d (patch) | |
tree | 9f85b0675b6430d91feb47f1fcbbe95577efbec7 /devel/bmake/files/lst.lib/lstInt.h | |
parent | a19d1d1f1d169614d1222f6021835c928ad0aa0f (diff) | |
download | pkgsrc-0e4ebdb6f74d932373911427665f276e2f31a73d.tar.gz |
Update to bmake-20090909
Diffstat (limited to 'devel/bmake/files/lst.lib/lstInt.h')
-rw-r--r-- | devel/bmake/files/lst.lib/lstInt.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/devel/bmake/files/lst.lib/lstInt.h b/devel/bmake/files/lst.lib/lstInt.h index a9c9e587af3..c79dc42c6b0 100644 --- a/devel/bmake/files/lst.lib/lstInt.h +++ b/devel/bmake/files/lst.lib/lstInt.h @@ -1,4 +1,4 @@ -/* $NetBSD: lstInt.h,v 1.5 2008/11/11 14:37:06 joerg Exp $ */ +/* $NetBSD: lstInt.h,v 1.6 2009/09/18 21:27:26 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -41,8 +41,8 @@ #ifndef _LSTINT_H_ #define _LSTINT_H_ -#include "../make.h" #include "../lst.h" +#include "../make_malloc.h" typedef struct ListNode { struct ListNode *prevPtr; /* previous element in list */ @@ -51,15 +51,13 @@ typedef struct ListNode { * node may not be deleted until count * goes to 0 */ flags:8; /* Node status flags */ - ClientData datum; /* datum associated with this element */ + void *datum; /* datum associated with this element */ } *ListNode; /* * Flags required for synchronization */ #define LN_DELETED 0x0001 /* List node should be removed when done */ -#define NilListNode ((ListNode)-1) - typedef enum { Head, Middle, Tail, Unknown } Where; @@ -74,14 +72,12 @@ typedef struct List { */ Where atEnd; /* Where in the list the last access was */ Boolean isOpen; /* true if list has been Lst_Open'ed */ - ListNode curPtr; /* current node, if open. NilListNode if + ListNode curPtr; /* current node, if open. NULL if * *just* opened */ ListNode prevPtr; /* Previous node, if open. Used by * Lst_Remove */ } *List; -#define NilList ((List)-1) - /* * PAlloc (var, ptype) -- * Allocate a pointer-typedef structure 'ptype' into the variable 'var' @@ -92,18 +88,18 @@ typedef struct List { * LstValid (l) -- * Return TRUE if the list l is valid */ -#define LstValid(l) ((Lst)(l) != NILLST) +#define LstValid(l) ((Lst)(l) != NULL) /* * LstNodeValid (ln, l) -- * Return TRUE if the LstNode ln is valid with respect to l */ -#define LstNodeValid(ln, l) ((ln) != NILLNODE) +#define LstNodeValid(ln, l) ((ln) != NULL) /* * LstIsEmpty (l) -- * TRUE if the list l is empty. */ -#define LstIsEmpty(l) (((List)(l))->firstPtr == NilListNode) +#define LstIsEmpty(l) (((List)(l))->firstPtr == NULL) #endif /* _LSTINT_H_ */ |