#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <errno.h>
#include <time.h>
#include "utils.h"
#include "memalloc.h"
Macros | |
#define | ARRAYLIST_DEFAULT_STEP 1024 |
Functions | |
int | __cmp_int (const void *a, const void *b) |
int | __cmp_double (const void *a, const void *b) |
void | print_error (char *file, char *function, int line, char *message,...) |
pArrayList | arraylist_new (int step) |
pArrayList | arraylist_add (pArrayList pal, void *data) |
void | arraylist_clear (pArrayList pal) |
void | arraylist_trim (pArrayList pal) |
void | arraylist_sort (pArrayList pal, int(*compar)(const void *, const void *)) |
void * | arraylist_get (pArrayList pal, int idx) |
void | arraylist_free (pArrayList pal, freefunc datafree) |
void | arraylist_shuffle (pArrayList pal) |
pLinkedListItem | linkedlistitem_new (void *data) |
void | linkedlistitem_free (pLinkedListItem pitem) |
void | linkedlistitem_dereference (pLinkedListItem pitem) |
pVector | vector_new () |
void | vector_free (pVector pvec, freefunc datafree) |
void | vector_add (pVector pvec, void *data) |
void * | vector_get (pVector pvec, int idx) |
void * | vector_get_by_cmp (pVector pvec, void *data, size_t(*cmp)(const void *, const void *)) |
void | vector_sort (pVector pvec, int(*cmp)(const void *, const void *)) |
void | vector_remove_by_data (pVector pvec, void *data) |
void | vector_dereference_by_data (pVector pvec, void *data) |
pArrayList | vector_to_arraylist (pVector pvec) |
void | vector_rewind (pVector pvec) |
void * | vector_next (pVector pvec) |
pStack | stack_new () |
void | stack_free (pStack pstack) |
void | stack_push (pStack pstack, void *data) |
void * | stack_pop (pStack pstack) |
int | stack_has_items (pStack pstack) |
#define ARRAYLIST_DEFAULT_STEP 1024 |
int __cmp_double | ( | const void * | a, |
const void * | b | ||
) |
int __cmp_int | ( | const void * | a, |
const void * | b | ||
) |
pArrayList arraylist_add | ( | pArrayList | pal, |
void * | data | ||
) |
void arraylist_clear | ( | pArrayList | pal | ) |
void arraylist_free | ( | pArrayList | pal, |
freefunc | datafree | ||
) |
void* arraylist_get | ( | pArrayList | pal, |
int | idx | ||
) |
pArrayList arraylist_new | ( | int | step | ) |
void arraylist_shuffle | ( | pArrayList | pal | ) |
void arraylist_sort | ( | pArrayList | pal, |
int(*)(const void *, const void *) | compar | ||
) |
void arraylist_trim | ( | pArrayList | pal | ) |
void linkedlistitem_dereference | ( | pLinkedListItem | pitem | ) |
void linkedlistitem_free | ( | pLinkedListItem | pitem | ) |
pLinkedListItem linkedlistitem_new | ( | void * | data | ) |
void print_error | ( | char * | file, |
char * | function, | ||
int | line, | ||
char * | message, | ||
... | |||
) |
void stack_free | ( | pStack | pstack | ) |
int stack_has_items | ( | pStack | pstack | ) |
pStack stack_new | ( | ) |
void* stack_pop | ( | pStack | pstack | ) |
void stack_push | ( | pStack | pstack, |
void * | data | ||
) |
void vector_add | ( | pVector | pvec, |
void * | data | ||
) |
void vector_dereference_by_data | ( | pVector | pvec, |
void * | data | ||
) |
void* vector_get | ( | pVector | pvec, |
int | idx | ||
) |
void* vector_get_by_cmp | ( | pVector | pvec, |
void * | data, | ||
size_t(*)(const void *, const void *) | cmp | ||
) |
pVector vector_new | ( | ) |
void* vector_next | ( | pVector | pvec | ) |
void vector_remove_by_data | ( | pVector | pvec, |
void * | data | ||
) |
void vector_rewind | ( | pVector | pvec | ) |
void vector_sort | ( | pVector | pvec, |
int(*)(const void *, const void *) | cmp | ||
) |
pArrayList vector_to_arraylist | ( | pVector | pvec | ) |