Libft
Custom implementation of core libc functions with additional utility helpers.
Loading...
Searching...
No Matches
buff_internal.h
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* buff_internal.h :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: gastesan <gastesan@student.42.fr> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2026/01/11 02:13:40 by gastesan #+# #+# */
9/* Updated: 2026/07/31 15:32:31 by gastesan ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#ifndef BUFF_INTERNAL_H
14# define BUFF_INTERNAL_H
15
16# include "libft.h"
17# include <stddef.h>
18
29size_t buff_get_required_cap(size_t current_cap, size_t target_len);
30
47ssize_t buff_read_n_bytes(t_buff *buff, int fd, size_t n);
48
49#endif
ssize_t buff_read_n_bytes(t_buff *buff, int fd, size_t n)
Reads up to n bytes from a file descriptor into a buffer.
Definition buff_internal.c:55
size_t buff_get_required_cap(size_t current_cap, size_t target_len)
Calculates the required capacity to accommodate a target length.
Definition buff_internal.c:22
Dynamic buffer structure for efficient string/data manipulation.
Definition libft.h:54