Support Watt-32 under Win32.
[platform/upstream/c-ares.git] / ares_llist.h
1 #ifndef __ARES_LLIST_H
2 #define __ARES_LLIST_H
3
4 /* $Id$ */
5
6 /* Copyright 1998 by the Massachusetts Institute of Technology.
7  *
8  * Permission to use, copy, modify, and distribute this
9  * software and its documentation for any purpose and without
10  * fee is hereby granted, provided that the above copyright
11  * notice appear in all copies and that both that copyright
12  * notice and this permission notice appear in supporting
13  * documentation, and that the name of M.I.T. not be used in
14  * advertising or publicity pertaining to distribution of the
15  * software without specific, written prior permission.
16  * M.I.T. makes no representations about the suitability of
17  * this software for any purpose.  It is provided "as is"
18  * without express or implied warranty.
19  */
20
21
22 /* Node definition for circular, doubly-linked list */
23 struct list_node {
24   struct list_node *prev;
25   struct list_node *next;
26   void* data;
27 };
28
29 void ares__init_list_head(struct list_node* head);
30
31 void ares__init_list_node(struct list_node* node, void* d);
32
33 int ares__is_list_empty(struct list_node* head);
34
35 void ares__insert_in_list(struct list_node* new_node,
36                           struct list_node* old_node);
37
38 void ares__remove_from_list(struct list_node* node);
39
40 void ares__swap_lists(struct list_node* head_a,
41                       struct list_node* head_b);
42
43 #endif /* __ARES_LLIST_H */