Graphviz  2.41.20171026.1811
LinkedList.h
Go to the documentation of this file.
1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
4 /*************************************************************************
5  * Copyright (c) 2011 AT&T Intellectual Property
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors: See CVS logs. Details at http://www.graphviz.org/
12  *************************************************************************/
13 
14 #ifndef LINKED_LIST_H
15 #define LINKED_LIST_H
16 
18 
20  void *data;
21  SingleLinkedList next;
22 };
23 
24 SingleLinkedList SingleLinkedList_new(void *data);
25 SingleLinkedList SingleLinkedList_new_int(int i);
26 void SingleLinkedList_delete(SingleLinkedList head, void (*linklist_deallocator)(void*));
27 SingleLinkedList SingleLinkedList_prepend(SingleLinkedList l, void *data);
28 SingleLinkedList SingleLinkedList_prepend_int(SingleLinkedList l, int i);
29 
30 void* SingleLinkedList_get_data(SingleLinkedList l);
31 
32 SingleLinkedList SingleLinkedList_get_next(SingleLinkedList l);
33 
34 void SingleLinkedList_print(SingleLinkedList head, void (*linkedlist_print)(void*));
35 
36 
38 
40  void *data;
41  DoubleLinkedList next;
42  DoubleLinkedList prev;
43 };
44 
45 DoubleLinkedList DoubleLinkedList_new(void *data);
46 void DoubleLinkedList_delete(DoubleLinkedList head, void (*linklist_deallocator)(void*));
47 DoubleLinkedList DoubleLinkedList_prepend(DoubleLinkedList l, void *data);
48 
49 void* DoubleLinkedList_get_data(DoubleLinkedList l);
50 
51 DoubleLinkedList DoubleLinkedList_get_next(DoubleLinkedList l);
52 
53 void DoubleLinkedList_delete_element(DoubleLinkedList l, void (*linklist_deallocator)(void*), DoubleLinkedList *head);
54 #endif
void DoubleLinkedList_delete(DoubleLinkedList head, void(*linklist_deallocator)(void *))
Definition: LinkedList.c:93
SingleLinkedList next
Definition: LinkedList.h:21
#define head
Definition: dthdr.h:19
SingleLinkedList SingleLinkedList_new(void *data)
Definition: LinkedList.c:23
DoubleLinkedList DoubleLinkedList_get_next(DoubleLinkedList l)
Definition: LinkedList.c:120
void DoubleLinkedList_delete_element(DoubleLinkedList l, void(*linklist_deallocator)(void *), DoubleLinkedList *head)
Definition: LinkedList.c:134
DoubleLinkedList next
Definition: LinkedList.h:41
DoubleLinkedList DoubleLinkedList_new(void *data)
Definition: LinkedList.c:84
SingleLinkedList SingleLinkedList_get_next(SingleLinkedList l)
Definition: LinkedList.c:70
struct DoubleLinkedList_struct * DoubleLinkedList
Definition: LinkedList.h:37
SingleLinkedList SingleLinkedList_prepend(SingleLinkedList l, void *data)
Definition: LinkedList.c:53
DoubleLinkedList DoubleLinkedList_prepend(DoubleLinkedList l, void *data)
Definition: LinkedList.c:107
DoubleLinkedList prev
Definition: LinkedList.h:42
void * SingleLinkedList_get_data(SingleLinkedList l)
Definition: LinkedList.c:66
void SingleLinkedList_delete(SingleLinkedList head, void(*linklist_deallocator)(void *))
Definition: LinkedList.c:39
SingleLinkedList SingleLinkedList_prepend_int(SingleLinkedList l, int i)
Definition: LinkedList.c:59
SingleLinkedList SingleLinkedList_new_int(int i)
Definition: LinkedList.c:31
void SingleLinkedList_print(SingleLinkedList head, void(*linkedlist_print)(void *))
Definition: LinkedList.c:73
struct SingleLinkedList_struct * SingleLinkedList
Definition: LinkedList.h:17
Definition: legal.c:60
void * DoubleLinkedList_get_data(DoubleLinkedList l)
Definition: LinkedList.c:116