1 #if !defined(lint) && !defined(DOS)
2 static char rcsid
[] = "$Id: copyaddr.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
6 * ========================================================================
7 * Copyright 2013-2017 Eduardo Chappa
8 * Copyright 2006 University of Washington
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * ========================================================================
19 #include "../pith/headers.h"
20 #include "../pith/copyaddr.h"
24 * Copy the first address in list a and return it in allocated memory.
27 copyaddr(struct mail_address
*a
)
34 new->personal
= cpystr(a
->personal
);
37 new->adl
= cpystr(a
->adl
);
40 new->mailbox
= cpystr(a
->mailbox
);
43 new->host
= cpystr(a
->host
);
53 * Copy the whole list a.
56 copyaddrlist(struct mail_address
*a
)
58 ADDRESS
*new = NULL
, *head
= NULL
, *current
;
60 for(; a
; a
= a
->next
){