]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/binheap.h
Merge branch 'master' into table
[libucw.git] / ucw / binheap.h
index 42253e1b96053ce5c0871e454f01b1ef5f2fd2e3..f367899c3525e78945e43d143e66ee772e079a85 100644 (file)
@@ -132,6 +132,7 @@ BH_PREFIX(insert)(BH_HEAP *heap, BH_NODE *a)
 
   sh.first_son = a;
   a->first_son = a->last_son = a->next_sibling = NULL;
 
   sh.first_son = a;
   a->first_son = a->last_son = a->next_sibling = NULL;
+  a->order = 0;
   BH_PREFIX(merge)(&heap->root, &sh);
 }
 #endif
   BH_PREFIX(merge)(&heap->root, &sh);
 }
 #endif
@@ -181,7 +182,7 @@ BH_PREFIX(init)(BH_HEAP *heap)
 #define BH_FOR_ALL(bh_px, bh_heap, bh_var)     \
 do {                                           \
   struct bh_node *bh_stack[32];                        \
 #define BH_FOR_ALL(bh_px, bh_heap, bh_var)     \
 do {                                           \
   struct bh_node *bh_stack[32];                        \
-  uns bh_sp = 0;                               \
+  uint bh_sp = 0;                              \
   if (bh_stack[0] = (bh_heap)->root.first_son)  \
     bh_sp++;                                   \
   while (bh_sp) {                              \
   if (bh_stack[0] = (bh_heap)->root.first_son)  \
     bh_sp++;                                   \
   while (bh_sp) {                              \