ASCOT5
Toggle main menu visibility
Loading...
Searching...
No Matches
list.h
Go to the documentation of this file.
1
5
#ifndef LIST_H
6
#define LIST_H
7
#include "offload.h"
8
12
typedef
struct
list_int_node
{
13
struct
list_int_node
*
next
;
14
int
data
;
15
}
list_int_node
;
16
17
DECLARE_TARGET
18
void
list_int_create
(
list_int_node
** list);
19
DECLARE_TARGET_END
20
DECLARE_TARGET
21
void
list_int_free
(
list_int_node
** list);
22
DECLARE_TARGET_END
23
DECLARE_TARGET
24
void
list_int_add
(
list_int_node
* list,
int
data
);
25
DECLARE_TARGET_END
26
DECLARE_TARGET
27
int
list_int_get
(
list_int_node
* list,
int
index);
28
DECLARE_TARGET_END
29
DECLARE_TARGET
30
int
list_int_size
(
list_int_node
* list);
31
DECLARE_TARGET_END
32
33
#endif
list_int_size
int list_int_size(list_int_node *list)
Get list size.
Definition
list.c:86
list_int_create
void list_int_create(list_int_node **list)
Create an empty list.
Definition
list.c:16
list_int_free
void list_int_free(list_int_node **list)
Deallocate this list and all lists it is linked to.
Definition
list.c:28
list_int_get
int list_int_get(list_int_node *list, int index)
Retrieve the data stored in a list node.
Definition
list.c:69
list_int_add
void list_int_add(list_int_node *list, int data)
Add new node to the end of the chain.
Definition
list.c:48
list_int_node
Linked list node that stores int data.
Definition
list.h:12
list_int_node::next
struct list_int_node * next
Definition
list.h:13
list_int_node::data
int data
Definition
list.h:14
Generated on
for ASCOT5 by
1.18.0