llefranc / 42_get_next_line

School project: code a function that reads from a file descriptor and returns a line ending with a newline (with all the bonuses).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get_next_line (@42Born2Code)

"Reading a line on a fd is way too tedious"

Alt text

About

Get_next_line is a project of the mandatory part of the cursus mainly code in C. It's about file descriptors, read and use of buffers. This get_next_line handle the bonus part, so it's able to read several files from multiple fds at the same time using a chainlist.

This project was code on MacOS

Building and running the project

  1. Download/Clone this repo

     git clone https://github.com/lucaslefrancq/42_get_next_line
    
  2. Copy your main.c inside the root directory and cd into it. Then compile your main with the C files. You need to indicate the size of the buffer that's get_next_line is using.

     cd 42_get_next_line
     gcc -Wall -Werror -Wextra -D BUFFER_SIZE=10 main.c get_next_line.c get_next_line_utils.c
    

About

School project: code a function that reads from a file descriptor and returns a line ending with a newline (with all the bonuses).


Languages

Language:C 100.0%