Lines Matching defs:heap_len
477 int heap_len; /* number of elements in the heap */
2528 * one less element. Updates heap and heap_len.
2533 s->heap[SMALLEST] = s->heap[s->heap_len--]; \
2557 while (j <= s->heap_len) {
2559 if (j < s->heap_len &&
2726 s->heap_len = 0, s->heap_max = HEAP_SIZE;
2730 s->heap[++(s->heap_len)] = max_code = n;
2742 while (s->heap_len < 2) {
2743 node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
2751 /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
2754 for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
2781 } while (s->heap_len >= 2);