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

Binary file not shown.

View File

@@ -0,0 +1,32 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbaconni <marvin@42lausanne.ch> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/11 11:24:31 by gbaconni #+# #+# */
/* Updated: 2021/08/12 11:44:53 by gbaconni ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
void ft_putstr_non_printable(char *str);
int main(void)
{
const char *test = "Coucou\ntu vas bien ?";
char str[256];
printf("Input [max 255]: ");
scanf("%255[^\n]", str);
printf("str=%s\n", str);
ft_putstr_non_printable(str);
printf("test=%s\n", test);
ft_putstr_non_printable((char *)test);
return (0);
}

View File

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