-/* this should be rfc822_cpy_adr */
-address_t *rfc822_cpy_adr_real (address_t * addr)
-{
- address_t *p = address_new ();
-
- p->personal = m_strdup(addr->personal);
- p->mailbox = m_strdup(addr->mailbox);
- p->group = addr->group;
- return p;
-}
-
-/* this should be rfc822_cpy_adrlist */
-address_t *rfc822_cpy_adr (address_t * addr)
-{
- address_t *top = NULL, *last = NULL;
-
- for (; addr; addr = addr->next) {
- if (last) {
- last->next = rfc822_cpy_adr_real (addr);
- last = last->next;
- }
- else
- top = last = rfc822_cpy_adr_real (addr);
- }
- return top;
-}
-
-/* append list 'b' to list 'a' and return the last element in the new list */
-address_t *rfc822_append (address_t ** a, address_t * b)
-{
- address_t *tmp = *a;
-
- while (tmp && tmp->next)
- tmp = tmp->next;
- if (!b)
- return tmp;
- if (tmp)
- tmp->next = rfc822_cpy_adr (b);
- else
- tmp = *a = rfc822_cpy_adr (b);
- while (tmp && tmp->next)
- tmp = tmp->next;
- return tmp;
-}