From: David Champion Date: Tue, 30 Aug 2016 23:30:06 +0000 (-0700) Subject: Moves mutt_copy_list to muttlib.c, where it belongs. X-Git-Tag: neomutt-20160916~9^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d2cbc47be4123709e86177c470cbe1822669448;p=neomutt Moves mutt_copy_list to muttlib.c, where it belongs. --- diff --git a/muttlib.c b/muttlib.c index 8af711ceb..b5bf1c1cb 100644 --- a/muttlib.c +++ b/muttlib.c @@ -330,6 +330,26 @@ void mutt_free_list (LIST **list) } } +LIST *mutt_copy_list (LIST *p) +{ + LIST *t, *r=NULL, *l=NULL; + + for (; p; p = p->next) + { + t = (LIST *) safe_malloc (sizeof (LIST)); + t->data = safe_strdup (p->data); + t->next = NULL; + if (l) + { + r->next = t; + r = r->next; + } + else + l = r = t; + } + return (l); +} + HEADER *mutt_dup_header(HEADER *h) { HEADER *hnew; diff --git a/send.c b/send.c index ecfc2fca4..c73e090d0 100644 --- a/send.c +++ b/send.c @@ -392,26 +392,6 @@ static void process_user_header (ENVELOPE *env) } } -LIST *mutt_copy_list (LIST *p) -{ - LIST *t, *r=NULL, *l=NULL; - - for (; p; p = p->next) - { - t = (LIST *) safe_malloc (sizeof (LIST)); - t->data = safe_strdup (p->data); - t->next = NULL; - if (l) - { - r->next = t; - r = r->next; - } - else - l = r = t; - } - return (l); -} - void mutt_forward_intro (FILE *fp, HEADER *cur) { char buffer[STRING];