mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
40 lines
1.4 KiB
C
40 lines
1.4 KiB
C
|
|
/* ************************************************************************** */
|
||
|
|
/* */
|
||
|
|
/* ::: :::::::: */
|
||
|
|
/* get_next_line.h :+: :+: :+: */
|
||
|
|
/* +:+ +:+ +:+ */
|
||
|
|
/* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */
|
||
|
|
/* +#+#+#+#+#+ +#+ */
|
||
|
|
/* Created: 2024/11/01 15:08:34 by jguelen #+# #+# */
|
||
|
|
/* Updated: 2024/11/23 16:29:54 by jguelen ### ########.fr */
|
||
|
|
/* */
|
||
|
|
/* ************************************************************************** */
|
||
|
|
|
||
|
|
#ifndef GET_NEXT_LINE_H
|
||
|
|
# define GET_NEXT_LINE_H
|
||
|
|
# ifndef BUFFER_SIZE
|
||
|
|
# define BUFFER_SIZE 1024
|
||
|
|
# endif
|
||
|
|
# ifndef FD_MAX
|
||
|
|
# define FD_MAX 1024
|
||
|
|
# endif
|
||
|
|
|
||
|
|
# include <stddef.h>
|
||
|
|
# include <stdlib.h>
|
||
|
|
# include <unistd.h>
|
||
|
|
|
||
|
|
/*start is set to NULL when there is nothing left in buffer to be dealt with*/
|
||
|
|
typedef struct s_buffer
|
||
|
|
{
|
||
|
|
char buffer[BUFFER_SIZE];
|
||
|
|
char *start;
|
||
|
|
char *end;
|
||
|
|
} t_buffer;
|
||
|
|
|
||
|
|
/*get_next_line.c*/
|
||
|
|
char *get_next_line(int fd);
|
||
|
|
/*get_next_line_utils.c*/
|
||
|
|
void *ft_memcpy(void *dest, const void *src, size_t n);
|
||
|
|
|
||
|
|
#endif
|