fuck it open() does not work 😭
This commit is contained in:
@ -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))
|
||||
|
@ -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.
BIN
get_next_line/get_next_line_bonus.h.gch
Normal file
BIN
get_next_line/get_next_line_bonus.h.gch
Normal file
Binary file not shown.
@ -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;
|
||||
|
Reference in New Issue
Block a user