The aim of this project is to create a function that returns a line ending with a newline, read from a file descriptor.
- Static variables
- Memory allocation
- Buffers
-
Submit .c and .h
-
Use of libft project allowed and encouraged
-
Do not submit a main
-
Project must be Norminette compliant (42 C programming standard)
-
Handle errors - project must not quit in an unexpected manner (Seg fault, bus error, double free, etc)
-
No memory leaks
-
Include author file
-
Allowed functions: read, malloc and free
Call function from program, providing a valid file descriptor and the address of a char pointer.
Returns 1 when a line is read successfully, 0 when reached end of file and -1 in the case of a read error.