Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a07e35afb1
3 changed files with 74 additions and 1 deletions
8
.clangd
8
.clangd
|
|
@ -17,6 +17,13 @@ CompileFlags: # Tweak the parse settings
|
||||||
- "-I/home/maix/school/shcat/includes/"
|
- "-I/home/maix/school/shcat/includes/"
|
||||||
- "-I/home/maix/school/shcat/output/include/"
|
- "-I/home/maix/school/shcat/output/include/"
|
||||||
- "-I/home/maix/school/shcat/generic_sources/header/"
|
- "-I/home/maix/school/shcat/generic_sources/header/"
|
||||||
|
- "-I/home/raphael/42/shcat/vendor/"
|
||||||
|
- "-I/home/raphael/42/shcat/stdme/include/"
|
||||||
|
- "-I/home/raphael/42/shcat/stdme/vendor/"
|
||||||
|
- "-I/home/raphael/42/shcat/stdme/output/include/"
|
||||||
|
- "-I/home/raphael/42/shcat/stdme/generic_sources/header/"
|
||||||
|
- "-I/home/raphael/42/shcat/includes/"
|
||||||
|
- "-I/home/raphael/42/shcat/output/include/"
|
||||||
- "-I/home/rparodi/Documents/shcat/vendor/"
|
- "-I/home/rparodi/Documents/shcat/vendor/"
|
||||||
- "-I/home/rparodi/Documents/shcat/stdme/include/"
|
- "-I/home/rparodi/Documents/shcat/stdme/include/"
|
||||||
- "-I/home/rparodi/Documents/shcat/stdme/vendor/"
|
- "-I/home/rparodi/Documents/shcat/stdme/vendor/"
|
||||||
|
|
@ -24,7 +31,6 @@ CompileFlags: # Tweak the parse settings
|
||||||
- "-I/home/rparodi/Documents/shcat/stdme/generic_sources/header/"
|
- "-I/home/rparodi/Documents/shcat/stdme/generic_sources/header/"
|
||||||
- "-I/home/rparodi/Documents/shcat/includes/"
|
- "-I/home/rparodi/Documents/shcat/includes/"
|
||||||
- "-I/home/rparodi/Documents/shcat/output/include/"
|
- "-I/home/rparodi/Documents/shcat/output/include/"
|
||||||
- "-I/Users/raphael/Documents/42/cursus/shcat/generic_sources/header/"
|
|
||||||
- "-I/Users/raphael/Documents/42/cursus/shcat/vendor/"
|
- "-I/Users/raphael/Documents/42/cursus/shcat/vendor/"
|
||||||
- "-I/Users/raphael/Documents/42/cursus/shcat/stdme/include/"
|
- "-I/Users/raphael/Documents/42/cursus/shcat/stdme/include/"
|
||||||
- "-I/Users/raphael/Documents/42/cursus/shcat/stdme/vendor/"
|
- "-I/Users/raphael/Documents/42/cursus/shcat/stdme/vendor/"
|
||||||
|
|
|
||||||
45
sources/exec/separator/semicolon.c
Normal file
45
sources/exec/separator/semicolon.c
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
/* ************************************************************************** */
|
||||||
|
/* */
|
||||||
|
/* ::: :::::::: */
|
||||||
|
/* semicolon.c :+: :+: :+: */
|
||||||
|
/* +:+ +:+ +:+ */
|
||||||
|
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||||
|
/* +#+#+#+#+#+ +#+ */
|
||||||
|
/* Created: 2024/05/12 16:00:33 by rparodi #+# #+# */
|
||||||
|
/* Updated: 2024/05/12 16:21:34 by rparodi ### ########.fr */
|
||||||
|
/* */
|
||||||
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
#include "app/env.h"
|
||||||
|
#include "app/state.h"
|
||||||
|
#include "me/types.h"
|
||||||
|
#include "gmr/symbols.h"
|
||||||
|
#include "app/node.h"
|
||||||
|
#include "me/vec/vec_str.h"
|
||||||
|
// #include "app/node/handle_program.h"
|
||||||
|
#include "app/node/handle_command.h"
|
||||||
|
#include "minishell.h"
|
||||||
|
#include "me/string/str_clone.h"
|
||||||
|
|
||||||
|
t_error ft_command_exec(t_node *node, t_i32 *ret_value)
|
||||||
|
{
|
||||||
|
printf("execve : %s\n", node->single_str);
|
||||||
|
|
||||||
|
return (NO_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
t_error semicolon_exec(t_node *first, t_node *second, t_i32 *ret_value)
|
||||||
|
{
|
||||||
|
if (!first && !second)
|
||||||
|
return (ERROR);
|
||||||
|
if (!first)
|
||||||
|
ft_command_exec(second, ret_value);
|
||||||
|
else if (!second)
|
||||||
|
ft_command_exec(first, ret_value);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ft_command_exec(first, ret_value);
|
||||||
|
ft_command_exec(second, ret_value);
|
||||||
|
}
|
||||||
|
return (NO_ERROR);
|
||||||
|
}
|
||||||
22
sources/exec/separator/separator.h
Normal file
22
sources/exec/separator/separator.h
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
/* ************************************************************************** */
|
||||||
|
/* */
|
||||||
|
/* ::: :::::::: */
|
||||||
|
/* separator.h :+: :+: :+: */
|
||||||
|
/* +:+ +:+ +:+ */
|
||||||
|
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||||
|
/* +#+#+#+#+#+ +#+ */
|
||||||
|
/* Created: 2024/05/12 16:53:15 by rparodi #+# #+# */
|
||||||
|
/* Updated: 2024/05/12 16:54:01 by rparodi ### ########.fr */
|
||||||
|
/* */
|
||||||
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
#ifndef SEPARATOR_H
|
||||||
|
# define SEPARATOR_H
|
||||||
|
|
||||||
|
# include "minishell.h"
|
||||||
|
|
||||||
|
t_error ft_command_exec(t_node *node, t_i32 *ret_value);
|
||||||
|
t_error semicolon_exec(t_node *first, t_node *second, t_i32 *ret_value);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue