This repository has been archived by the owner on Nov 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
get_next_line_bonus.h
46 lines (39 loc) · 1.7 KB
/
get_next_line_bonus.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line_bonus.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mcombeau <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/13 16:02:17 by mcombeau #+# #+# */
/* Updated: 2022/01/13 16:02:20 by mcombeau ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef GET_NEXT_LINE_BONUS_H
# define GET_NEXT_LINE_BONUS_H
# include <fcntl.h>
# include <stddef.h>
# include <unistd.h>
# include <stdlib.h>
# include <stdio.h>
# include <limits.h>
# ifndef BUFFER_SIZE
# define BUFFER_SIZE BUFSIZ
# endif
# if BUFFER_SIZE > 9223372036854775806
# undef BUFFER_SIZE
# define BUFFER_SIZE 0
# endif
/* ---------- GNL ------------ */
char *get_next_line(int fd);
void ft_read_line(int fd, char **keep, char **tmp);
char *ft_parse_line(char **keep, char **tmp);
char *get_before_newline(const char *s);
char *get_after_newline(const char *s);
/* ---------- UTILS ---------- */
int contains_newline(const char *s);
char *ft_strdup(const char *s1);
char *join_strs(const char *s1, const char *s2);
void *ft_malloc_zero(size_t count, size_t size);
void ft_free_strs(char **str, char **str2, char **str3);
#endif