mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
libs: added libft
This commit is contained in:
parent
6e1552a35d
commit
ddb2306630
63 changed files with 2989 additions and 4 deletions
39
libft/get_next_line.h
Normal file
39
libft/get_next_line.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue