From e0abc6358c4cacc840ac8b3a9a92900f8ce49f0a Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 11 Oct 2019 14:30:20 +0200 Subject: Rewrite with dynamic buffer - ft_strappend: ft_strcat with resize - still malloc issues in ft_strappend --- get_next_line.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'get_next_line.h') diff --git a/get_next_line.h b/get_next_line.h index 650330f..9f7aabd 100644 --- a/get_next_line.h +++ b/get_next_line.h @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/09 13:52:59 by cacharle #+# #+# */ -/* Updated: 2019/10/11 11:22:20 by cacharle ### ########.fr */ +/* Updated: 2019/10/11 14:27:22 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,19 +21,28 @@ # define END_OF_FILE 0 # define ERROR -1 +# define TRUE 1 +# define FALSE 0 + +typedef int t_bool; + /* ** get_next_line.c */ int get_next_line(int fd, char **line); -int read_after(int fd, char *buf, char *rest_buf); +char *shift_rest(char *rest, int split_at); +int find_newline(char *str); +t_bool empty_rest(char *rest); /* ** get_next_line_utils.c - helper functions */ -int find_newline(char *str); char *ft_strncpy(char *dest, const char *src, int n); int ft_strlen(char *str); +char *ft_strcat(char *dest, const char *src); +char *ft_strcpy(char *dest, const char *src); +char *ft_strappend(char *dest, char *src); #endif -- cgit