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/libft_io.h | |
| 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/libft_io.h')
| -rw-r--r-- | include/libft_io.h | 10 |
1 files changed, 8 insertions, 2 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 |
