Subversion Repositories f9daq

Rev

Rev 17 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. #ifndef __KLIST_H__
  2. #define __KLIST_H__
  3.  
  4. //-------------------------------------------------------------------------------------------
  5. // klist.h - header parts to maintain a doubly linked list (org microsoft)
  6. //
  7. // Please announce changes and hints to ARW Elektronik
  8. //
  9. //
  10. // $Log: Klist.h,v $
  11. // Revision 1.2  2004/07/24 07:47:46  klaus
  12. // revised, removed wrong license terms
  13. //
  14. //
  15. // what                                                              who    when
  16. // first steps                                                       AR     07.11.1999
  17. //
  18.  
  19. typedef struct item_tag FAR * LIST;
  20. typedef LIST FAR * PLIST;
  21.  
  22. void APIENTRY List_Init(void);
  23. /* MUST BE CALLED BEFORE ANY OF THE OTHER FUNCTIONS. */
  24.  
  25. LIST APIENTRY List_Create(void);
  26. /* Create a list.  It will be initially empty */
  27.  
  28. void APIENTRY List_Destroy(PLIST plst);
  29. /* Destroy *plst.  It does not need to be empty first.
  30. |  All storage directly in the list wil be freed.
  31. */
  32.  
  33. LPVOID APIENTRY List_NewFirst(LIST lst, UINT uLen);
  34. /* Return the address of the place for Len bytes of data in a new
  35. |  item at the start of *plst
  36. */
  37.  
  38. void APIENTRY List_Delete(LPVOID Curs);
  39. /*------------------------------------------------------------------
  40. | Delete the item that Curs identifies.
  41. | This will be only a few (maybe as little as 3) machine instructions
  42. | quicker than DeleteAndNext or DeleteAndPrev but leaves Curs dangling.
  43. | It is therefore NOT usually to be preferred.
  44. | It may be useful when you have a function which returns an LPVOID
  45. | since the argument does not need to be a variable.
  46. |     Trivial example: List_Delete(List_First(L));
  47. -------------------------------------------------------------------*/
  48.  
  49. BOOL APIENTRY List_IsEmpty(LIST lst);
  50. /* Return TRUE if and only if lst is empty */
  51.  
  52. #endif /* __KLIST_H__ */