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 2006 University of Washington
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * ========================================================================
18 #include "../pith/headers.h"
19 #include "../pith/copyaddr.h"
23 * Copy the first address in list a and return it in allocated memory.
26 copyaddr(struct mail_address
*a
)
33 new->personal
= cpystr(a
->personal
);
36 new->adl
= cpystr(a
->adl
);
39 new->mailbox
= cpystr(a
->mailbox
);
42 new->host
= cpystr(a
->host
);
52 * Copy the whole list a.
55 copyaddrlist(struct mail_address
*a
)
57 ADDRESS
*new = NULL
, *head
= NULL
, *current
;
59 for(; a
; a
= a
->next
){