31 lines
1.2 KiB
C
31 lines
1.2 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_open.h :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: achubuko <marvin@42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2023/12/03 19:51:40 by achubuko #+# #+# */
|
||
|
/* Updated: 2023/12/03 23:14:56 by achubuko ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
#ifndef FT_OPEN_H
|
||
|
# define FT_OPEN_H
|
||
|
# include <unistd.h>
|
||
|
# include <fcntl.h>
|
||
|
# include <stdlib.h>
|
||
|
|
||
|
typedef struct s_file
|
||
|
{
|
||
|
int descriptor;
|
||
|
char *read_window;
|
||
|
size_t read_window_cursor;
|
||
|
size_t read_window_size;
|
||
|
size_t read_size;
|
||
|
char *buffer;
|
||
|
size_t buffer_size;
|
||
|
} t_file;
|
||
|
t_file *ft_open(char *path);
|
||
|
char *ft_dispence_line(t_file *f);
|
||
|
#endif
|