kllaster / get_next_line

Function that reads line by line from a stream.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get_next_line

Description

My implementation of the get_next_line function.
Function that reads line by line from a stream.

Usage

#define BUFFER_SIZE 32
int	get_next_line(int fd, char **line);
  • return 1 If the line is received and it is not the last one
  • return 0 If this is the last line
  • return -1 If there is an error when reading the string

About

Function that reads line by line from a stream.


Languages

Language:C 75.3%Language:Makefile 24.7%