Skip to content

Commit

Permalink
C Piscine C 08 - Fail 40% (2019-12-13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanda Puchille pinha committed Dec 13, 2019
1 parent e047d63 commit a452d68
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 0 deletions.
22 changes: 22 additions & 0 deletions c_piscine_c_08/ex00/ft.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apuchill <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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
26 changes: 26 additions & 0 deletions c_piscine_c_08/ex01/ft_boolean.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_boolean.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apuchill <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>

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
18 changes: 18 additions & 0 deletions c_piscine_c_08/ex02/ft_abs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_abs.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apuchill <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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
24 changes: 24 additions & 0 deletions c_piscine_c_08/ex03/ft_point.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_point.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apuchill <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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

0 comments on commit a452d68

Please sign in to comment.