home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / DC-POS24.LZX / pOS / IncPOS.lzx / pExec / List.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-18  |  1.8 KB  |  79 lines

  1. #ifndef __INC_POS_PEXEC_LIST_H
  2. #define __INC_POS_PEXEC_LIST_H
  3. /*******************************************************************
  4.  Includes Release 24
  5.  (C) Copyright 1995-1997 proDAD
  6.      All Rights Reserved
  7.  
  8.  $AUT Holger Burkarth
  9.  $DAT >>List.h<<   12 Sep 1996    10:04:08 - (C) ProDAD
  10. *******************************************************************/
  11. #ifndef __INC_POS_PEXEC_TYPES_H
  12. #include <pExec/Types.h>
  13. #endif
  14.  
  15.  
  16. /*----------------------------------
  17. -----------------------------------*/
  18. struct pOS_Node
  19. {
  20.   struct pOS_Node* ln_Succ;
  21.   struct pOS_Node* ln_Pred;
  22. };
  23.  
  24. /*----------------------------------
  25. -----------------------------------*/
  26. struct pOS_List
  27. {
  28.   struct pOS_Node* lh_Head;
  29.   struct pOS_Node* lh_Tail;
  30.   struct pOS_Node* lh_TailPred;
  31. };
  32.  
  33.  
  34. /*----------------------------------
  35.      Extended-Node
  36. -----------------------------------*/
  37. struct pOS_ExNode
  38. {
  39.   struct pOS_ExNode* ln_Succ;
  40.   struct pOS_ExNode* ln_Pred;
  41.   UBYTE              ln_Type;   /* enum pOS_ExNodeType */
  42.   SBYTE              ln_Pri;    /* Priority, for sorting */
  43.   const CHAR        *ln_Name;   /* ID string, null terminated */
  44. };
  45.  
  46.  
  47.  
  48. /*----------------------------------
  49. -----------------------------------*/
  50. struct pOS_ExList
  51. {
  52.   struct pOS_ExNode* lh_Head;
  53.   struct pOS_ExNode* lh_Tail;
  54.   struct pOS_ExNode* lh_TailPred;
  55.   UBYTE              lh_Pad[2];
  56. };
  57.  
  58.  
  59. /****************** Macros *************************************/
  60. #ifdef pOS_DEBUG
  61.  #define ww_LIST(lst) \
  62.    ww.CheckRefPointer(#lst,(APTR)lst); \
  63.    ww.CheckRefPointer("lh_Head",(lst)->lh_Head); \
  64.    ww.CheckRefPointer("lh_TailPred",(lst)->lh_TailPred); \
  65.    ww.Compare("lh_Tail",(lst)->lh_Tail!=NULL);
  66.  
  67.  #define ww_InitNode(nd) \
  68.    (nd)->ln_Succ=NULL; (nd)->ln_Pred=NULL;
  69.  
  70. #else
  71.  #define ww_LIST(lst) ;
  72.  #define ww_InitNode(nd) ;
  73. #endif
  74.  
  75.  
  76.  
  77.  
  78. #endif
  79.