-
-/* Compares two value labels and returns a strcmp()-type result. */
-int
-val_lab_cmp (const void *a, const void *b, void *param)
-{
- if ((int) param)
- return strncmp (((struct value_label *) a)->v.s,
- ((struct value_label *) b)->v.s,
- (int) param);
- else
- {
- int temp = (((struct value_label *) a)->v.f
- - ((struct value_label *) b)->v.f);
- if (temp > 0)
- return 1;
- else if (temp < 0)
- return -1;
- else
- return 0;
- }
-}
-
-/* Callback function to increment the reference count for a value
- label. */
-void *
-inc_ref_count (void *pv, void *param unused)
-{
- ((struct value_label *) pv)->ref_count++;
- return pv;
-}
-
-/* Copy the avl tree of value labels and return a pointer to the
- copy. */
-avl_tree *
-copy_value_labels (avl_tree *src)
-{
- avl_tree *dest;
-
- if (src == NULL)
- return NULL;
- dest = avl_copy (NULL, src, inc_ref_count);
-
- return dest;
-}