Correction
This commit is contained in:
parent
b3f4633d45
commit
3f270563e9
4
Makefile
4
Makefile
|
@ -139,8 +139,6 @@ coffee:
|
||||||
bozo :
|
bozo :
|
||||||
@wget -q -O bozo.gif https://i.kym-cdn.com/photos/images/newsfeed/002/322/200/e51.gif
|
@wget -q -O bozo.gif https://i.kym-cdn.com/photos/images/newsfeed/002/322/200/e51.gif
|
||||||
@xdg-open bozo.gif
|
@xdg-open bozo.gif
|
||||||
@sleep 0.15
|
@sleep 4.26
|
||||||
@xdotool key F11
|
|
||||||
@sleep 4.1
|
|
||||||
@pkill eog
|
@pkill eog
|
||||||
@rm bozo.gif
|
@rm bozo.gif
|
||||||
|
|
|
@ -24,8 +24,6 @@ typedef struct s_data
|
||||||
{
|
{
|
||||||
char **cmds;
|
char **cmds;
|
||||||
char ***flgs;
|
char ***flgs;
|
||||||
char *fl1;
|
|
||||||
char *fl2;
|
|
||||||
int fd1;
|
int fd1;
|
||||||
int fd2;
|
int fd2;
|
||||||
int fd[2][2];
|
int fd[2][2];
|
||||||
|
|
|
@ -57,6 +57,8 @@ int here_doc(int argc, char *argv[], char **env, t_data *data)
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
cur = get_next_line(0);
|
cur = get_next_line(0);
|
||||||
|
if (!cur)
|
||||||
|
break;
|
||||||
cur[ft_strlen(cur) - 1] = '\0';
|
cur[ft_strlen(cur) - 1] = '\0';
|
||||||
if (ft_strcmp(cur, argv[2]) == 0)
|
if (ft_strcmp(cur, argv[2]) == 0)
|
||||||
break ;
|
break ;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/01/19 17:03:01 by erey-bet #+# #+# */
|
/* Created: 2023/01/19 17:03:01 by erey-bet #+# #+# */
|
||||||
/* Updated: 2023/03/07 19:26:23 by erey-bet ### ########.fr */
|
/* Updated: 2023/03/12 17:56:18 by erey-bet ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -84,11 +84,12 @@ char *find_command(char **env, char *cmd)
|
||||||
|
|
||||||
while (*env != NULL)
|
while (*env != NULL)
|
||||||
{
|
{
|
||||||
if (ft_strnstr(*env, "PATH=/", ft_strlen(*env))
|
if (ft_strnstr(*env, "PATH=", 6))
|
||||||
&& ft_strchr(*env, ':') > 0)
|
|
||||||
break ;
|
break ;
|
||||||
env++;
|
env++;
|
||||||
}
|
}
|
||||||
|
if (ft_strlen(*env) == 0)
|
||||||
|
env--;
|
||||||
y = 0;
|
y = 0;
|
||||||
s = ft_calloc(ft_strlen(*env) + 1, 1);
|
s = ft_calloc(ft_strlen(*env) + 1, 1);
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
|
|
|
@ -22,13 +22,11 @@
|
||||||
|
|
||||||
typedef struct s_data
|
typedef struct s_data
|
||||||
{
|
{
|
||||||
char *fl1;
|
|
||||||
char *cmd1;
|
char *cmd1;
|
||||||
char **flg1;
|
char **flg1;
|
||||||
char *fl2;
|
int fd1;
|
||||||
char *cmd2;
|
char *cmd2;
|
||||||
char **flg2;
|
char **flg2;
|
||||||
int fd1;
|
|
||||||
int fd2;
|
int fd2;
|
||||||
char **env;
|
char **env;
|
||||||
} t_data;
|
} t_data;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/01/19 17:03:01 by erey-bet #+# #+# */
|
/* Created: 2023/01/19 17:03:01 by erey-bet #+# #+# */
|
||||||
/* Updated: 2023/03/08 11:29:33 by erey-bet ### ########.fr */
|
/* Updated: 2023/03/12 17:39:22 by erey-bet ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -31,8 +31,6 @@ int parsing(char *argv[], t_data *data)
|
||||||
}
|
}
|
||||||
data->flg1 = ft_split(argv[2], ' ');
|
data->flg1 = ft_split(argv[2], ' ');
|
||||||
data->flg2 = ft_split(argv[3], ' ');
|
data->flg2 = ft_split(argv[3], ' ');
|
||||||
data->fl1 = argv[1];
|
|
||||||
data->fl2 = argv[4];
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue