-}
-
-/* Discards the state for an incomplete iteration begun by
- val_labs_first() or val_labs_first_sorted(). */
-void
-val_labs_done (struct val_labs_iterator **ip)
-{
- struct val_labs_iterator *i;
-
- assert (ip != NULL);
- assert (*ip != NULL);
-
- i = *ip;
- free (i->labels);
- free (i);
- *ip = NULL;
-}
-\f
-/* Compares two value labels and returns a strcmp()-type result. */
-int
-compare_int_val_lab (const void *a_, const void *b_, void *vls_)
-{
- const struct int_val_lab *a = a_;
- const struct int_val_lab *b = b_;
- const struct val_labs *vls = vls_;
-
- if (vls->width == 0)
- return a->value.f < b->value.f ? -1 : a->value.f > b->value.f;
- else
- return memcmp (a->value.s, b->value.s, vls->width);
-}
-
-/* Hash a value label. */
-unsigned
-hash_int_val_lab (const void *vl_, void *vls_)
-{
- const struct int_val_lab *vl = vl_;
- const struct val_labs *vls = vls_;
-
- if (vls->width == 0)
- return hsh_hash_double (vl->value.f);
- else
- return hsh_hash_bytes (vl->value.s, sizeof vl->value.s);
-}
-
-/* Free a value label. */
-void
-free_int_val_lab (void *vl_, void *vls_ UNUSED)
-{
- struct int_val_lab *vl = vl_;
-
- atom_destroy (vl->label);
- free (vl);