my_rpg documentation
1.0.0
Loading...
Searching...
No Matches
mylist.h
1
/*
2
** EPITECH PROJECT, 2023
3
** my list
4
** File description:
5
** struct of linked list
6
*/
7
8
#ifndef MYLIST_H
9
#define MYLIST_H
10
#include <stdlib.h>
11
12
typedef
enum
type {
13
INT,
14
CHAR,
15
STR,
16
UNKNOW,
17
SFSPRITE,
18
SFTEXT,
19
LABEL,
20
INSTRUCTION,
21
} type_t;
22
23
typedef
struct
nodes
{
24
struct
nodes
*previous;
25
void
*data;
26
type_t type;
27
struct
nodes
*next;
28
}
nodes_t
;
29
30
int
list_size(
nodes_t
**head);
31
int
just_remove_in_list(
nodes_t
**head,
void
*data,
32
int
(*cmp)(
void
*,
void
*));
33
int
del_matching_node(
nodes_t
**head,
void
*data,
int
(*cmp)(
void
*,
void
*));
34
void
push_f(
nodes_t
**head,
void
*data, type_t type);
35
int
print_list(
nodes_t
**head);
36
int
print_typed_value(
void
*data, type_t type);
37
int
delete_list(
nodes_t
**head,
char
const
*);
38
39
//Doubly
40
int
remove_doubly(
nodes_t
**head,
void
*
id
,
int
cmp(
void
*,
void
*));
41
void
print_list_doubly(
nodes_t
**head);
42
void
push_f_doubly(
nodes_t
**head,
void
*data, type_t type);
43
void
push_b_doubly(
nodes_t
**head,
void
*data, type_t type);
44
int
remove_doubly_free(
nodes_t
**head,
void
*
id
,
int
cmp(
void
*,
void
*));
45
nodes_t
*previous_to_next(
nodes_t
**head,
nodes_t
*to_delete);
46
nodes_t
*pop_b_doubly(
nodes_t
**list);
47
nodes_t
*pop_f_doubly(
nodes_t
**list);
48
49
int
my_strput(
char
const
*str);
50
int
my_lenstr(
char
const
*str);
51
void
my_charput(
char
c);
52
int
my_nbr_put(
int
nb);
53
int
my_cmpstr(
char
const
*str1,
char
const
*str2);
54
char
*my_dupstr(
char
const
*src);
55
char
*print_adress(
unsigned
int
nbr,
char
const
*base);
56
57
58
int
my_intcmp_void(
void
*data,
void
*ref);
59
int
my_strcmp_void(
void
*data,
void
*ref);
60
int
my_pointercmp(
void
*s1,
void
*s2);
61
62
63
void
super_push_f(
nodes_t
**head,
void
*data, type_t type);
64
void
super_push_b(
nodes_t
**head,
void
*data, type_t type);
65
nodes_t
*my_find_node(
nodes_t
const
*begin,
void
const
*data_ref,
66
int
(*cmp) ());
67
68
#endif
nodes
Definition
mylist.h:23
lib
list
mylist.h
Generated by
1.11.0