diff --git a/ex0/ft_strdup.c b/ex0/ft_strdup.c index 82b7931..4836dbe 100644 --- a/ex0/ft_strdup.c +++ b/ex0/ft_strdup.c @@ -6,7 +6,7 @@ /* By: lclerel- +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/03/16 14:01:43 by lclerel- #+# #+# */ -/* Updated: 2026/03/16 16:31:19 by lclerel- ### ########.fr */ +/* Updated: 2026/03/19 11:37:45 by lclerel- ### ########.fr */ /* */ /* ************************************************************************** */ @@ -38,8 +38,8 @@ char *ft_strdup(char *src) dst[i] = '\0'; return (dst); } -/* +/* void ft_putchar(char chara) { write(1, &chara, 1); diff --git a/ex1/ft_range.c b/ex1/ft_range.c index 2d258db..ff86ac0 100644 --- a/ex1/ft_range.c +++ b/ex1/ft_range.c @@ -6,7 +6,7 @@ /* By: lclerel- +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/03/16 14:44:51 by lclerel- #+# #+# */ -/* Updated: 2026/03/16 16:07:36 by lclerel- ### ########.fr */ +/* Updated: 2026/03/19 11:38:03 by lclerel- ### ########.fr */ /* */ /* ************************************************************************** */ @@ -37,8 +37,8 @@ int *ft_range(int min, int max) } return (range); } - -/*void ft_putchar(char c) +/* +void ft_putchar(char c) { write(1, &c, 1); } diff --git a/ex2/ft_ultimate_range.c b/ex2/ft_ultimate_range.c index 943c8af..d0a8a8b 100644 --- a/ex2/ft_ultimate_range.c +++ b/ex2/ft_ultimate_range.c @@ -6,7 +6,7 @@ /* By: lclerel- +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/03/16 16:07:45 by lclerel- #+# #+# */ -/* Updated: 2026/03/16 16:30:33 by lclerel- ### ########.fr */ +/* Updated: 2026/03/19 11:38:13 by lclerel- ### ########.fr */ /* */ /* ************************************************************************** */ @@ -40,8 +40,8 @@ int ft_ultimate_range(int **range, int min, int max) *range = tab; return (size); } - -/*void ft_putchar(char c) +/* +void ft_putchar(char c) { write(1, &c, 1); } diff --git a/ex3/ft_strjoin.c b/ex3/ft_strjoin.c index 95baee9..62d40d4 100644 --- a/ex3/ft_strjoin.c +++ b/ex3/ft_strjoin.c @@ -6,7 +6,7 @@ /* By: lclerel- +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/03/16 16:37:56 by lclerel- #+# #+# */ -/* Updated: 2026/03/17 15:13:51 by lclerel- ### ########.fr */ +/* Updated: 2026/03/19 11:38:19 by lclerel- ### ########.fr */ /* */ /* ************************************************************************** */ @@ -92,8 +92,8 @@ char *ft_strjoin(int size, char **strs, char *sep) } return (res); } - -/*void ft_putchar(char chara) +/* +void ft_putchar(char chara) { write(1, &chara, 1); } diff --git a/ex4/ft_convert_base.c b/ex4/ft_convert_base.c index a9cb7dc..273db32 100644 --- a/ex4/ft_convert_base.c +++ b/ex4/ft_convert_base.c @@ -6,7 +6,7 @@ /* By: lclerel- +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/03/17 14:20:07 by lclerel- #+# #+# */ -/* Updated: 2026/03/17 19:19:00 by lclerel- ### ########.fr */ +/* Updated: 2026/03/19 11:36:19 by lclerel- ### ########.fr */ /* */ /* ************************************************************************** */ @@ -101,7 +101,6 @@ char *ft_convert_base(char *nbr, char *base_from, char *base_to) ft_populate_res(res, n, base_to, size); return (res); } - /* int main(void) { @@ -116,7 +115,7 @@ int main(void) bin = "01"; vif = "poneyvif"; // Test 1 : 42 > Dec to Bin - ft_putstr("Test avec 42"); + ft_putstr("Test avec 42 | "); ft_putstr("Base From : Decimal (Base 10), Base To : Binary (Base 2)"); write(1, "\n", 1); result = ft_convert_base("42", dec, bin); @@ -129,7 +128,7 @@ int main(void) write(1, "\n", 1); free(result); // Test 2 : 2a (42) > Hex to Vif - ft_putstr("Test avec 42 (2a)"); + ft_putstr("Test avec 42 (2a) | "); ft_putstr("Base From : Hexadecimal (Base 16), Base To : poneyvif (Base 8)"); write(1, "\n", 1); result = ft_convert_base("2a", hex, vif); @@ -142,7 +141,7 @@ int main(void) write(1, "\n", 1); free(result); // Test 3 : 0 > Dec to Bin - ft_putstr("Test avec 0"); + ft_putstr("Test avec 0 | "); ft_putstr("Base From : Decimal (Base 10), Base To : Binary (Base 2)"); write(1, "\n", 1); result = ft_convert_base("0", dec, bin); @@ -155,7 +154,7 @@ int main(void) write(1, "\n", 1); free(result); // Test 4 : -2147483648 > Dec to Hex - ft_putstr("Test avec -2147483648") + ft_putstr("Test avec -2147483648 | "); ft_putstr("Base From : Decimal (Base 10), Base To : Hexadecimal (Base 16)"); write(1, "\n", 1); result = ft_convert_base("-2147483648", dec, hex); @@ -168,28 +167,28 @@ int main(void) write(1, "\n", 1); free(result); // Test 5 : Bordel Ultime > Binary to Dec - ft_putstr("Test avec ---+--101010"); + ft_putstr("Test avec ---+--101010 | "); ft_putstr("Base From : Binary (Base 2), Base To : Decimal (Base 10)"); - write(1, "\n", 1); + write(1, "\n", 1); result = ft_convert_base(" ---+--101010", bin, dec); - if (result == NULL) - { + if (result == NULL) + { write(1, "Erreur.", 7); - } + } ft_putstr("Resultat : "); ft_putstr(result); - write(1, "\n", 1); - free(result); + write(1, "\n", 1); + free(result); // Test 6 : NULL > Binary to Dec - ft_putstr("Test avec NULL."); + // ft_putstr("Test avec NULL | "); ft_putstr("Base From : Binary (Base 2), Base To : Decimal (Base 10)"); - write(1, "\n", 1); - result = ft_convert_base(NULL, bin, dec); - if (result == NULL) - { - write(1, "Erreur. NULL est mis comme variable", 35); + write(1, "\n", 1); + result = ft_convert_base(NULL, bin, dec); + if (result == NULL) + { + write(1, "Erreur. NULL est mis comme variable", 35); write(1, "\n", 1); - } + } else { ft_putstr("Resultat : "); @@ -198,4 +197,4 @@ int main(void) free(result); } return (0); -}*/ \ No newline at end of file +}*/