tgrekov-get_next_line
HIVE gnl Nov 2023
Loading...
Searching...
No Matches
get_next_line_bonus.h File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line_bonus.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/28 02:23:52 by tgrekov #+# #+# */
/* Updated: 2023/12/12 07:48:47 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file get_next_line_bonus.h.

#include "stdlib.h"
#include "unistd.h"
Include dependency graph for get_next_line_bonus.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BUFFER_SIZE   1024
 Set default BUFFER_SIZE if it is not defined at compile time.
 
#define MAX_FD   1024
 Max open file descriptors per process.
 

Functions

char * get_next_line (int fd)
 Return the next segment of text ending in a newline or EOF from file descriptor fd.
 

Function Documentation

◆ get_next_line()

char * get_next_line ( int  fd)

Return the next segment of text ending in a newline or EOF from file descriptor fd.

Parameters
[in]fdInteger file descriptor to read from
Return values
char*Freeable, null-terminated string on success, or NULL if error or nothing to read

Definition at line 131 of file get_next_line.c.

References BUFFER_SIZE, consume_and_resize(), consume_and_resize(), fill_line_buf(), fill_line_buf(), and MAX_FD.

Here is the call graph for this function: