PandA-2024.02
documentation
tutorial_date_2022
01-introduction
Exercise7
test.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
),
less
, (
void
*)0);
17
}
test
void test(float *const pbase, size_t total_elems)
Definition:
test.c:14
_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.c:3
test_panda.arg
arg
Definition:
test_panda.py:805
size_t
unsigned int size_t
Definition:
test.c:1
aggregate.h
aggregate
Definition:
aggregate.h:4
less
int less(void *a, void *b, void *notUsed)
Definition:
less.c:4
Generated on Mon Feb 12 2024 13:02:47 for PandA-2024.02 by
1.8.13