summaryrefslogtreecommitdiff
path: root/lib/llist.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-06-24 07:43:48 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-06-24 07:43:48 +0000
commitc39858aac0584716282dcb097ce9d972b43dbcb2 (patch)
treed61866d14e3dd56b0337652a7fddec69fb8f4e90 /lib/llist.c
parent818aed35e2f7c1602333c0b2ecc0444272966cc7 (diff)
downloadcurl-c39858aac0584716282dcb097ce9d972b43dbcb2.tar.gz
Source cleanups. The major one being that we now _always_ use a Curl_addrinfo
linked list for name resolved data, even on hosts/systems with only IPv4 stacks as this simplifies a lot of code.
Diffstat (limited to 'lib/llist.c')
-rw-r--r--lib/llist.c65
1 files changed, 8 insertions, 57 deletions
diff --git a/lib/llist.c b/lib/llist.c
index 2f059991d..961848692 100644
--- a/lib/llist.c
+++ b/lib/llist.c
@@ -1,8 +1,8 @@
/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
@@ -10,7 +10,7 @@
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
- *
+ *
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
@@ -32,7 +32,7 @@
/* this must be the last include file */
#include "memdebug.h"
-void
+void
Curl_llist_init(curl_llist *l, curl_llist_dtor dtor)
{
l->size = 0;
@@ -90,36 +90,7 @@ Curl_llist_insert_next(curl_llist *list, curl_llist_element *e, const void *p)
return 1;
}
-#if 0
-int
-Curl_llist_insert_prev(curl_llist *list, curl_llist_element *e, const void *p)
-{
- curl_llist_element *ne;
-
- ne = (curl_llist_element *) malloc(sizeof(curl_llist_element));
- ne->ptr = (void *) p;
- if (list->size == 0) {
- list->head = ne;
- list->head->prev = NULL;
- list->head->next = NULL;
- list->tail = ne;
- } else {
- ne->next = e;
- ne->prev = e->prev;
- if (e->prev)
- e->prev->next = ne;
- else
- list->head = ne;
- e->prev = ne;
- }
-
- ++list->size;
-
- return 1;
-}
-#endif
-
-int
+int
Curl_llist_remove(curl_llist *list, curl_llist_element *e, void *user)
{
if (e == NULL || list->size == 0)
@@ -147,27 +118,7 @@ Curl_llist_remove(curl_llist *list, curl_llist_element *e, void *user)
return 1;
}
-#if 0
-int
-Curl_llist_remove_next(curl_llist *list, curl_llist_element *e, void *user)
-{
- return Curl_llist_remove(list, e->next, user);
-}
-
-int
-Curl_llist_remove_prev(curl_llist *list, curl_llist_element *e, void *user)
-{
- return Curl_llist_remove(list, e->prev, user);
-}
-
-size_t
-Curl_llist_count(curl_llist *list)
-{
- return list->size;
-}
-#endif
-
-void
+void
Curl_llist_destroy(curl_llist *list, void *user)
{
if(list) {