Skip to content

LeonMoreno/Get-Next-Line

Repository files navigation

๐Ÿ“– Get_Next_Line

GitHub code size in bytes Number of lines of code Code language count GitHub top language GitHub last commit

๐Ÿ’ก About the project

๐Ÿš€ TLDR: The aim of this project is to make you code a function that returns a line,
read from a file descriptor.
May it be a file, stdin, or even later a network connection, you will always need 
a way to read content line by line. It is time to start working on this function, 
which will be essential for your future projects. 

Screenshots

Testing the GNL Manual:

Testing the GNL with Tripouille / gnlTester

Key points:

  • Learn a highly interesting new concept in C programming: static variables.
  • C Advanced Pointers.
  • system calls in C.
  • Unix logic.
  • Memory management anomalies in C.

Objectives:

  • Read the text available on the file descriptor one line at a time until the end of it.
  • 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

Skills:

  • Unix
  • Rigor
  • Algorithms & AI

๐Ÿ› ๏ธ Usage

Requirements

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

Instructions

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

gcc get_next_line.c get_next_line_utils.c -D BUFFER_SIZE=size