get_next_line is a 42 school project where the goal is to create a function that reads a file descriptor line by line, returning one line each time itβs called β just like reading a file with fgets(), but with custom memory management and buffer handling.
char *get_next_line(int fd);- Returns the next line from a file descriptor
- Includes the \n if present
- Returns NULL on EOF or error
- Bonus for multiple file descriptors included
- No memory leaks
- One line per call
- Handle multiple file descriptors (bonus)
- Norm compliant
cc -Wall -Wextra -Werror get_next_line.c get_next_line_utils.c main.c- get_next_line.c
- get_next_line_utils.c
- get_next_line.h
Created and maintained by Martin Justa as part of the 42 school curriculum.