get_next_line is a function that reads a file line by line from a given file descriptor. Each call returns the next line, including the newline character (\n) if present. This project is part of the 42 Common Core curriculum, and is implemented using only the allowed functions: read, malloc, and free.
- π Returns one line per call (including
\n) - π Supports multiple file descriptors at once
- βοΈ Customizable buffer size via
BUFFER_SIZE - π« No use of standard I/O functions (
fgets,strtok, etc.)
π Bonus
The bonus part includes:
-
Reading from multiple file descriptors simultaneously without data leaks or interference.
-
Proper handling of edge cases (empty files, very long lines, etc.).
-
π§ I have completed the bonus part, but I'm currently working on fixing a small memory leak I discovered during testing.
This project is for educational purposes and is part of the 42 Common Core curriculum.
If you found this project helpful or interesting, feel free to star βοΈ or fork it!