linked_list.h
Go to the documentation of this file.
1 /*
2 MIT LICENSE
3 
4 Copyright (c) 2014-2020 Inertial Sense, Inc. - http://inertialsense.com
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
7 
8 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 
10 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 */
12 
13 #ifndef LINKED_LIST_H
14 #define LINKED_LIST_H
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 
21 //_____ D E F I N I T I O N S ______________________________________________
22 
23 typedef struct // Place this structure at the start of any data structure to reference properly
24 {
25  void *prev; // Next object in linked list. 0 indicates this is the head.
26  void *nextCt; // Prev object in linked list. 0 indicates this is the tail.
28 
29 typedef struct
30 {
31  linked_list_node_t *head; // Head of linked list
32  linked_list_node_t *tail; // Tail of linked list
34 
35 //_____ P R O T O T Y P E S ________________________________________________
36 
37 void linkedListClear( linked_list_t *ll );
41 
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 
47 #endif // LINKED_LIST_H
void linkedListInsertBefore(linked_list_t *ll, linked_list_node_t *node, linked_list_node_t *newNode)
Definition: linked_list.c:53
linked_list_node_t * head
Definition: linked_list.h:31
void linkedListRemove(linked_list_t *ll, linked_list_node_t *node)
Definition: linked_list.c:84
linked_list_node_t * tail
Definition: linked_list.h:32
void linkedListClear(linked_list_t *ll)
Definition: linked_list.c:17
void linkedListInsertAtHead(linked_list_t *ll, linked_list_node_t *newNode)
Definition: linked_list.c:30


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:04