From b4b6364c2fc4b14a0aaac406891c3880243a9733 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 23 Nov 2019 02:54:37 +0100 Subject: refactored mandatory functions, to respect c calling convention --- main.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 3bf85d1..ff6ce3c 100644 --- a/main.c +++ b/main.c @@ -6,12 +6,13 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/11/22 02:02:24 by cacharle #+# #+# */ -/* Updated: 2019/11/23 00:25:35 by cacharle ### ########.fr */ +/* Updated: 2019/11/23 02:13:29 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include #include +#include typedef struct s_list { @@ -44,7 +45,9 @@ int main() /* printf("%d\n", ft_strlen("bonjour")); */ /* char c[32] = "bon"; */ - /* char *d = "bonjourasdfasdf"; */ + /* char *d = "b"; */ + /* */ + /* printf("%s\n", c); */ /* printf("%s\n", ft_strcpy(c, d)); */ /* printf("%s\n", c); */ @@ -52,7 +55,7 @@ int main() /* char *f = "\x02"; */ /* printf("%d\n", ft_strcmp(e, f)); */ /* printf("%d\n", strcmp(e, f)); */ - /* */ + /* ft_write(1, "bon\n", 4); */ /* */ /* char g[32]; */ @@ -60,9 +63,9 @@ int main() /* g[ret] = 0; */ /* printf("%s\n", g); */ /* */ - /* char *h = ft_strdup("bonjour"); */ - /* printf("%s\n", h); */ - /* free(h); */ + char *h = ft_strdup("bonjour"); + printf("%s\n", h); + free(h); /* printf("%d\n", check_base("01")); */ -- cgit