MACSio  0.9
Multi-purpose, Application-Centric, Scalable I/O Proxy App
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
arraylist.h File Reference

Go to the source code of this file.

Data Structures

struct  array_list
 

Macros

#define ARRAY_LIST_DEFAULT_SIZE   32
 

Typedefs

typedef void( array_list_free_fn )(void *data)
 

Functions

struct array_listarray_list_new (array_list_free_fn *free_fn)
 
void array_list_free (struct array_list *al)
 
void * array_list_get_idx (struct array_list *al, int i)
 
int array_list_put_idx (struct array_list *al, int i, void *data)
 
int array_list_add (struct array_list *al, void *data)
 
int array_list_length (struct array_list *al)
 
void array_list_sort (struct array_list *arr, int(*compar)(const void *, const void *))
 

Data Structure Documentation

struct array_list

Definition at line 23 of file arraylist.h.

Data Fields
void ** array
int length
int size
array_list_free_fn * free_fn

Macro Definition Documentation

#define ARRAY_LIST_DEFAULT_SIZE   32

Definition at line 19 of file arraylist.h.

Typedef Documentation

typedef void( array_list_free_fn)(void *data)

Definition at line 21 of file arraylist.h.

Function Documentation

struct array_list* array_list_new ( array_list_free_fn free_fn)

Definition at line 27 of file arraylist.c.

void array_list_free ( struct array_list al)

Definition at line 44 of file arraylist.c.

void* array_list_get_idx ( struct array_list al,
int  i 
)

Definition at line 54 of file arraylist.c.

int array_list_put_idx ( struct array_list al,
int  i,
void *  data 
)

Definition at line 75 of file arraylist.c.

int array_list_add ( struct array_list al,
void *  data 
)

Definition at line 85 of file arraylist.c.

int array_list_length ( struct array_list al)

Definition at line 98 of file arraylist.c.

void array_list_sort ( struct array_list arr,
int(*)(const void *, const void *)  compar 
)

Definition at line 91 of file arraylist.c.