|
Libft
Custom implementation of core libc functions with additional utility helpers.
|
Chunk-by-chunk file reading (customizable separator). More...
Functions | |
| t_buff * | get_next_chunk (int fd, char separator) |
| Reads the next chunk from a file descriptor until separator is found. | |
| void | get_next_chunk_free (void) |
| Frees all internal stashes used by get_next_chunk. | |
Chunk-by-chunk file reading (customizable separator).
Functions to read chunks from file descriptors with persistent state.
| t_buff * get_next_chunk | ( | int | fd, |
| char | separator ) |
Reads the next chunk from a file descriptor until separator is found.
Returns the chunk even if EOF is reached before separator is found. Returns NULL only when called after EOF has already been reached.
| fd | File descriptor to read from. |
| separator | Character to stop reading at (included in returned chunk). |

| void get_next_chunk_free | ( | void | ) |
Frees all internal stashes used by get_next_chunk.
Call this to clean up when done reading from all file descriptors.
