Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Guiribei/backslash-n

Open more actions menu

Repository files navigation

backslash-n

A 42 project meant to Get the Next Line '\n'

The aim of this project was to allow me to build my own mechanism to access the next line in a certain file through determined file descriptor. So, I’ve programmed a function that returns a line read from a fd. Through the understanding of a static variable concept, it was possible to make a buffer that would keep the information read from previous call of the function to a subsequent call. This also allowed the function to read the entire file (when called multiple times until EOF) with different buffer sizes.

The main lessons learned from this project were about the use of static variables and the understanding of mechanisms to find and avoid memory leaks (yes, we met valgrind for the first time here, now I guess we are almost close friends).

About

A 42 project meant to Get the Next Line '\n'

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.