PandA-2024.02
examples
function_pointers
qsort
glibc
test-specialized.c
Go to the documentation of this file.
1
typedef
unsigned
int
size_t
;
2
3
typedef
int (*
__compar_d_fn_t
)(
void
*,
void
*,
void
*);
4
5
#include "
aggregate.h
"
6
7
//#include "qsort.c"
8
void
9
_quicksort
(
void
*
const
pbase,
size_t
total_elems,
size_t
size,
10
int
(*cmp)(
const
void
*,
const
void
*,
void
*),
void
*
arg
);
11
//#include "less.c"
12
int
less
(
void
* a,
void
* b,
void
* notUsed);
13
14
void
test
(
float
*
const
pbase,
size_t
total_elems)
15
{
16
_quicksort
(pbase, (
sizeof
(
float
) * total_elems) /
sizeof
(
struct
aggregate
),
sizeof
(
struct
aggregate
), 0, (
void
*)0);
17
}
less
int less(const void *a, const void *b)
Definition:
less.c:4
test
int test(float *key, float *base, size_t nmemb)
Definition:
test-specialized.c:10
_quicksort
void _quicksort(void *const pbase, size_t total_elems, size_t size, int(*cmp)(const void *, const void *, void *), void *arg)
Definition:
qsort.c:87
__compar_d_fn_t
int(* __compar_d_fn_t)(void *, void *, void *)
Definition:
test-specialized.c:3
test_panda.arg
arg
Definition:
test_panda.py:805
aggregate.h
size_t
unsigned int size_t
Definition:
test-specialized.c:1
aggregate
Definition:
aggregate.h:4
Generated on Mon Feb 12 2024 13:02:49 for PandA-2024.02 by
1.8.13