X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fsorter%2Fsort-test.c;h=fcd782a84f238f85291ac86db325c0d7e02f0827;hb=51607e34b594c43ea5b20802bf111b33a4ceff9c;hp=de9bf9a07ea22f4e507a1afa07850ff445a33e3c;hpb=031256ad2e123eec58521f8e3eb9496c197641d2;p=libucw.git diff --git a/ucw/sorter/sort-test.c b/ucw/sorter/sort-test.c index de9bf9a0..fcd782a8 100644 --- a/ucw/sorter/sort-test.c +++ b/ucw/sorter/sort-test.c @@ -15,6 +15,7 @@ #include "ucw/hashfunc.h" #include "ucw/md5.h" #include "ucw/string.h" +#include "ucw/prime.h" #include #include @@ -408,9 +409,7 @@ static int s5_gen(struct s5_pair *p) #define ASORT_PREFIX(x) s5m_##x #define ASORT_KEY_TYPE u32 -#define ASORT_ELT(i) ary[i] -#define ASORT_EXTRA_ARGS , u32 *ary -#include "ucw/arraysort.h" +#include "ucw/sorter/array-simple.h" static void s5_write_merged(struct fastbuf *f, struct key5 **keys, void **data, uns n, void *buf) { @@ -421,7 +420,7 @@ static void s5_write_merged(struct fastbuf *f, struct key5 **keys, void **data, memcpy(&a[m], data[i], 4*keys[i]->cnt); m += keys[i]->cnt; } - s5m_sort(m, a); + s5m_sort(a, m); keys[0]->cnt = m; bwrite(f, keys[0], sizeof(struct key5)); bwrite(f, a, 4*m);