Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: voidlist.h
  8. //
  9. // Contents: definitions for list functions
  10. //
  11. // History: 01-Jan-2000 reidk created
  12. //
  13. //--------------------------------------------------------------------------
  14. #ifndef __VOIDLIST_H
  15. #define __VOIDLIST_H
  16. #ifdef __cplusplus
  17. extern "C"
  18. {
  19. #endif
  20. typedef struct LIST_NODE_
  21. {
  22. void *pNext;
  23. void *pElement;
  24. } LIST_NODE, *PLIST_NODE;
  25. typedef struct LIST_
  26. {
  27. LIST_NODE *pHead;
  28. LIST_NODE *pTail;
  29. DWORD dwNumNodes;
  30. } LIST, *PLIST;
  31. void
  32. LIST_Initialize(LIST *pList);
  33. PLIST_NODE
  34. LIST_AddHead(LIST *pList, void *pElement);
  35. PLIST_NODE
  36. LIST_AddTail(LIST *pList, void *pElement);
  37. BOOL
  38. LIST_RemoveElement(LIST *pList, void *pElement);
  39. BOOL
  40. LIST_RemoveAll(LIST *pList);
  41. PLIST_NODE
  42. LIST_GetFirst(LIST *pList);
  43. PLIST_NODE
  44. LIST_GetNext(PLIST_NODE pNode);
  45. void *
  46. LIST_GetElement(PLIST_NODE pNode);
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif // __VOIDLIST_H