Skip to content

In this project I learned about static variables and created a function that returns each line of text in a file descriptor.

Notifications You must be signed in to change notification settings

sde-mull/Get_next_line

Repository files navigation

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

About

In this project I learned about static variables and created a function that returns each line of text in a file descriptor.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages