#include <ctype.h>#include <debug.h>#include <random.h>#include <stdlib.h>#include <stdbool.h>Go to the source code of this file.
Functions | |
| int | atoi (const char *s) |
| static int | compare_thunk (const void *a, const void *b, void *aux) |
| void | qsort (void *array, size_t cnt, size_t size, int(*compare)(const void *, const void *)) |
| static void | do_swap (unsigned char *array, size_t a_idx, size_t b_idx, size_t size) |
| static int | do_compare (unsigned char *array, size_t a_idx, size_t b_idx, size_t size, int(*compare)(const void *, const void *, void *aux), void *aux) |
| static void | heapify (unsigned char *array, size_t i, size_t cnt, size_t size, int(*compare)(const void *, const void *, void *aux), void *aux) |
| void | sort (void *array, size_t cnt, size_t size, int(*compare)(const void *, const void *, void *aux), void *aux) |
| void * | bsearch (const void *key, const void *array, size_t cnt, size_t size, int(*compare)(const void *, const void *)) |
| void * | binary_search (const void *key, const void *array, size_t cnt, size_t size, int(*compare)(const void *, const void *, void *aux), void *aux) |
| int atoi | ( | const char * | s | ) |
| void* bsearch | ( | const void * | key, | |
| const void * | array, | |||
| size_t | cnt, | |||
| size_t | size, | |||
| int(*)(const void *, const void *) | compare | |||
| ) |
Definition at line 167 of file stdlib.c.
References binary_search(), and compare_thunk().
Referenced by verify_bsearch().
| static int compare_thunk | ( | const void * | a, | |
| const void * | b, | |||
| void * | aux | |||
| ) | [static] |
| static void heapify | ( | unsigned char * | array, | |
| size_t | i, | |||
| size_t | cnt, | |||
| size_t | size, | |||
| int(*)(const void *, const void *, void *aux) | compare, | |||
| void * | aux | |||
| ) | [static] |
Definition at line 98 of file stdlib.c.
References do_compare(), and do_swap().
Referenced by sort().
Definition at line 59 of file stdlib.c.
References compare_thunk(), and sort().
Referenced by test().
1.5.6