diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-08-06 18:19:11 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-08-06 18:19:11 +0200 |
| commit | c6d343fccb84e9fc89dfc75b3f35a352e97b14a4 (patch) | |
| tree | 5cde66a3b489c7882b6d7ba062df5a70dbaf0666 /c02/main.c | |
| parent | 056a88ee9c2c9e26f9712d14c645e367d851f394 (diff) | |
| download | piscine-c6d343fccb84e9fc89dfc75b3f35a352e97b14a4.tar.gz piscine-c6d343fccb84e9fc89dfc75b3f35a352e97b14a4.tar.bz2 piscine-c6d343fccb84e9fc89dfc75b3f35a352e97b14a4.zip | |
details, print_memory start
- copied c09 correct ft_split to c07
- strdup parenthesis in malloc
- strlcat copied from tested libft
Diffstat (limited to 'c02/main.c')
| -rw-r--r-- | c02/main.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1,5 +1,8 @@ -#include <stdio.h> +#ifdef linux +# include <bsd/string.h> // with -lbsd +#endif #include <string.h> +#include <stdio.h> #include <limits.h> #include "ex00/ft_strcpy.c" #include "ex01/ft_strncpy.c" @@ -13,6 +16,7 @@ #include "ex09/ft_strcapitalize.c" #include "ex10/ft_strlcpy.c" #include "ex11/ft_putstr_non_printable.c" +#include "ex12/ft_print_memory.c" int main() { @@ -77,9 +81,9 @@ int main() ft_strcapitalize(tocap); printf("%s\n", tocap); - char a[] = "qweihroqwier"; + /* char a[] = "qweihroqwier"; */ char ldest[6]; - char b[] = "qweqweeqwrqwer"; + /* char b[] = "qweqweeqwrqwer"; */ char lsrc[] = "qwroiqwer"; printf("len %u : ", ft_strlcpy(ldest, lsrc, sizeof ldest )); for (int i = 0; i < 33; i++) @@ -101,5 +105,9 @@ int main() } ft_putstr_non_printable("Coucou\ntu vas bien ?"); + printf("\n---------------------\n"); + char *addr = "bonjour je suis charles et je le suis bien"; + ft_print_memory(addr, sizeof addr); + return 0; } |
