|  |  |  | Camel Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
                    CamelDList;
                    CamelDListNode;
#define             CAMEL_DLIST_INITIALISER             (l)
void                camel_dlist_init                    (CamelDList *v);
CamelDListNode *    camel_dlist_addhead                 (CamelDList *l,
                                                         CamelDListNode *n);
CamelDListNode *    camel_dlist_addtail                 (CamelDList *l,
                                                         CamelDListNode *n);
CamelDListNode *    camel_dlist_remove                  (CamelDListNode *n);
CamelDListNode *    camel_dlist_remhead                 (CamelDList *l);
CamelDListNode *    camel_dlist_remtail                 (CamelDList *l);
gint                camel_dlist_empty                   (CamelDList *l);
gint                camel_dlist_length                  (CamelDList *l);
                    CamelSListNode;
                    CamelSList;
#define             CAMEL_SLIST_INITIALISER             (l)
void                camel_slist_init                    (CamelSList *l);
CamelSListNode *    camel_slist_addhead                 (CamelSList *l,
                                                         CamelSListNode *n);
CamelSListNode *    camel_slist_addtail                 (CamelSList *l,
                                                         CamelSListNode *n);
CamelSListNode *    camel_slist_remove                  (CamelSList *l,
                                                         CamelSListNode *n);
CamelSListNode *    camel_slist_remhead                 (CamelSList *l);
CamelSListNode *    camel_slist_remtail                 (CamelSList *l);
gint                camel_slist_empty                   (CamelSList *l);
gint                camel_slist_length                  (CamelSList *l);
typedef struct {
	struct _CamelDListNode *head;
	struct _CamelDListNode *tail;
	struct _CamelDListNode *tailpred;
} CamelDList;
typedef struct {
	struct _CamelDListNode *next;
	struct _CamelDListNode *prev;
} CamelDListNode;
#define CAMEL_DLIST_INITIALISER(l) { (CamelDListNode *)&l.tail, 0, (CamelDListNode *)&l.head }
| 
 | 
void camel_dlist_init (CamelDList *v);
Initialise a double-linked list header. All list headers must be initialised before use.
| 
 | 
CamelDListNode * camel_dlist_addhead (CamelDList *l, CamelDListNode *n);
Add the list node n to the head (start) of the list l.
| 
 | An initialised list header. | 
| 
 | A node, the next and prev pointers will be overwritten. | 
| Returns : | n. | 
CamelDListNode * camel_dlist_addtail (CamelDList *l, CamelDListNode *n);
Add the list onde n to the tail (end) of the list l.
| 
 | An intialised list header. | 
| 
 | A node, the next and prev pointers will be overwritten. | 
| Returns : | n. | 
CamelDListNode * camel_dlist_remove (CamelDListNode *n);
Remove n from the list it's in.  n must belong to a list.
| 
 | A node which is part of a list. | 
| Returns : | n. | 
CamelDListNode * camel_dlist_remhead (CamelDList *l);
Remove the head node (start) of the list.
xReturn value: The previously first-node in the list, or NULLif l
is an empty list.
| 
 | An initialised list, maybe containing items. | 
| Returns : | 
CamelDListNode * camel_dlist_remtail (CamelDList *l);
Remove the last node in the list.
| 
 | An initialised list, maybe containing items. | 
| Returns : | The previously last-node in the list, or NULL if lis an empty list. | 
gint camel_dlist_length (CamelDList *l);
Returns the number of nodes in the list l.
| 
 | An initialised list header. | 
| Returns : | The number of nodes. | 
CamelSListNode * camel_slist_addhead (CamelSList *l, CamelSListNode *n);
| 
 | |
| 
 | |
| Returns : | 
CamelSListNode * camel_slist_addtail (CamelSList *l, CamelSListNode *n);
| 
 | |
| 
 | |
| Returns : | 
CamelSListNode * camel_slist_remove (CamelSList *l, CamelSListNode *n);
| 
 | |
| 
 | |
| Returns : |