This is my get_next_line project from the 42 cursus
It's the second project at 1337. It involved creating a function in C that reads a line from a file descriptor, making it an efficient way to read large files where the size is not known. This project helped me gain experience in memory optimization and file handling, and the resulting function has proven to be a valuable tool for my future programming projects.
The function is written in C language and thus needs the gcc
compiler and some standard C libraries to run.
1. Using it in your code
To use the function in your code, simply include its header:
#include "get_next_line.h"
and, when compiling your code, add the source files and the required flag:
get_next_line.c get_next_line_utils.c -D BUFFER_SIZE=<size>
If you're on Linux, you may as well need the following flags:
-D ARG_MAX="sysconf(_SC_ARG_MAX)" -D OPEN_MAX=1024