2 * ========================================================================
3 * Copyright 2013-2022 Eduardo Chappa
4 * Copyright 2006 University of Washington
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * ========================================================================
15 #include "../pith/headers.h"
16 #include "../pith/copyaddr.h"
20 * Copy the first address in list a and return it in allocated memory.
23 copyaddr(struct mail_address
*a
)
30 new->personal
= cpystr(a
->personal
);
33 new->adl
= cpystr(a
->adl
);
36 new->mailbox
= cpystr(a
->mailbox
);
39 new->host
= cpystr(a
->host
);
49 * Copy the whole list a.
52 copyaddrlist(struct mail_address
*a
)
54 ADDRESS
*new = NULL
, *head
= NULL
, *current
= NULL
;
56 for(; a
; a
= a
->next
){