Archived
1
0

fuck it open() does not work 😭

This commit is contained in:
Adam Joly
2023-12-23 09:25:01 +01:00
parent dbadd42c07
commit 32983af238
10 changed files with 34 additions and 25 deletions

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/01 17:11:59 by adjoly #+# #+# */
/* Updated: 2023/12/18 09:18:43 by adjoly ### ########.fr */
/* Updated: 2023/12/23 06:51:37 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -61,7 +61,7 @@ char *get_next_line(int fd)
res = ft_calloc(1, 1);
while (buf)
{
res = ft_strjoin(res, buf);
res = ft_strjoinf(res, buf);
if (!res)
return (NULL);
if (check_line(res, buf))

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/01 17:12:00 by adjoly #+# #+# */
/* Updated: 2023/12/18 09:27:15 by adjoly ### ########.fr */
/* Updated: 2023/12/23 06:51:07 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -21,7 +21,7 @@
# endif
char *get_next_line(int fd);
char *ft_strjoin(const char *s1, const char *s2);
char *ft_strjoinf(char *s1, char *s2);
// size_t ft_strlen(char *s);
// void *ft_calloc(size_t nmemb, size_t size);

Binary file not shown.

Binary file not shown.

View File

@ -6,23 +6,24 @@
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/01 17:12:02 by adjoly #+# #+# */
/* Updated: 2023/12/15 05:38:33 by adjoly ### ########.fr */
/* Updated: 2023/12/23 06:52:24 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "get_next_line.h"
#include "../libft/libft.h"
size_t ft_strlen(char *s)
{
size_t i;
// size_t ft_strlen(char *s)
// {
// size_t i;
//
// i = 0;
// while (s[i])
// i++;
// return (i);
// }
i = 0;
while (s[i])
i++;
return (i);
}
char *ft_strjoin(char *s1, char *s2)
char *ft_strjoinf(char *s1, char *s2)
{
char *result;
size_t i;