0
0
This commit is contained in:
Guy Baconniere
2021-08-20 10:02:38 +02:00
parent 5aa02c94b5
commit d30270c485
354 changed files with 0 additions and 0 deletions

25
C_01/git/ex05/ft_putstr.c Normal file
View File

@@ -0,0 +1,25 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbaconni <marvin@42lausanne.ch> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/09 11:19:27 by gbaconni #+# #+# */
/* Updated: 2021/08/09 17:03:09 by gbaconni ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
void ft_putstr(char *str)
{
int size;
size = 0;
while (str[size] != '\0')
{
size++;
}
write(1, str, size);
}

27
C_01/git/ex05/main.c Normal file
View File

@@ -0,0 +1,27 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbaconni <marvin@42lausanne.ch> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/09 11:12:49 by gbaconni #+# #+# */
/* Updated: 2021/08/09 11:19:05 by gbaconni ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
#include <unistd.h>
void ft_putstr(char *str);
int main(void)
{
ft_putstr("42");
write(1, "\n", 1);
ft_putstr("Hello");
write(1, "\n", 1);
ft_putstr("World");
write(1, "\n", 1);
return (0);
}

7
C_01/git/ex05/main.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
set -e
norminette -R CheckForbiddenSourceHeader ft_*.c
gcc -Wall -Wextra -Werror -o a.out *.c
echo $(basename $PWD):
./a.out
rm -f a.out