How omerfarukyagci/get_next_line works
Get Next Line is a small C library that returns one line per call from a file descriptor, retaining unread bytes between calls. The standard implementation keeps one static pending buffer; the bonus implementation keeps separate pending buffers indexed by descriptor. Each entry point reads until a newline or EOF, returns the extracted line, and retains or frees the remainder. Utility functions support searching, joining, and freeing buffers. The README documents both variants; source excerpts show their read and helper calls.
Main entry points: get_next_line.c Standard line reader · get_next_line_bonus.c Multi-FD line reader · get_next_line_utils.c Standard string helpers · get_next_line_utils_bonus.c Multi-FD string helpers
Components 8
Other components
- Library caller
- Standard line reader
get_next_line.c - Standard interface
get_next_line.h - Standard string helpers
get_next_line_utils.c - Multi-FD line reader
get_next_line_bonus.c - Multi-FD interface
get_next_line_bonus.h - Multi-FD string helpers
get_next_line_utils_bonus.c - File descriptor
Connections 6
- Library caller → Standard line reader: requests line
README.md - Standard line reader → File descriptor: reads bytes
get_next_line.c - Standard line reader → Standard string helpers: uses helpers
get_next_line.c - Library caller → Multi-FD line reader: requests line
README.md - Multi-FD line reader → File descriptor: reads bytes
get_next_line_bonus.c - Multi-FD line reader → Multi-FD string helpers: uses helpers
get_next_line_bonus.c