[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r9502 - in gnunet/src: include util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r9502 - in gnunet/src: include util |
Date: |
Fri, 13 Nov 2009 14:44:58 -0700 |
Author: durner
Date: 2009-11-13 14:44:58 -0700 (Fri, 13 Nov 2009)
New Revision: 9502
Modified:
gnunet/src/include/gnunet_container_lib.h
gnunet/src/util/container_slist.c
Log:
GNUNET_CONTAINER_slist_append
Modified: gnunet/src/include/gnunet_container_lib.h
===================================================================
--- gnunet/src/include/gnunet_container_lib.h 2009-11-13 20:58:20 UTC (rev
9501)
+++ gnunet/src/include/gnunet_container_lib.h 2009-11-13 21:44:58 UTC (rev
9502)
@@ -913,6 +913,15 @@
/**
+ * Append a singly linked list to another
+ * @param dst list to append to
+ * @param src source
+ */
+void
+GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst, struct
GNUNET_CONTAINER_SList *src);
+
+
+/**
* Create a new singly linked list
* @return the new list
*/
Modified: gnunet/src/util/container_slist.c
===================================================================
--- gnunet/src/util/container_slist.c 2009-11-13 20:58:20 UTC (rev 9501)
+++ gnunet/src/util/container_slist.c 2009-11-13 21:44:58 UTC (rev 9502)
@@ -146,6 +146,29 @@
/**
+ * Append a singly linked list to another
+ * @param dst list to append to
+ * @param src source
+ */
+void
+GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst, struct
GNUNET_CONTAINER_SList *src)
+{
+ struct GNUNET_CONTAINER_SList_Iterator *i;
+
+ for (i = GNUNET_CONTAINER_slist_begin (src); GNUNET_CONTAINER_slist_end (i)
!=
+ GNUNET_YES; GNUNET_CONTAINER_slist_next (i))
+
+ {
+ GNUNET_CONTAINER_slist_add (dst,
+ (i->elem->disp == GNUNET_CONTAINER_SLIST_DISPOSITION_STATIC) ?
GNUNET_CONTAINER_SLIST_DISPOSITION_STATIC
+ : GNUNET_CONTAINER_SLIST_DISPOSITION_TRANSIENT, i->elem->elem,
+ i->elem->len);
+ }
+ GNUNET_CONTAINER_slist_iter_destroy (i);
+}
+
+
+/**
* Create a new singly linked list
* @return the new list
*/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r9502 - in gnunet/src: include util,
gnunet <=