+ if (ctladdr != NULL)
+ ctladdr->q_child = prev;
+ return (prev);
+}
+\f/*
+** ADDRREF -- return pointer to address that references another address.
+**
+** Parameters:
+** a -- address to check.
+** r -- reference to find.
+**
+** Returns:
+** address of node in tree rooted at 'a' that references
+** 'r'.
+** NULL if no such node exists.
+**
+** Side Effects:
+** none.
+*/
+
+ADDRESS *
+addrref(a, r)
+ register ADDRESS *a;
+ register ADDRESS *r;
+{
+ register ADDRESS *q;
+
+ while (a != NULL)
+ {
+ if (a->q_child == r || a->q_sibling == r)
+ return (a);
+ q = addrref(a->q_child, r);
+ if (q != NULL)
+ return (q);
+ a = a->q_sibling;
+ }
+ return (NULL);