X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fbinheap-test.c;h=8d95367bc5ef263b5a1c8019ad60968e40900449;hb=9c43db5f35819ce787a79915aacb1840a98fdff4;hp=9589b07bf4aa61683d77aca7a17ab9721c9718af;hpb=a4fe009d3366b0a3e119713b0ecc7fc0070efdfa;p=libucw.git diff --git a/ucw/binheap-test.c b/ucw/binheap-test.c index 9589b07b..8d95367b 100644 --- a/ucw/binheap-test.c +++ b/ucw/binheap-test.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#include "ucw/lib.h" +#include #include #include @@ -16,25 +16,25 @@ #define BH_WANT_INSERT #define BH_WANT_FINDMIN #define BH_WANT_DELETEMIN -#include "ucw/binheap-node.h" +#include struct item { struct bh_node n; - uns key; + uint key; }; -static inline uns bht_key(struct bh_node *n) +static inline uint bht_key(struct bh_node *n) { return ((struct item *)n)->key; } -static inline uns bht_less(struct bh_node *a, struct bh_node *b) +static inline uint bht_less(struct bh_node *a, struct bh_node *b) { return bht_key(a) < bht_key(b); } static void -bht_do_dump(struct bh_node *a, struct bh_node *expected_last, uns offset) +bht_do_dump(struct bh_node *a, struct bh_node *expected_last, uint offset) { if (!a) return; @@ -52,11 +52,11 @@ bht_dump(struct bh_heap *h) bht_do_dump(b, b->last_son, 1); } -#include "ucw/binheap.h" +#include int main(void) { - uns i; + uint i; struct bh_heap h; #define N 1048576 #define K(i) ((259309*i+1009)%N) @@ -73,7 +73,7 @@ int main(void) } // bht_dump(&h); ASSERT(bht_key(bht_findmin(&h)) == 0); - uns cnt = 0; + uint cnt = 0; BH_FOR_ALL(bht_, &h, a) { cnt++;