maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
redirection.h
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* redirection.h :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: dmdemirk <dmdemirk@student.42london.c +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2024/07/11 14:59:47 by dmdemirk #+# #+# */
9/* Updated: 2024/09/09 13:49:13 by dmdemirk ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#ifndef REDIRECTION_H
14# define REDIRECTION_H
15
16# include "shell.h"
17# include "tokens.h"
18
19/* redirect_in */
20int redirect_in(t_ast *node, t_ms_data *data);
21int redirect_out(t_ast *node, t_ms_data *data);
22int redirect_append(t_ast *node, t_ms_data *data);
23int redirect_here_doc(t_ast *node, t_ms_data *data);
24char *process_and_reassemble(char *line, t_ms_data *data);
25
26/* utils */
27int open_file(t_ast *node, char *direction);
28int open_tmp_file(const char *type);
29
30#endif
int open_file(t_ast *node, char *direction)
open file in the context of redirection
Definition utils.c:34
char * process_and_reassemble(char *line, t_ms_data *data)
int open_tmp_file(const char *type)
Definition utils.c:52
int redirect_out(t_ast *node, t_ms_data *data)
int redirect_in(t_ast *node, t_ms_data *data)
redirection input in context of executing AST
Definition redirect_in.c:38
int redirect_append(t_ast *node, t_ms_data *data)
redirect append ">>" to the end of the file output
int redirect_here_doc(t_ast *node, t_ms_data *data)
Definition tokens.h:50