/Get-Next-Line

Get next line school 42 prj

Primary LanguageC

GetNextLine

Function, that reads from file descriptor till the end

About

This project is part of program in School 21 (Ecole 42).

Requirements

  • GNU GCC

Installation and usage

  1. Download/Clone this repo

    git clone https://github.com/shalfbea/Get-Next-Line/

  2. Compiling:

    gcc -Wall -Werror -Wextra -D BUFFER_SIZE= *.c

Don't forget to include get_next_line.h in your project

Technical task

The full task can be found here: gnl_subject

Quick summary:

  • Only using c language is allowed
  • Code-style should respect the The Norm
  • No memory leaks, segmentation faults, undefined behavior
  • Only allowed functions: read, malloc, free

Bonus:

  • Manage multiple file descriptors
  • Use only a single static variable

Evaluation result:

Screen Shot 2022-09-14 at 18 06 29