Skip to content

spnzed/get_next_line

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

get_next_line

42cursus' project #4

May it be a file, stdin, or even later a network connection, you will always need a way to read content line by line. It is time to start working on this function, which will be essential for your future projects. In this repo you will find all the files regarding the implementations of the get_next_line functions.

get_next_linee


Mandatory

Calling the function get_next_line in a loop will then allow the user to read the text available on the file descriptor one line at a time until the end of it. It has to behave well both on external files and standard input. The function should return the line that has just been read. If there is nothing else to read or if an error has occurred it should return NULL. The mandatory part must deal with at least one file descriptor at a time, and can have more than one static variable.


The project

Mandatory implementation


Usage

Instructions

When compiling get_next_line, be sure to include the following flags

$> gcc -Wall -Wextra -Werror -D BUFFER_SIZE=xxx <files>.c.

Where the xxx can be substituted by the number of bytes read at a time into the buffer for the read function.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages