-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbonus_types.h
More file actions
70 lines (60 loc) · 1.86 KB
/
Copy pathbonus_types.h
File metadata and controls
70 lines (60 loc) · 1.86 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* bonus_types.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lgasc <lgasc@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/14 17:00:31 by lgasc #+# #+# */
/* Updated: 2024/02/27 11:30:55 by lgasc ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef BONUS_TYPES_H
# define BONUS_TYPES_H
# include <stddef.h>
// Indeed, `clang` seems to support no attribute...
# ifndef __clang__
# ifdef TEST
typedef struct __attribute__ ((designated_init)) s_node
{
void *datum;
struct s_node *next;
} t_node;
typedef t_node *t_list;
///TODO: Rename to `s_intnode`, `t_intnode`, and `t_intlist`
typedef struct __attribute__ ((designated_init)) s_inode
{
int datum;
struct s_inode *next;
} t_inode;
typedef t_inode *t_ilist;
typedef struct __attribute__ ((designated_init)) s_znode
{
size_t inner;
struct s_znode *next;
} t_znode;
typedef t_znode *t_zlist;
# define BONUS_H_ATTRIBUTES
# endif
# endif
# ifndef BONUS_H_ATTRIBUTES
typedef struct s_node
{
void *datum;
struct s_node *next;
} t_node;
typedef t_node *t_list;
typedef struct s_inode
{
int datum;
struct s_inode *next;
} t_inode;
typedef t_inode *t_ilist;
typedef struct s_znode
{
size_t inner;
struct s_znode *next;
} t_znode;
typedef t_znode *t_zlist;
# endif
#endif