diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-11-13 15:11:04 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-11-13 15:31:35 +0100 |
| commit | b9a5e7c9ae556988c62dd9efeaf17060ad34bab0 (patch) | |
| tree | 7bf374e387898f9357aacde31c7b65e2032a75bc /get_next_line.h | |
| parent | 5bf49994b911abc2b8ff3bdb525cdc23c71f2102 (diff) | |
| download | libft-b9a5e7c9ae556988c62dd9efeaf17060ad34bab0.tar.gz libft-b9a5e7c9ae556988c62dd9efeaf17060ad34bab0.tar.bz2 libft-b9a5e7c9ae556988c62dd9efeaf17060ad34bab0.zip | |
Added get_next_line
Diffstat (limited to 'get_next_line.h')
| -rw-r--r-- | get_next_line.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/get_next_line.h b/get_next_line.h new file mode 100644 index 0000000..4afd0fb --- /dev/null +++ b/get_next_line.h @@ -0,0 +1,35 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* get_next_line.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/10/09 13:52:59 by cacharle #+# #+# */ +/* Updated: 2019/11/03 22:43:18 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef GET_NEXT_LINE_H +# define GET_NEXT_LINE_H + +# include <limits.h> + +# ifndef BUFFER_SIZE +# define BUFFER_SIZE 32 +# endif + +# define STATUS_LINE 1 +# define STATUS_EOF 0 +# define STATUS_ERROR -1 + +/* +** get_next_line.c +*/ + +int get_next_line(int fd, char **line); +int read_line(int fd, char **line, char *rest); +int find_newline(char *str); +int free_return(char **ptr, char **rest, int ret); + +#endif |
