27 typedef int (*qTypeGeneric_CompareFcn_t)(
const void *,
const void *,
void * );
28 typedef int (*qTypeGeneric_ForEachFcn_t)( int,
void *,
void * );
70 qTypeGeneric_CompareFcn_t cmp,
116 const void *
const ref );
158 qTypeGeneric_CompareFcn_t compar,
201 qTypeGeneric_CompareFcn_t compar,
236 qTypeGeneric_ForEachFcn_t f,
void * qTypeGeneric_LSearch(const void *key, const void *pbase, const size_t n, const size_t size, qTypeGeneric_CompareFcn_t compar, void *arg)
Performs a linear search over an array of n elements pointed to by pbase for an element that matches ...
Definition qtypegeneric.c:264
void * qTypeGeneric_Set(void *const pbase, const size_t size, const size_t n, const void *const ref)
Set the data pointed by ref to every element of the array pointed by pbase. The array contains n elem...
Definition qtypegeneric.c:242
void * qTypeGeneric_BSearch(const void *key, const void *pbase, const size_t n, const size_t size, qTypeGeneric_CompareFcn_t compar, void *arg)
Performs a binary search over an array of n elements pointed to by pbase for an element that matches ...
Definition qtypegeneric.c:292
void qTypeGeneric_Sort(void *const pbase, size_t n, size_t size, qTypeGeneric_CompareFcn_t cmp, void *arg)
Sorts the given array pointed to by pbase in ascending order. The array contains n elements of size b...
Definition qtypegeneric.c:49
int qTypeGeneric_ForEach(void *pbase, const size_t size, const size_t n, qTypeGeneric_ForEachFcn_t f, const bool dir, void *arg)
Iterates n elements of the array pointed to by pbase. The size of each element is specified by size....
Definition qtypegeneric.c:331
void qTypeGeneric_Swap(void *const x, void *const y, size_t n)
Swaps the data pointed by x and y.
Definition qtypegeneric.c:21
void qTypeGeneric_Rotate(void *const pbase, const size_t size, const size_t n, const int k)
Rotates k elements of the array pointed to by pbase. The array contains n elements of size bytes....
Definition qtypegeneric.c:217
void qTypeGeneric_Reverse(void *const pbase, const size_t size, const size_t init, const size_t end)
Reverse the given array pointed to by pbase. Operation takes place on the portion of the array that s...
Definition qtypegeneric.c:197