tgrekov-pipex
HIVE pipex May 2024
Loading...
Searching...
No Matches
here_doc.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* here_doc.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/26 12:01:21 by tgrekov #+# #+# */
/* Updated: 2024/05/20 12:26:53 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file here_doc.c.

#include <unistd.h>
#include "../../mandatory/utils/utils.h"
#include <ft_printf.h>
#include <get_next_line_bonus.h>
#include <libft.h>
Include dependency graph for here_doc.c:

Go to the source code of this file.

Functions

int here_doc (char *limiter, int *in_out)
 Capture multiline input from stdin and write to a pipe readable from in_out[0] until a line containing only limiter is reached.
 

Function Documentation

◆ here_doc()

int here_doc ( char *  limiter,
int *  in_out 
)

Capture multiline input from stdin and write to a pipe readable from in_out[0] until a line containing only limiter is reached.

Parameters
limiterCharacter to stop reading on
in_outInput filedes, output filedes
Return values
int0 on failure, 1 on success

Definition at line 46 of file here_doc.c.

References err(), ft_printf(), ft_strlen(), and get_next_line().

Here is the call graph for this function: