table_sort (struct hash_table *table, symbol ***sorted)
{
  aver (!*sorted);
  size_t count = hash_get_n_entries (table);
  *sorted = xnmalloc (count + 1, sizeof **sorted);
  hash_get_entries (table, (void**)*sorted, count);
  qsort (*sorted, count, sizeof **sorted, symbol_cmp);
  (*sorted)[count] = NULL;
}
table_sort (struct hash_table *table, symbol ***sorted)
{
  aver (!*sorted);
  size_t count = hash_get_n_entries (table);
  *sorted = xnmalloc (count + 1, sizeof **sorted);
  hash_get_entries (table, (void**)*sorted, count);
  qsort (*sorted, count, sizeof **sorted, symbol_cmp);
  (*sorted)[count] = NULL;
}