This project was graded 125/100.
In this project you will implement a very useful function, that exists in higher level languages, but not in C. You must read a line from a given file descriptor (including the line break) and return it in a new allocated string. Yes, you will find it very boring to do, but it will come in handy at the right moment. You'll learn about static variables, the read() and open() functions and file descriptors.
Part | File Name | Functionality |
---|---|---|
Mandatory | get_next_line.c | Contains functions specifically developed for this project |
get_next_line_utils.c | Contains functions from libft with a few changes to fit in the project | |
get_next_line.h | Contains the headers of all .c files | |
Bonus | get_next_line_bonus.c | Contains functions specifically developed for this project |
get_next_line_utils_bonus.c | Contains functions from libft with a few changes to fit in the project | |
get_next_line_bonus.h | Contains the headers of all .c files |
This project does not hold a Makefile for compilation, but in case you have a main.c
file that uses this functions, you can link every file in the same executable like so:
$ cc -Wall -Wextra -Werror main.c (REPLACE BY PATH TO THIS FOLDER)/*.c
Dont forget to include the .h
files!
This project was tested using the gnlTester and manual revision only.
Feel free to ask me any questions through Slack (ncarvalh).