-/* Ascending numeric compare of values. */
-static int
-compare_value_numeric_a (const void *a_, const void *b_,
- const void *vf_ UNUSED)
-{
- const struct freq *a = a_;
- const struct freq *b = b_;
-
- if (a->value.f > b->value.f)
- return 1;
- else if (a->value.f < b->value.f)
- return -1;
- else
- return 0;
-}
-
-/* Ascending string compare of values. */
-static int
-compare_value_alpha_a (const void *a_, const void *b_, const void *vf_)
-{
- const struct freq *a = a_;
- const struct freq *b = b_;
- const struct var_freqs *vf = vf_;
-
- return value_compare_3way (&a->value, &b->value, vf->width);
-}
-
-/* Descending numeric compare of values. */
-static int
-compare_value_numeric_d (const void *a, const void *b, const void *vf_ UNUSED)
-{
- return -compare_value_numeric_a (a, b, vf_);
-}
-
-/* Descending string compare of values. */
-static int
-compare_value_alpha_d (const void *a, const void *b, const void *vf_)
-{
- return -compare_value_alpha_a (a, b, vf_);
-}
-
-/* Ascending numeric compare of frequency;
- secondary key on ascending numeric value. */
-static int
-compare_freq_numeric_a (const void *a_, const void *b_, const void *vf_ UNUSED)
-{
- const struct freq *a = a_;
- const struct freq *b = b_;
-
- if (a->count > b->count)
- return 1;
- else if (a->count < b->count)
- return -1;
-
- if (a->value.f > b->value.f)
- return 1;
- else if (a->value.f < b->value.f)
- return -1;
- else
- return 0;
-}
-
-/* Ascending numeric compare of frequency;
- secondary key on ascending string value. */
-static int
-compare_freq_alpha_a (const void *a_, const void *b_, const void *vf_)
-{
- const struct freq *a = a_;
- const struct freq *b = b_;
- const struct var_freqs *vf = vf_;
-
- if (a->count > b->count)
- return 1;
- else if (a->count < b->count)
- return -1;
- else
- return value_compare_3way (&a->value, &b->value, vf->width);
-}
-
-/* Descending numeric compare of frequency;
- secondary key on ascending numeric value. */
-static int
-compare_freq_numeric_d (const void *a_, const void *b_, const void *vf_ UNUSED)
-{
- const struct freq *a = a_;
- const struct freq *b = b_;
-
- if (a->count > b->count)
- return -1;
- else if (a->count < b->count)
- return 1;
-
- if (a->value.f > b->value.f)
- return 1;
- else if (a->value.f < b->value.f)
- return -1;
- else
- return 0;
-}
-
-/* Descending numeric compare of frequency;
- secondary key on ascending string value. */
-static int
-compare_freq_alpha_d (const void *a_, const void *b_, const void *vf_)
-{
- const struct freq *a = a_;
- const struct freq *b = b_;
- const struct var_freqs *vf = vf_;
-
- if (a->count > b->count)
- return -1;
- else if (a->count < b->count)
- return 1;
- else
- return value_compare_3way (&a->value, &b->value, vf->width);
-}