-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharrayList.h
33 lines (27 loc) · 967 Bytes
/
arrayList.h
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
#ifndef SEMESTRALKA_ARRAYLIST_H
#define SEMESTRALKA_ARRAYLIST_H
#define INCREMENT 2
#define FAILURE 0
#define SUCCESS 1
/* ____________________________________________________________________________
Structures and Datatypes
____________________________________________________________________________
*/
typedef unsigned int uint;
typedef struct {
uint listSize;
int itemSize;
void **data;
uint filledItems;
} arrayList;
/* ____________________________________________________________________________
Function Prototypes
____________________________________________________________________________
*/
arrayList *createArrayList(int listSize, int itemSize);
int arrayListAdd(arrayList *list, void *pointer);
int arrayListExpand(arrayList *list, int increment);
void *arrayListGetPointer(arrayList *list, int index);
void sortArrayList(arrayList *list);
void freeArrayList(arrayList **list);
#endif