Skip to content

This project is about programming a function that returns a line read from a file descriptor.

Notifications You must be signed in to change notification settings

josephcheel/42-Get_next_line

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Get_next_line |  42 Cursus Complete

This project is about programming a function that returns a line read from a file descriptor.

What is the the project about

Get_next_line function reads from a file descriptor and returns the first line encountered, in other words when encountering a line break character \n. The function uses static variables to "remember" the last line ret and continue from that point.

Info

When compiling you should compile with -D BUFFER_SIZE=nbr. Where nbr is the numbers of bytes that read function read each time.

Mandatory Instrucctions

  • The Allowed functions are: read, malloc, free
  • Files nedded: get_next_line.cget_next_line_utils.cget_next_line.h
  • Prototype of the function: char *get_next_line(int fd);. Where fd is the file descriptor to read from.

Bonus Instrucctions

To compile the project

> gcc -Wall -Wextra -Werror -D BUFFER_SIZE=Nbr <files> main.c
> gcc -Wall -Wextra -Werror -D BUFFER_SIZE=Nbr <files_bonus> main.c 
Info

Nbr is the numbers of bytes that read function read each time.

About

This project is about programming a function that returns a line read from a file descriptor.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages