forgot to remove exit
This commit is contained in:
parent
9a8c3ebe64
commit
01ebed7cf6
7 changed files with 18 additions and 26 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/01/20 15:02:39 by jhalford #+# #+# */
|
/* Created: 2017/01/20 15:02:39 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/22 16:12:31 by jhalford ### ########.fr */
|
/* Updated: 2017/03/22 17:25:08 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/10 16:55:09 by jhalford #+# #+# */
|
/* Created: 2016/12/10 16:55:09 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/21 14:40:26 by jhalford ### ########.fr */
|
/* Updated: 2017/03/22 17:24:08 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -75,9 +75,11 @@ void sigttou_handler(int signo);
|
||||||
|
|
||||||
int process_cmp_pid(t_process *p, pid_t *pid);
|
int process_cmp_pid(t_process *p, pid_t *pid);
|
||||||
void process_format(t_list **p, int firstp, int opts);
|
void process_format(t_list **p, int firstp, int opts);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Mapping pour afficher les process
|
** Mapping pour afficher les process
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void pprint(t_process *p);
|
void pprint(t_process *p);
|
||||||
int pprint_subshell(t_process *p);;
|
int pprint_subshell(t_process *p);;
|
||||||
int pprint_brace(t_process *p);
|
int pprint_brace(t_process *p);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/01 12:15:50 by jhalford #+# #+# */
|
/* Created: 2016/12/01 12:15:50 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/20 16:44:48 by ariard ### ########.fr */
|
/* Updated: 2017/03/22 17:25:09 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/11/10 13:07:44 by jhalford #+# #+# */
|
/* Created: 2016/11/10 13:07:44 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/22 16:32:46 by jhalford ### ########.fr */
|
/* Updated: 2017/03/22 17:23:54 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -31,17 +31,10 @@
|
||||||
# include "glob.h"
|
# include "glob.h"
|
||||||
# include "completion.h"
|
# include "completion.h"
|
||||||
# include "hash.h"
|
# include "hash.h"
|
||||||
/* # define malloc(x) NULL */
|
|
||||||
|
|
||||||
# define SH_MSG(s, ...) "{red}%s: " s "{eoc}\n", g_argv[0], ##__VA_ARGS__
|
# define SH_MSG(s, ...) "{red}%s: " s "{eoc}\n", g_argv[0], ##__VA_ARGS__
|
||||||
# define SH_ERR(s, ...) ft_dprintf(STDERR, SH_MSG(s, ##__VA_ARGS__))
|
# define SH_ERR(s, ...) ft_dprintf(STDERR, SH_MSG(s, ##__VA_ARGS__))
|
||||||
|
|
||||||
#ifndef DEBUG
|
|
||||||
# define DEBUG_MODE 0
|
|
||||||
#else
|
|
||||||
# define DEBUG_MODE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct s_data
|
struct s_data
|
||||||
{
|
{
|
||||||
t_flag opts;
|
t_flag opts;
|
||||||
|
|
@ -61,6 +54,7 @@ struct s_data
|
||||||
t_list *lst_func;
|
t_list *lst_func;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
t_data *data_singleton();
|
||||||
int shell_init(int ac, char **av);
|
int shell_init(int ac, char **av);
|
||||||
void shell_exit(void);
|
void shell_exit(void);
|
||||||
int data_init(int ac, char **av);
|
int data_init(int ac, char **av);
|
||||||
|
|
@ -69,7 +63,6 @@ int get_c_arg(char ***av, t_data *data);
|
||||||
|
|
||||||
void shell_resetfds(void);
|
void shell_resetfds(void);
|
||||||
void shell_resetsig(void);
|
void shell_resetsig(void);
|
||||||
/* void content_free(void *data, size_t content_size); */
|
|
||||||
|
|
||||||
char *ft_putast(void *node);
|
char *ft_putast(void *node);
|
||||||
void ft_putast2(void *node);
|
void ft_putast2(void *node);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/13 17:11:48 by jhalford #+# #+# */
|
/* Created: 2016/12/13 17:11:48 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/20 10:38:12 by jhalford ### ########.fr */
|
/* Updated: 2017/03/22 17:22:52 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -88,8 +88,6 @@ typedef struct s_errormatch t_errormatch;
|
||||||
typedef struct s_treematch t_treematch;
|
typedef struct s_treematch t_treematch;
|
||||||
typedef struct s_distrostree t_distrostree;
|
typedef struct s_distrostree t_distrostree;
|
||||||
|
|
||||||
t_data *data_singleton();
|
|
||||||
|
|
||||||
enum e_sym
|
enum e_sym
|
||||||
{
|
{
|
||||||
LINEBREAK = 1,
|
LINEBREAK = 1,
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
|
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/22 16:20:31 by gwojda #+# #+# */
|
/* Created: 2017/03/22 16:20:31 by gwojda #+# #+# */
|
||||||
/* Updated: 2017/03/22 16:21:12 by gwojda ### ########.fr */
|
/* Updated: 2017/03/22 17:17:28 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
|
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/20 14:45:40 by gwojda #+# #+# */
|
/* Created: 2017/03/20 14:45:40 by gwojda #+# #+# */
|
||||||
/* Updated: 2017/03/22 17:13:06 by jhalford ### ########.fr */
|
/* Updated: 2017/03/22 17:25:20 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -43,8 +43,7 @@ static int handle_instruction(t_list **token, t_btree **ast)
|
||||||
return (ret);
|
return (ret);
|
||||||
if (do_lexer_routine(token, stream) > 0)
|
if (do_lexer_routine(token, stream) > 0)
|
||||||
continue ;
|
continue ;
|
||||||
token_print(*token);
|
/* token_print(*token); */
|
||||||
exit(1);
|
|
||||||
if ((ret = do_parser_routine(token, ast)) == 1
|
if ((ret = do_parser_routine(token, ast)) == 1
|
||||||
&& SH_NO_INTERACTIVE(data->opts))
|
&& SH_NO_INTERACTIVE(data->opts))
|
||||||
return (ret);
|
return (ret);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue