PandA-2024.02
|
#include <limits.h>
#include <stdlib.h>
Go to the source code of this file.
Data Structures | |
struct | stack_node |
Macros | |
#define | SWAP(a, b, size) |
#define | MAX_THRESH 4 |
#define | STACK_SIZE (CHAR_BIT * sizeof(size_t)) |
#define | PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top)) |
#define | POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi))) |
#define | STACK_NOT_EMPTY (stack < top) |
#define | min(x, y) ((x) < (y) ? (x) : (y)) |
Functions | |
void | _quicksort (void *const pbase, size_t total_elems, size_t size, int(*cmp)(const void *, const void *, void *), void *arg) |
#define MAX_THRESH 4 |
Definition at line 42 of file qsort.c.
Referenced by _quicksort().
Referenced by _quicksort().
Definition at line 58 of file qsort.c.
Referenced by _quicksort().
Definition at line 57 of file qsort.c.
Referenced by _quicksort().
Definition at line 59 of file qsort.c.
Referenced by _quicksort().
#define STACK_SIZE (CHAR_BIT * sizeof(size_t)) |
Definition at line 56 of file qsort.c.
Referenced by _quicksort().
#define SWAP | ( | a, | |
b, | |||
size | |||
) |
Definition at line 27 of file qsort.c.
Referenced by _quicksort().
void _quicksort | ( | void *const | pbase, |
size_t | total_elems, | ||
size_t | size, | ||
int(*)(const void *, const void *, void *) | cmp, | ||
void * | arg | ||
) |
Definition at line 87 of file qsort.c.
References MAX_THRESH, min, NULL, POP, PUSH, STACK_NOT_EMPTY, STACK_SIZE, SWAP, and top().
Referenced by test().