Vinni-Cedraz / GNL

Get Next Line is the second C project in the École 42 curriculum. It can read files and get a single line on each call of the get_next_line() function. The program reads from multiple files without losing track of what was already read, so at each call it starts from the next line. Hence, "get next line" ;)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GNL

Get Next Line is the second C project in the École 42 curriculum. It can read files and get a single line on each call of the get_next_line() function. The program reads from multiple files without losing track of what was already read. So each call starts from the next line.

Use

To use and test it, you just have to clone the repository and then compile get_next_line.c together with get_next_line_utils.c and main.c, and then execute the binary giving as many files as you want as arguments, like so:

./a.out banner.txt

Example

Here is a fun, althought not practical, example of the GNL being used. In this case it is simply passing line by line from the banner.txt file to the int main function where the program prints them, line by line, on the terminal standard output:

WhatsApp Image 2022-10-11 at 19 40 08

Those text files with ascii characters forming cool images are called ascii art by the way

WhatsApp Image 2022-10-11 at 19 43 05

They can be automatically generated on this website: https://www.ascii-art-generator.org/

There are practical uses for GNL and I'll be updating this readme with more information.

About

Get Next Line is the second C project in the École 42 curriculum. It can read files and get a single line on each call of the get_next_line() function. The program reads from multiple files without losing track of what was already read, so at each call it starts from the next line. Hence, "get next line" ;)

License:GNU General Public License v3.0


Languages

Language:C 100.0%