diff --git a/C_Piscine_C_03/git/ex01/ft_strncmp.copy.c b/C_Piscine_C_03/git/ex01/ft_strncmp.copy.c deleted file mode 100644 index 7d1f7ba..0000000 --- a/C_Piscine_C_03/git/ex01/ft_strncmp.copy.c +++ /dev/null @@ -1,27 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* ft_strncmp.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: dgloriod +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2021/08/09 11:32:49 by dgloriod #+# #+# */ -/* Updated: 2021/08/18 11:44:44 by gbaconni ### ########.fr */ -/* */ -/* ************************************************************************** */ - -int ft_strncmp(char *s1, char *s2, unsigned int n) -{ - unsigned int i; - - i = 0; - while (i < n) - { - if (s1[i] > s2[i]) - return (1); - else if (s1[i] < s2[i]) - return (-1); - i++; - } - return (0); -} diff --git a/C_Piscine_C_03/git/ex01/t.c b/C_Piscine_C_03/git/ex01/t.c deleted file mode 100644 index 0930299..0000000 --- a/C_Piscine_C_03/git/ex01/t.c +++ /dev/null @@ -1,37 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* main.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: gbaconni +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2021/08/12 15:16:20 by gbaconni #+# #+# */ -/* Updated: 2021/08/18 12:00:04 by gbaconni ### ########.fr */ -/* */ -/* ************************************************************************** */ - -#include -#include -#include -#include - -int ft_strncmp(char *s1, char *s2, unsigned int n); - -int main(void) -{ - char *s1 = "a"; - char *s2 = "a"; - unsigned int n = 65536; - int result; - - while (n < 80000) - { - printf("[%d]:\n", n); - result = strncmp(s1, s2, n); - printf("s1=%s s2=%s n=%d result=%d (strncmp)\n", s1, s2, n, result); - result = ft_strncmp(s1, s2, n); - printf("s1=%s s2=%s n=%d result=%d (ft_strncmp)\n", s1, s2, n, result); - n++; - } - return (0); -} diff --git a/C_Piscine_C_03/git/ex01/t.sh b/C_Piscine_C_03/git/ex01/t.sh deleted file mode 100755 index 2913b5e..0000000 --- a/C_Piscine_C_03/git/ex01/t.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -set -e -norminette -R CheckForbiddenSourceHeader ft_strncmp.copy.c -gcc -Wall -Wextra -Werror -o a.out ft_strncmp.copy.c t.c -echo $(basename $PWD): -./a.out -rm -f a.out