+/*----------------------------------------------------------------.
+| If TABLE (and CHECK) appear to be small to be addressed at |
+| DESIRED, grow them. Note that TABLE[DESIRED] is to be used, so |
+| the desired size is at least DESIRED + 1. |
+`----------------------------------------------------------------*/
+
+static void
+table_grow (size_t desired)
+{
+ size_t old_size = table_size;
+
+ while (table_size <= desired)
+ table_size *= 2;
+
+ if (trace_flag)
+ fprintf (stderr, "growing table and check from: %d to %d\n",
+ old_size, table_size);
+
+ table = XREALLOC (table, short, table_size);
+ check = XREALLOC (check, short, table_size);
+
+ for (/* Nothing. */; old_size < table_size; ++old_size)
+ {
+ table[old_size] = 0;
+ check[old_size] = -1;
+ }
+}
+
+