19 #define _XOPEN_SOURCE 700
44 void sion_swap(
void *target,
void *source,
int size,
int n,
int do_swap)
60 DPRINTF((4,
"sion_swap: swapping %d x %d Bytes in place =%ld\n", n, size, (sion_int32) *iptr));
68 for (i = 0; i < n; i++) {
76 for (i = 0; i < n; i++) {
89 for (i = 0; i < n; i++) {
110 for (i = 0; i < n; i++) {
111 for (j = 0; j < size / 2; j++) {
113 iptr[j] = iptr[size - j - 1];
114 iptr[size - j - 1] = tmp;
119 DPRINTF((4,
"sion_swap: swapped %d x %d Bytes in place =%ld\n", n, size, *optr));
124 memcpy(optr, iptr, size * n);
131 DPRINTF((4,
"sion_swap: swapping %d x %d Bytes\n", n, size));
135 memcpy(optr, iptr, size * n);
138 for (i = 0; i < n; i++) {
147 for (i = 0; i < n; i++) {
158 for (i = 0; i < n; i++) {
173 for (i = 0; i < n; i++) {
174 for (j = 0; j < size; j++) {
175 optr[j] = iptr[size - j - 1];
void sion_swap(void *target, void *source, int size, int n, int do_swap)