summaryrefslogtreecommitdiff
path: root/protocols/SkypeClassic/src/memlist.h
blob: 7c147d37ebf18df6a5f214966f372f8a1386814f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef __MEMLIST_H__
#define __MEMLIST_H__

// Optional for programs linked against CRT:
// Remove this if you want a proper plain WIN32-App
//#include <stdlib.h>

struct _tagLIST;
typedef struct _tagLIST TYP_LIST;

TYP_LIST *List_Init(unsigned int uiCapacity);
void List_Exit(TYP_LIST *pstHandle);
BOOL List_Push(TYP_LIST *pstHandle, void *pItem);
void *List_Pop (TYP_LIST *pstHandle);
BOOL List_InsertElementAt(TYP_LIST *pstHandle, void *pItem, unsigned int uiPos);
void *List_RemoveElementAt(TYP_LIST *pstHandle, unsigned int uiPos);
unsigned int List_Count(TYP_LIST *pstHandle);
void *List_ElementAt(TYP_LIST *pstHandle,unsigned int uiPos);
void *List_Top(TYP_LIST *pstHandle);
void List_FreeElements(TYP_LIST *pstHandle);
BOOL List_BinarySearch(TYP_LIST *hPList,
	int (*pPFunc)(const void *pstPElement,const void *pstPToFind),
	const void *pstPToFind,int *piPToInsert);
BOOL	List_InsertSort(TYP_LIST *hPList,
	int (*pPFunc)(const void *pstPElement,const void *pstPToFind),
	void *pItem);

//#ifdef _INC_STDLIB
void List_Sort(TYP_LIST *pstHandle, int (*pFunc)(const void*,const void*));
/*#else
#undef RtlMoveMemory
NTSYSAPI
VOID
NTAPI
RtlMoveMemory (
   VOID UNALIGNED *Destination,
   CONST VOID UNALIGNED *Source,
   SIZE_T Length
   );

#endif*/

#endif