Welcome to my get_next_line
project!
This funny project,challenges us to implement a function that reads a line from a file descriptor.
See the subject
The get_next_line
function is designed to read a line ending with a newline character ('\n'
) from a file descriptor. Key features include:
-
Buffer Management:
- Efficiently manage a buffer to read data from the file descriptor.
-
Dynamic Memory Allocation:
- Utilize dynamic memory allocation to handle lines of variable length.
-
Multiple File Descriptors:
- Adapt the function to read from multiple file descriptors without losing context.
/srcs/
: Contains the source files, including the mainget_next_line
function./include/
: Header files, includingget_next_line.h
.
- Clone the repository to your local machine.
- Navigate to the
/srcs/
directory and review the source files. - Compile the project using the provided Makefile (
make
). - Create a test program or use the provided test cases to ensure your
get_next_line
functions correctly.
Special thanks to Ecole 42 for the inspiration and learning opportunity.
Happy coding! 🚀