Skip to content

Nuno-Jesus/42_get_next_line

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Get Next Line

This project was graded 125/100.

📒 About

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.

🔧 Implementation

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

📦 Compilation

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!

💫 Testing

This project was tested using the gnlTester and manual revision only.

📞 Contact me

Feel free to ask me any questions through Slack (ncarvalh).