How rvnsenkuuu/get_next_line works
This is a small C line-reading library with standard and bonus implementations. A caller supplies a file descriptor; each implementation reads chunks until a newline or EOF, extracts one line, and retains any remainder for the next call. The bonus variant keeps separate stash state per descriptor, while the standard variant has one shared stash. Source excerpts show the runtime flow and utility calls; no README documents additional capabilities.
Main entry points: get_next_line.c Standard reader · get_next_line_bonus.c Bonus reader · get_next_line_utils.c String and memory helpers · get_next_line_utils_bonus.c Bonus helpers
Components 16
Other components
- Caller
- File descriptor
- Standard reader
get_next_line.c - Read and stash
get_next_line.c - Extract line
get_next_line.c - Keep remainder
get_next_line.c - Single stash
get_next_line.c - Bonus reader
get_next_line_bonus.c - Read and stash
get_next_line_bonus.c - Extract line
get_next_line_bonus.c - Keep remainder
get_next_line_bonus.c - Per-FD stash
get_next_line_bonus.c - POSIX read
- String and memory helpers
get_next_line_utils.c - Bonus helpers
get_next_line_utils_bonus.c - Allocated line
Connections 26
- Caller → Standard reader: calls
- File descriptor → Standard reader: supplies descriptor
- Standard reader → Read and stash: reads and appends
- Read and stash → POSIX read: reads chunks
- Read and stash → String and memory helpers: joins and searches
- Read and stash → Single stash: updates stash
- Standard reader → Extract line: extracts
- Extract line → Single stash: reads stash
- Extract line → Keep remainder: then trims
- Keep remainder → Single stash: replaces stash
- Extract line → String and memory helpers: allocates and measures
- Standard reader → Allocated line: returns
- Allocated line → Caller: delivers line
- Caller → Bonus reader: calls
- File descriptor → Bonus reader: supplies descriptor
- Bonus reader → Read and stash: reads and appends
- Read and stash → POSIX read: reads chunks
- Read and stash → Bonus helpers: joins and searches
- Read and stash → Per-FD stash: updates stash
- Bonus reader → Extract line: extracts
- Extract line → Per-FD stash: reads stash
- Extract line → Keep remainder: then trims
- Keep remainder → Per-FD stash: replaces stash
- Extract line → Bonus helpers: allocates and measures
- Bonus reader → Allocated line: returns
- Allocated line → Caller: delivers line