#ifndef __INC_POS_PROTO_PLIST_H
#define __INC_POS_PROTO_PLIST_H
/*******************************************************************
 Includes Release 24
 (C) Copyright 1995-1997 proDAD
     All Rights Reserved

 $AUT Holger Burkarth
 $DAT >>pList.h<<   04 Feb 1997    19:42:12 - (C) ProDAD
*******************************************************************/
#ifndef __INC_POS_PEXEC_LIST_H
#include <pExec/List.h>
#endif

/*------ lists --------------------------------------------------------*/
VOID  pOS_ListInit(_R_A0 struct pOS_List*);
VOID  pOS_ListInsert(_R_A0 struct pOS_List*,_R_A1 struct pOS_Node*,_R_A2 const struct pOS_Node *pred);
VOID  pOS_ListAddHead(_R_A0 struct pOS_List*,_R_A1 struct pOS_Node*);
VOID  pOS_ListAddTail(_R_A0 struct pOS_List*,_R_A1 struct pOS_Node*);
VOID  pOS_ListRemove(_R_A0 struct pOS_Node*);
struct pOS_Node *pOS_ListRemHead(_R_A0 struct pOS_List*);
struct pOS_Node *pOS_ListRemTail(_R_A0 struct pOS_List*);
VOID  pOS_ListMoveListTail(_R_A0 struct pOS_List* listSource,_R_A1 struct pOS_List* listDest);
VOID  pOS_ListMoveListHead(_R_A0 struct pOS_List* listSource,_R_A1 struct pOS_List* listDest);
VOID  pOS_ListMoveListInsert(_R_A0 struct pOS_List* listSource,_R_A1 struct pOS_List* listDest,_R_A2 struct pOS_Node*);
struct pOS_Node* pOS_ListCntSucc(_R_A0 const struct pOS_List*,_R_A1 const struct pOS_Node*,_R_D0 ULONG cnt);
ULONG pOS_ListGetSuccNodeCnt(_R_A0 const struct pOS_Node*);

struct pOS_Node *pOS_ListSucc(_R_A0 const struct pOS_List*,_R_A1 const struct pOS_Node*);
struct pOS_Node *pOS_ListPred(_R_A0 const struct pOS_List*,_R_A1 const struct pOS_Node*);
BOOL  pOS_ListIsEmpty(_R_A0 const struct pOS_List*);

VOID pOS_ListEnqueue(_R_A0 struct pOS_ExList*,_R_A1 struct pOS_ExNode*);
VOID pOS_ListEnqueueName(_R_A0 struct pOS_ExList*,_R_A1 struct pOS_ExNode*,_R_D0 SLONG mode);
VOID pOS_ListEnqueueIName(_R_A0 struct pOS_ExList*,_R_A1 struct pOS_ExNode*,_R_D0 SLONG mode);
struct pOS_ExNode *pOS_ListFindName(_R_A0 const struct pOS_ExList*,_R_A1 const CHAR *name);
struct pOS_ExNode *pOS_ListFindIName(_R_A0 const struct pOS_ExList*,_R_A1 const CHAR *name);
struct pOS_ExNode *pOS_ListFindINameV(_R_A0 const struct pOS_ExList*,_R_A1 const CHAR*,_R_A2 struct pOS_ExNode*);

VOID pOS_ListSwapNode(_R_A0 const struct pOS_List*,_R_A1 struct pOS_Node*,_R_A2 struct pOS_Node*);
BOOL pOS_ListCheckMember(_R_A0 const struct pOS_List*,_R_A1 const struct pOS_Node*);

#ifdef pOS_CPP
inline VOID pOS_ListInit(pOS_ExList* list)
        {pOS_ListInit((pOS_List*)list);}
inline VOID pOS_ListInsert(pOS_ExList* list,pOS_ExNode* node,const pOS_ExNode *pred)
        {pOS_ListInsert((pOS_List*)list,(pOS_Node*)node,(pOS_Node*)pred);}
inline VOID pOS_ListAddHead(pOS_ExList* list,pOS_ExNode* node)
        {pOS_ListAddHead((pOS_List*)list,(pOS_Node*)node);}
inline VOID pOS_ListAddTail(pOS_ExList* list,pOS_ExNode* node)
        {pOS_ListAddTail((pOS_List*)list,(pOS_Node*)node);}
inline VOID pOS_ListRemove(pOS_ExNode* node)
        {pOS_ListRemove((pOS_Node*)node);}
inline pOS_ExNode *pOS_ListRemHead(pOS_ExList* list)
        {return((pOS_ExNode*)pOS_ListRemHead((pOS_List*)list));}
inline pOS_ExNode *pOS_ListRemTail(pOS_ExList* list)
        {return((pOS_ExNode*)pOS_ListRemTail((pOS_List*)list));}
inline VOID pOS_ListMoveListTail(pOS_ExList* listSource,pOS_ExList* listDest)
        {pOS_ListMoveListTail((pOS_List*)listSource,(pOS_List*)listDest);}
inline VOID pOS_ListMoveListHead(pOS_ExList* listSource,pOS_ExList* listDest)
        {pOS_ListMoveListHead((pOS_List*)listSource,(pOS_List*)listDest);}
inline VOID pOS_ListMoveListInsert(pOS_ExList* listSource,pOS_ExList* listDest,pOS_ExNode* pred)
        {pOS_ListMoveListInsert((pOS_List*)listSource,(pOS_List*)listDest,(pOS_Node*)pred);}
inline pOS_ExNode* pOS_ListCntSucc(pOS_ExList* list,const pOS_ExNode* node,ULONG cnt)
        {return((pOS_ExNode*)pOS_ListCntSucc((pOS_List*)list,(pOS_Node*)node,cnt));}
inline ULONG pOS_ListGetSuccNodeCnt(const pOS_ExNode* node)
        {return(pOS_ListGetSuccNodeCnt((pOS_Node*)node));}
inline VOID pOS_ListSwapNode(const pOS_ExList* list,pOS_ExNode* node1,pOS_ExNode* node2)
       {pOS_ListSwapNode((pOS_List*)list,(pOS_Node*)node1,(pOS_Node*)node2);}


inline pOS_ExNode *pOS_ListSucc(const pOS_ExList* list,const pOS_ExNode* node)
        {return((pOS_ExNode*)pOS_ListSucc((pOS_List*)list,(pOS_Node*)node));}
inline pOS_ExNode *pOS_ListPred(const pOS_ExList* list,const pOS_ExNode* node)
        {return((pOS_ExNode*)pOS_ListPred((pOS_List*)list,(pOS_Node*)node));}
inline BOOL pOS_ListIsEmpty(const pOS_ExList* list)
        {return(pOS_ListIsEmpty((pOS_List*)list));}
inline BOOL pOS_ListCheckMember(const pOS_ExList* list,const struct pOS_ExNode* node)
        {return(pOS_ListCheckMember((pOS_List*)list,(pOS_Node*)node));}


#endif /* pOS_CPP */


#endif
