Skip to content

caroldaniel/42sp-cursus-get_next_line

Repository files navigation

get_next_line

42cursus' project #2

In this repo you will find all the files regarding the implementations of the get_next_line functions, both its mandatory and bonus versions.


Final score

cado-car's

Completed + Bonus

cado-car's

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.

Bonus

The bonus part must behave like the mandatory part but adding up functionality to handle multiple file descriptors opened at once. The bonus function must also deal with only one static variable.


The project

Mandatory implementation

Bonus implementation


Usage

Instructions

When compiling get_next_line or its bonus version, 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

This is my get_next_line function implementation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages