]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/binheap-test.c
xtypes: Added FIXME with possible segfault.
[libucw.git] / ucw / binheap-test.c
index 9589b07bf4aa61683d77aca7a17ab9721c9718af..8d95367bc5ef263b5a1c8019ad60968e40900449 100644 (file)
@@ -7,7 +7,7 @@
  *     of the GNU Lesser General Public License.
  */
 
-#include "ucw/lib.h"
+#include <ucw/lib.h>
 
 #include <stdio.h>
 #include <string.h>
 #define BH_WANT_INSERT
 #define BH_WANT_FINDMIN
 #define BH_WANT_DELETEMIN
-#include "ucw/binheap-node.h"
+#include <ucw/binheap-node.h>
 
 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 <ucw/binheap.h>
 
 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++;