diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-05-12 21:40:41 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-05-12 21:40:41 +0200 |
| commit | d4aeabeac0a8bd1665b14aacf487df17198c1ab9 (patch) | |
| tree | ef25802fc5272bd6698aa7ea33770d66c49d9911 /include | |
| parent | 966eb29634a84496e0851ef2b5a7d64f413d33ed (diff) | |
| download | libft-d4aeabeac0a8bd1665b14aacf487df17198c1ab9.tar.gz libft-d4aeabeac0a8bd1665b14aacf487df17198c1ab9.tar.bz2 libft-d4aeabeac0a8bd1665b14aacf487df17198c1ab9.zip | |
Fixing/refactoring ft_getline, fixed/normed ft_memchr, added ft_strmove
Diffstat (limited to 'include')
| -rw-r--r-- | include/libft_io.h | 10 | ||||
| -rw-r--r-- | include/libft_str.h | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/include/libft_io.h b/include/libft_io.h index faeade4..ab40875 100644 --- a/include/libft_io.h +++ b/include/libft_io.h @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/31 10:35:43 by cacharle #+# #+# */ -/* Updated: 2020/05/12 18:00:55 by charles ### ########.fr */ +/* Updated: 2020/05/12 20:36:36 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,6 +33,9 @@ char ft_getchar(void); # ifndef FT_GETFILE_BUFFER_SIZE # define FT_GETFILE_BUFFER_SIZE 64 # endif +# if FT_GETFILE_BUFFER_SIZE <= 0 +# error "FT_GETFILE_BUFFER_SIZE must be > 0" +# endif typedef struct s_ftmem { @@ -43,7 +46,10 @@ typedef struct s_ftmem int ft_getfile(int fd, t_ftmem *mem); # ifndef FT_GETLINE_BUFFER_SIZE -# define FT_GETLINE_BUFFER_SIZE 1 +# define FT_GETLINE_BUFFER_SIZE 64 +# endif +# if FT_GETLINE_BUFFER_SIZE <= 0 +# error "FT_GETLINE_BUFFER_SIZE must be > 0" # endif # define FT_LINE 1 diff --git a/include/libft_str.h b/include/libft_str.h index 383c393..41e81ac 100644 --- a/include/libft_str.h +++ b/include/libft_str.h @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/31 10:39:22 by cacharle #+# #+# */ -/* Updated: 2020/05/11 15:52:40 by charles ### ########.fr */ +/* Updated: 2020/05/12 20:47:36 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -79,6 +79,7 @@ int ft_strnequ(char const *s1, char const *s2, size_t n); char *ft_strtolower(char *s); char *ft_strtoupper(char *s); char *ft_strcat3(char *dest, const char *src1, const char *src2); +char *ft_strmove(char *dest, const char *src); /* ** glob |
