From 883121aef7e5f8c0d3563f973055356c8490a243 Mon Sep 17 00:00:00 2001 From: tosu Date: Thu, 30 Mar 2023 21:31:14 +0200 Subject: [PATCH] comment out main ex04 ex05 --- ex04/ft_putnbr_base.c | 10 ++++++++-- ex05/ft_atoi_base.c | 12 ++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ex04/ft_putnbr_base.c b/ex04/ft_putnbr_base.c index 1f9d165..64c0faa 100644 --- a/ex04/ft_putnbr_base.c +++ b/ex04/ft_putnbr_base.c @@ -1,6 +1,5 @@ #include #include -#include unsigned int char_count(const char *str, char c) { @@ -77,8 +76,9 @@ void ft_putnbr_base(int nbr, char *base) } -#define START +/* //// #include +#define BASEINVALID1 "01234567890" #define BASE10 "0123456789" #define BASE2 "01" #define BASE3 "012" @@ -91,6 +91,11 @@ int main(void) { char *base; + base = BASEINVALID1; + printf("BASE '%s'\n", base); + printf("Input: <%d> Output: <", 123); fflush(stdout); ft_putnbr_base(123, base); printf(">\n"); + printf("\n"); + base = BASE10; printf("BASE '%s'\n", base); printf("Input: <%d> Output: <", INT_MIN); fflush(stdout); ft_putnbr_base(INT_MIN, base); printf(">\n"); @@ -420,3 +425,4 @@ int main(void) return (0); } +*/ //// diff --git a/ex05/ft_atoi_base.c b/ex05/ft_atoi_base.c index fd05f3f..4e42736 100644 --- a/ex05/ft_atoi_base.c +++ b/ex05/ft_atoi_base.c @@ -1,5 +1,3 @@ -#include - unsigned int char_count(const char *str, char c) { unsigned int count; @@ -81,7 +79,9 @@ int ft_atoi_base(char *str, char *base) return (sign * abs); } +/* //// #include +#define BASEINVALID1 "01234567890" #define BASE10 "0123456789" #define BASE2 "01" #define BASE3 "012" @@ -95,6 +95,11 @@ int main(void) char *base; char *input; + base = BASEINVALID1; + printf("Base: %s\n", base); + input = "123"; printf("Input: <'%s'>, Output: <%d>\n", input, ft_atoi_base(input, base)); + printf("\n"); + base = BASE10; printf("Base: %s\n", base); input = "-2147483648"; printf("Input: <'%s'>, Output: <%d>\n", input, ft_atoi_base(input, base)); @@ -573,4 +578,7 @@ int main(void) input = " +-+-d"; printf("Input: <'%s'>, Output: <%d>\n", input, ft_atoi_base(input, base)); input = " +-+-d"; printf("Input: <'%s'>, Output: <%d>\n", input, ft_atoi_base(input, base)); printf("\n"); + + return (0); } +*/ ////