diff --git a/Makefile b/Makefile index 1b25575..cf9e408 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ clean: build/c%: $(OFFSHORE_PROJECTS)/c$$(subst _,+,$$*)/*.c $$(OFFSHORE_MAINS)/c$$*.c mkdir -p $(@D) $(CC) -o $@ $(CFLAGS_MANDATORY) $(CFLAGS) $^ -norme: $$(foreach c, 00 01, $(OFFSHORE_PROJECTS)/c$$c) +norme: $$(wildcard $(OFFSHORE_PROJECTS)/c*) norminette -R CheckForbiddenSourceHeader $^ .PHONY: all norme clean diff --git a/c01/ex01.c b/c01/ex01.c new file mode 100644 index 0000000..325c667 --- /dev/null +++ b/c01/ex01.c @@ -0,0 +1,20 @@ +#include +void ft_ultimate_ft(int *********nbr); +int main(void) +{ + int n = -666; + int *j1 = &n; + int **j2 = &j1; + int ***j3 = &j2; + int ****j4 = &j3; + int *****j5 = &j4; + int ******j6 = &j5; + int *******j7 = &j6; + int ********j8 = &j7; + int *********johnny = &j8; + + printf("was %d\n", n); + ft_ultimate_ft(johnny); + printf("now %d\n", n); + +} diff --git a/c01/ex02.c b/c01/ex02.c new file mode 100644 index 0000000..6eac6fd --- /dev/null +++ b/c01/ex02.c @@ -0,0 +1,11 @@ +#include +void ft_swap(int *a, int *b); + +int main(void) +{ + int one = 1; + int two = 2; + printf("was %d %d\n", one, two); + ft_swap(&one, &two); + printf("now %d %d\n", one, two); +}