0
0

Add main.* and remove .gitignore

This commit is contained in:
2021-08-16 08:26:30 +02:00
parent a808b91a50
commit 44692816d5
85 changed files with 1352 additions and 30 deletions

View File

@@ -0,0 +1,29 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbaconni <marvin@42lausanne.ch> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/09 11:21:01 by gbaconni #+# #+# */
/* Updated: 2021/08/09 11:25:11 by gbaconni ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
#include <unistd.h>
int ft_strlen(char *str);
int main(void)
{
int size;
size = ft_strlen("42");
printf("size=%d (42)\n", size);
size = ft_strlen("Hello");
printf("size=%d (Hello)\n", size);
size = ft_strlen("World");
printf("size=%d (World)\n", size);
return (0);
}

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