X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Fsorter%2Fdebug%2Fretros.c;h=7325de7529721d1af36c99a3706fd9b1fc8009a1;hb=d9c55a4d021b4a317a25f14f89468d62592aae0b;hp=7bb692f6bead3094d3d3b06a6ea8a9088d3a0042;hpb=44feaeb65636c36e71fa1fd79710aa746867c17e;p=libucw.git diff --git a/ucw/sorter/debug/retros.c b/ucw/sorter/debug/retros.c index 7bb692f6..7325de75 100644 --- a/ucw/sorter/debug/retros.c +++ b/ucw/sorter/debug/retros.c @@ -4,10 +4,11 @@ * (c) 2007--2008 Martin Mares */ -#include "sherlock/sherlock.h" -#include "ucw/getopt.h" -#include "ucw/md5.h" -#include "ucw/heap.h" +#include +#include +#include +#include +#include #include #include @@ -51,13 +52,13 @@ static int comp_ind(const void *x, const void *y) #define ASORT_ELT(i) a[i].key #define ASORT_SWAP(i,j) do { struct elt t=a[i]; a[i]=a[j]; a[j]=t; } while (0) #define ASORT_EXTRA_ARGS , struct elt *a -#include "ucw/sorter/array-simple.h" +#include #define ASORT_PREFIX(x) asi_##x #define ASORT_KEY_TYPE u32 #define ASORT_ELT(i) ind[i]->key #define ASORT_SWAP(i,j) do { struct elt *t=ind[i]; ind[i]=ind[j]; ind[j]=t; } while (0) -#include "ucw/sorter/array-simple.h" +#include static void r1_sort(void) { @@ -622,7 +623,7 @@ static void heapsort(void) HEAP_INIT(struct elt, heap, n, H_LESS, HEAP_SWAP); uns nn = n; while (nn) - HEAP_DELMIN(struct elt, heap, nn, H_LESS, HEAP_SWAP); + HEAP_DELETE_MIN(struct elt, heap, nn, H_LESS, HEAP_SWAP); #undef H_LESS } @@ -633,7 +634,7 @@ static void heapsort_ind(void) HEAP_INIT(struct elt *, heap, n, H_LESS, HEAP_SWAP); uns nn = n; while (nn) - HEAP_DELMIN(struct elt *, heap, nn, H_LESS, HEAP_SWAP); + HEAP_DELETE_MIN(struct elt *, heap, nn, H_LESS, HEAP_SWAP); #undef H_LESS } @@ -719,7 +720,7 @@ int main(int argc, char **argv) for (uns i=0; i