Skip to content

42 cursus GNL project. A function that reads a file line by line.

License

Notifications You must be signed in to change notification settings

dpetrosy/42-Get-Next-Line

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

GNL Project

42 Yerevan GNL
For further information about 42cursus and its projects, please refer to 42cursus repo.


📜 About Project

The aim of this project is to make you code a function that returns a line, read from a file descriptor.

For detailed information, refer to the subject of this project.

🚀 TLDR: This task is crucial to understand for a future programmer, since much of the 
	 time is based on manipulating files for data management and persistence.
	 This project consists of coding a function that returns one line at a time 
	 from a text file.

Note

Because of 42 School norm requirements:

  • Each function can't have more than 25 lines of code.
  • All variables are declared and aligned at the top of each function.
  • Project should be created just with allowed functions otherwise it's cheating.

👨‍💻 Usage

Requirements

The function is written in C language and thus needs the gcc compiler and some standard C libraries to run.

Instructions

1. Using it in your code

To use the function in your code, simply include its header:

#include "get_next_line.h"

and, when compiling your code, add the source files and the required flag:

get_next_line.c get_next_line_utils.c -D BUFFER_SIZE=<size>