-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgeneric_list.h
More file actions
31 lines (25 loc) · 1.34 KB
/
Copy pathgeneric_list.h
File metadata and controls
31 lines (25 loc) · 1.34 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* generic_list.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jkong <jkong@student.42seoul.kr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/21 16:50:51 by jkong #+# #+# */
/* Updated: 2022/06/19 00:42:04 by jkong ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef GENERIC_LIST_H
# define GENERIC_LIST_H
# include <stddef.h>
typedef struct s_generic_list
{
struct s_generic_list *next;
} t_generic_list;
typedef int t_gl_func();
int list_walk(t_generic_list *list, t_gl_func *func);
t_generic_list *list_reverse(t_generic_list *list);
size_t list_length(t_generic_list *list);
void list_append(t_generic_list **head, t_generic_list *elem);
t_generic_list *list_remove(t_generic_list **list, t_gl_func *cmp, void *arg);
#endif