-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Virgile DESVAUX
committed
Apr 11, 2018
1 parent
0c03ed6
commit 40aeb89
Showing
4 changed files
with
116 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,14 @@ | |
/* By: jamerlin <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2017/11/11 05:15:24 by videsvau #+# #+# */ | ||
/* Updated: 2018/04/11 11:38:39 by videsvau ### ########.fr */ | ||
/* Updated: 2018/04/11 17:04:30 by videsvau ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#ifndef HEADER_H | ||
# define HEADER_H | ||
# define TERM "xterm-256color" | ||
# define DEBUG 1 | ||
# define DEBUG 0 | ||
# define TTY_MAX 10000 | ||
|
||
# define DQUOTE 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: jamerlin <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2018/03/25 17:55:29 by jamerlin #+# #+# */ | ||
/* Updated: 2018/04/11 10:34:10 by drecours ### ########.fr */ | ||
/* Updated: 2018/04/11 17:03:50 by videsvau ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -72,12 +72,12 @@ t_pipe *new_tabtube(int len) | |
|
||
void dup_fd(t_listc *cmd, t_pipe *tabtube, int i) | ||
{ | ||
/*if (fcntl(tabtube[i].cote[0], F_GETFD) == -1) | ||
if (fcntl(tabtube[i].cote[0], F_GETFD) == -1) | ||
{ | ||
ft_putstr_fd("21sh: ", 2); | ||
ft_putchar_fd(tabtube[i].cote[0] + '0', 2); | ||
errexit(": Bad file descriptor"); | ||
}**/ | ||
} | ||
if (cmd->redirs->redir[1] != 0 && cmd->redirs->redir[1] != 4 | ||
&& cmd->redirs->redir[0] == 1) | ||
dup2(tabtube[i].cote[0], STDOUT_FILENO); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: videsvau <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2018/02/27 16:33:23 by videsvau #+# #+# */ | ||
/* Updated: 2018/04/10 14:38:27 by drecours ### ########.fr */ | ||
/* Updated: 2018/04/11 17:06:07 by videsvau ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -65,7 +65,7 @@ void redir_push_back(t_redir **redir, t_inpl **inpl, int type) | |
last = return_last_redir(redir); | ||
last->next = new_redir(redir_type, file, here); | ||
} | ||
redir_debug(file, redir_type); | ||
DEBUG ? redir_debug(file, redir_type) : 0; | ||
} | ||
|
||
void add_listc_token(t_inpl **inpl, t_listc **tok) | ||
|