llist.h
Go to the documentation of this file.
00001 #ifndef HEADER_CURL_LLIST_H
00002 #define HEADER_CURL_LLIST_H
00003 /***************************************************************************
00004  *                                  _   _ ____  _
00005  *  Project                     ___| | | |  _ \| |
00006  *                             / __| | | | |_) | |
00007  *                            | (__| |_| |  _ <| |___
00008  *                             \___|\___/|_| \_\_____|
00009  *
00010  * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
00011  *
00012  * This software is licensed as described in the file COPYING, which
00013  * you should have received as part of this distribution. The terms
00014  * are also available at https://curl.haxx.se/docs/copyright.html.
00015  *
00016  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00017  * copies of the Software, and permit persons to whom the Software is
00018  * furnished to do so, under the terms of the COPYING file.
00019  *
00020  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00021  * KIND, either express or implied.
00022  *
00023  ***************************************************************************/
00024 
00025 #include "curl_setup.h"
00026 #include <stddef.h>
00027 
00028 typedef void (*curl_llist_dtor)(void *, void *);
00029 
00030 struct curl_llist_element {
00031   void *ptr;
00032 
00033   struct curl_llist_element *prev;
00034   struct curl_llist_element *next;
00035 };
00036 
00037 struct curl_llist {
00038   struct curl_llist_element *head;
00039   struct curl_llist_element *tail;
00040 
00041   curl_llist_dtor dtor;
00042 
00043   size_t size;
00044 };
00045 
00046 struct curl_llist *Curl_llist_alloc(curl_llist_dtor);
00047 int Curl_llist_insert_next(struct curl_llist *, struct curl_llist_element *,
00048                            const void *);
00049 int Curl_llist_remove(struct curl_llist *, struct curl_llist_element *,
00050                       void *);
00051 size_t Curl_llist_count(struct curl_llist *);
00052 void Curl_llist_destroy(struct curl_llist *, void *);
00053 int Curl_llist_move(struct curl_llist *, struct curl_llist_element *,
00054                     struct curl_llist *, struct curl_llist_element *);
00055 
00056 #endif /* HEADER_CURL_LLIST_H */
00057 


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:05