diff options
Diffstat (limited to 'c08')
| -rw-r--r-- | c08/ex00/ft.h | 22 | ||||
| -rw-r--r-- | c08/ex01/ft_boolean.h | 34 | ||||
| -rw-r--r-- | c08/ex02/ft_abs.h | 18 | ||||
| -rw-r--r-- | c08/ex03/ft_point.h | 21 | ||||
| -rw-r--r-- | c08/ex04/ft_strs_to_tab.c | 13 |
5 files changed, 108 insertions, 0 deletions
diff --git a/c08/ex00/ft.h b/c08/ex00/ft.h new file mode 100644 index 0000000..5dbbb51 --- /dev/null +++ b/c08/ex00/ft.h @@ -0,0 +1,22 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/07 16:33:44 by cacharle #+# #+# */ +/* Updated: 2019/07/07 16:34:58 by cacharle ### ########.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/c08/ex01/ft_boolean.h b/c08/ex01/ft_boolean.h new file mode 100644 index 0000000..43a3c4f --- /dev/null +++ b/c08/ex01/ft_boolean.h @@ -0,0 +1,34 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_boolean.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/07 16:35:29 by cacharle #+# #+# */ +/* Updated: 2019/07/07 17:07:47 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef FT_BOOLEAN_H +#define FT_BOOLEAN_H + +#include <unistd.h> + +#define TRUE 1 +#define FALSE 1 +#define SUCCESS 0 +#define EVEN_MSG "I have an even number of arguments.\n" +#define ODD_MSG "I have an odd number of arguments.\n" +#define EVEN(x) (x % 2 == 0 ? 1 : 0) + +typedef enum { + FALSE, + TRUE +} t_bool; + +void ft_putstr(char *str); +t_bool ft_is_even(int nbr); + + +#endif diff --git a/c08/ex02/ft_abs.h b/c08/ex02/ft_abs.h new file mode 100644 index 0000000..9a41241 --- /dev/null +++ b/c08/ex02/ft_abs.h @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_abs.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/07 17:09:37 by cacharle #+# #+# */ +/* Updated: 2019/07/07 17:11:50 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef FT_ABS_H +#define FT_ABS_H + +#define ABS(x) (x < 0 ? -x : x) + +#endif diff --git a/c08/ex03/ft_point.h b/c08/ex03/ft_point.h new file mode 100644 index 0000000..088b792 --- /dev/null +++ b/c08/ex03/ft_point.h @@ -0,0 +1,21 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_point.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/07 17:12:47 by cacharle #+# #+# */ +/* Updated: 2019/07/07 17:15:20 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef FT_POINT_H +#define FT_POINT_H + +typedef struct { + int x; + int y; +} t_point; + +#endif diff --git a/c08/ex04/ft_strs_to_tab.c b/c08/ex04/ft_strs_to_tab.c new file mode 100644 index 0000000..bc4c42f --- /dev/null +++ b/c08/ex04/ft_strs_to_tab.c @@ -0,0 +1,13 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strs_to_tab.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/07 17:15:32 by cacharle #+# #+# */ +/* Updated: 2019/07/07 17:16:52 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + + |
