]> granicus.if.org Git - neomutt/commitdiff
Moves mutt_copy_list to muttlib.c, where it belongs.
authorDavid Champion <dgc@bikeshed.us>
Tue, 30 Aug 2016 23:30:06 +0000 (16:30 -0700)
committerRichard Russon <rich@flatcap.org>
Tue, 13 Sep 2016 15:15:01 +0000 (16:15 +0100)
muttlib.c
send.c

index 8af711ceb93e50d4c0c6ea61c9996305a03e5769..b5bf1c1cbd60e39f2a0adb6c84cf3fe80d4bea38 100644 (file)
--- 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 ecfc2fca4317d299138bf195cca6b9f1a2c9c54a..c73e090d0a01e0130eef2f25267e959d5d21fd71 100644 (file)
--- 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];