| 1637 | */ |
| 1638 | |
| 1639 | static struct link *ListCopy(struct link *orig) |
| 1640 | { |
| 1641 | struct link *new_malloc; |
| 1642 | struct link *head; |
| 1643 | size_t len; |
| 1644 | |
| 1645 | head= NULL; |
| 1646 | while (orig != NULL) |
| 1647 | { |
| 1648 | len= strlen(orig->str); |
| 1649 | new_malloc= (struct link *) DbugMalloc(sizeof(struct link)+len); |
| 1650 | memcpy(new_malloc->str, orig->str, len); |
| 1651 | new_malloc->str[len]= 0; |
| 1652 | new_malloc->flags=orig->flags; |
| 1653 | new_malloc->next_link= head; |
| 1654 | head= new_malloc; |
| 1655 | orig= orig->next_link; |
| 1656 | } |
| 1657 | return head; |
| 1658 | } |
| 1659 | |
| 1660 | /* |
| 1661 | * FUNCTION |
no test coverage detected