diff --git a/c_piscine_c_08/ex00/ft.h b/c_piscine_c_08/ex00/ft.h new file mode 100644 index 0000000..8eb75a7 --- /dev/null +++ b/c_piscine_c_08/ex00/ft.h @@ -0,0 +1,22 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: apuchill +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/12/12 21:38:13 by apuchill #+# #+# */ +/* Updated: 2019/12/12 21:38:38 by apuchill ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef FT_H +# define FT_H + +void ft_putchar(char c); +void ft_swap(int *a, int *b); +void ft_putstr(char *str); +int ft_strlen(char *str); +int ft_strcmp(char *s1, char *s2); + +#endif diff --git a/c_piscine_c_08/ex01/ft_boolean.h b/c_piscine_c_08/ex01/ft_boolean.h new file mode 100644 index 0000000..8d95b06 --- /dev/null +++ b/c_piscine_c_08/ex01/ft_boolean.h @@ -0,0 +1,26 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_boolean.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: apuchill +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/12/12 21:44:33 by apuchill #+# #+# */ +/* Updated: 2019/12/12 22:09:23 by apuchill ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef FT_BOOLEAN_H +# define FT_BOOLEAN_H + +# include + +typedef int t_bool; +# define EVEN(nbr) (nbr % 2 == 0) ? 1 : 0 +# define TRUE 1 +# define FALSE 0 +# define EVEN_MSG "I have an even number of arguments.\n" +# define ODD_MSG "I have an odd number of arguments.\n" +# define SUCCESS 0 + +#endif diff --git a/c_piscine_c_08/ex02/ft_abs.h b/c_piscine_c_08/ex02/ft_abs.h new file mode 100644 index 0000000..fb900c1 --- /dev/null +++ b/c_piscine_c_08/ex02/ft_abs.h @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_abs.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: apuchill +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/12/12 21:44:38 by apuchill #+# #+# */ +/* Updated: 2019/12/12 22:14:39 by apuchill ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef FT_ABS_H +# define FT_ABS_H + +# define ABS(Value) (Value < 0) ? (Value * -1) : (Value) + +#endif diff --git a/c_piscine_c_08/ex03/ft_point.h b/c_piscine_c_08/ex03/ft_point.h new file mode 100644 index 0000000..7c0d757 --- /dev/null +++ b/c_piscine_c_08/ex03/ft_point.h @@ -0,0 +1,24 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_point.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: apuchill +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/12/12 21:44:41 by apuchill #+# #+# */ +/* Updated: 2019/12/12 22:37:02 by apuchill ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef FT_POINT_H +# define FT_POINT_H + +typedef struct s_point t_point; + +struct s_point +{ + int x; + int y; +}; + +#endif