summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/lst.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make/lst.h')
-rw-r--r--usr.bin/make/lst.h27
1 files changed, 2 insertions, 25 deletions
diff --git a/usr.bin/make/lst.h b/usr.bin/make/lst.h
index b6b57a0..a81e09c 100644
--- a/usr.bin/make/lst.h
+++ b/usr.bin/make/lst.h
@@ -56,23 +56,11 @@
struct LstNode {
struct LstNode *prevPtr; /* previous element in list */
struct LstNode *nextPtr; /* next in list */
- int useCount:8; /* Count of functions using the node. Node may not
- * be deleted until count goes to 0 */
- int flags:8; /* Node status flags */
- void *datum; /* datum associated with this element */
+ void *datum; /* datum associated with this element */
};
typedef struct LstNode LstNode;
/*
- * Flags required for synchronization
- */
-#define LN_DELETED 0x0001 /* List node should be removed when done */
-
-typedef enum {
- LstHead, LstMiddle, LstTail, LstUnknown
-} LstWhere;
-
-/*
* The list itself
*/
struct Lst {
@@ -82,7 +70,6 @@ struct Lst {
typedef struct Lst Lst;
typedef int CompareProc(const void *, const void *);
-typedef int DoProc(void *, void *);
typedef void *DuplicateProc(void *);
typedef void FreeProc(void *);
@@ -159,22 +146,12 @@ LstNode *Lst_FindFrom(Lst *, LstNode *, const void *, CompareProc *);
* the datum
*/
LstNode *Lst_Member(Lst *, void *);
-/* Apply a function to all elements of a lst */
-void Lst_ForEach(Lst *, DoProc *, void *);
-#define Lst_ForEach(LST, FN, D) (Lst_ForEachFrom((LST), Lst_First(LST), \
- (FN), (D)))
+/* Loop through a list. Note, that you may not delete the list element. */
#define LST_FOREACH(PTR, LST) \
for ((PTR) = (LST)->firstPtr; (PTR) != NULL; (PTR) = (PTR)->nextPtr)
/*
- * Apply a function to all elements of a lst starting from a certain point.
- * If the list is circular, the application will wrap around to the
- * beginning of the list again.
- */
-void Lst_ForEachFrom(Lst *, LstNode *, DoProc *, void *);
-
-/*
* for using the list as a queue
*/
/* Place an element at tail of queue */
OpenPOWER on IntegriCloud