forked from Sistemas-Operativos-Matcom/proyecto-concurrencia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist.h
More file actions
34 lines (26 loc) · 678 Bytes
/
list.h
File metadata and controls
34 lines (26 loc) · 678 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef INT_LL_H
#define INT_LL_H
// Integer Linked Lists
typedef struct _integer_linked_list_node_t
{
int data;
struct _integer_linked_list_node_t *prev,*next;
}node;
typedef struct _integer_linked_list_t
{
int sz;
node* Ini;
} int_ll_t;
// Init list structure
int init_list(int_ll_t *list);
// Free list structure
int free_list(int_ll_t *list);
// Get list size
int size_list(int_ll_t *list);
// Get element at index
int index_list(int_ll_t *list, int index, int *out_value);
// Insert element at index
int insert_list(int_ll_t *list, int index, int value);
// Remove element at index
int remove_list(int_ll_t *list, int index, int *out_value);
#endif