-/* return the next larger power of 2. */
-static int
-to_pow2 (int i)
-{
- static const unsigned int pow2[] = {
- 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024,
- 2048, 4096, 8192, 16384, 32768, 65536 };
- int j;
- for (j = 0; j < countof(pow2); j++)
- if (pow2[j] >= i) return pow2[j];
- abort(); /* too big! */
-}
-
-