quakeforge/ruamoko/lib/stdlib.r
Bill Currie 5ca792c40e [ruamoko] Add some stdlib function wrappers
For now, just bsearch (normal and fuzzy), qsort, and prefixsum (not in
C's stdlib that I know of, but I think having native implementations of
float and int prefix sums will be useful.
2021-06-01 18:53:53 +09:00

11 lines
422 B
R

#include <stdlib.h>
void *bsearch (void *key, void *array, int nmemb, int size,
int (*compare) (void *a, void *b)) = #0;
void *fbsearch (void *key, void *array, int nmemb, int size,
int (*compare) (void *a, void *b)) = #0;
void *qsort (void *array, int nmemb, int size,
int (*compare) (void *a, void *b)) = #0;
void prefixsum (int *array, int count) = #0;
void prefixsum (float *array, int count) = #0;