/42_get-next-line

Get Next Line project is a solution that enables the sequential reading of a text file, processing one line at a time.

Primary LanguageC

42_get-next-line

About the project:

The primary objective of the Get Next Line project is to develop a solution that enables the sequential reading of a text file, processing one line at a time.

Technology used:

C icon
C language

Mandatory Part

Implement a function that reads and processes one line at a time from an opened file.

File Description
get_next_line.c Function that reads the file, extracts and returns the current line
get_next_line_utils.c Auxiliary functions from the libft library
get_next_line.h Header file

Bonus part

Implement a function that reads one line at a time from multiple files simultaneously.

File Description
get_next_line.c Function that reads the file, extracts and returns the current line
get_next_line_utils.c Auxiliary functions from the libft library
get_next_line.h Header file

Final score


Instructions to use

In order to utilize this project, you must initially clone the repository onto your local machine by employing a terminal:

  • - $> git clone git@github.com:joaoneon/42_get-next-line.git [folder]

Once you have successfully cloned the project to your local repository, compile the mandatory portion using the following command:

  • - $> -cc -Wall -Wextra -Werror -D BUFFER_SIZE=n

Additionally, to compile the bonus part of the project, utilize the following command:

  • - $> -cc -Wall -Wextra -Werror -D BUFFER_SIZE=n

Replace 'n' with the desired number of bytes to be read into the buffer for the read function. Additionally, you will need a main.c file to open a file and a test file that needs to be read.