Skip to content

get_next_line is a 42 school project meant to teach us how to read from a file descriptor and use static variables.

Notifications You must be signed in to change notification settings

miketaonjo/get_next_line

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project name : get_next_line

For this project, the assignment is :

Program a function that returns a line read from a file descriptor

We learn to read from a file descriptor, as well as the use of static variables. This function returns a single line from a given file descriptor If called in a loop, get_next_line returns the entire contents of a file, line by line until it reaches the end of the file. It can be compiled specifying any buffer size.

Usage

In order to compile : gcc srcs/main.c srcs/get_next_line.c srcs/get_next_line_utils.c
or
gcc -D BUFFER_SIZE=42 srcs/main.c srcs/get_next_line.c srcs/get_next_line_utils.c

Execution : ./a.out file.txt

About

get_next_line is a 42 school project meant to teach us how to read from a file descriptor and use static variables.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages