Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.3 KB

README.md

File metadata and controls

40 lines (30 loc) · 1.3 KB

Get_next_line - 42Project   

Reading a line from a fd is way too tedious

The aim of this project is to create a function that reads from file descriptors and returns line by line everytime is called until the end of the file.

Prototype

char *get_next_line(int fd);

How to use it

Clone the repository

git clone https://github.com/sde-mull/Get_next_line.git

Run your program

in your file.c
#include "Get_next_line/get_next_line.h"        //for one file descriptor
#include "Get_next_line/get_next_line_bonus.h"  //for multiple files descriptors at the same time

then compile with
gcc file.c Get_next_line/get_next_line.c Get_next_line/get_next_line_utils.c              //for one file descriptor
gcc file.c Get_next_line/get_next_line_bonus.c Get_next_line/get_next_line_utils_bonus.c  //for multiple files descriptors at the same time

Grade:

image