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> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
typedef struct s_read t_read;
|
||||
typedef struct s_readopt t_readopt;
|
||||
|
||||
struct s_read
|
||||
struct s_read
|
||||
{
|
||||
t_flag opts;
|
||||
char **names;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
# define JOBS_OPT_L (1 << 0)
|
||||
|
||||
struct s_jobc
|
||||
struct s_jobc
|
||||
{
|
||||
t_list *first_job;
|
||||
pid_t shell_pgid;
|
||||
|
|
@ -75,9 +75,11 @@ void sigttou_handler(int signo);
|
|||
|
||||
int process_cmp_pid(t_process *p, pid_t *pid);
|
||||
void process_format(t_list **p, int firstp, int opts);
|
||||
|
||||
/*
|
||||
** Mapping pour afficher les process
|
||||
*/
|
||||
|
||||
void pprint(t_process *p);
|
||||
int pprint_subshell(t_process *p);;
|
||||
int pprint_brace(t_process *p);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
# include "libft.h"
|
||||
# include "types.h"
|
||||
|
||||
enum e_lexstate
|
||||
enum e_lexstate
|
||||
{
|
||||
DEFAULT,
|
||||
PAREN,
|
||||
|
|
@ -37,7 +37,7 @@ enum e_lexstate
|
|||
END,
|
||||
};
|
||||
|
||||
struct s_token
|
||||
struct s_token
|
||||
{
|
||||
t_type type;
|
||||
char *data;
|
||||
|
|
@ -46,7 +46,7 @@ struct s_token
|
|||
int size;
|
||||
};
|
||||
|
||||
struct s_lexer
|
||||
struct s_lexer
|
||||
{
|
||||
char *str;
|
||||
int pos;
|
||||
|
|
@ -55,7 +55,7 @@ struct s_lexer
|
|||
t_list *heredoc_stack;
|
||||
};
|
||||
|
||||
struct s_rvwords
|
||||
struct s_rvwords
|
||||
{
|
||||
char *word;
|
||||
int type;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 "completion.h"
|
||||
# include "hash.h"
|
||||
/* # define malloc(x) NULL */
|
||||
|
||||
# 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__))
|
||||
|
||||
#ifndef DEBUG
|
||||
# define DEBUG_MODE 0
|
||||
#else
|
||||
# define DEBUG_MODE 1
|
||||
#endif
|
||||
|
||||
struct s_data
|
||||
{
|
||||
t_flag opts;
|
||||
|
|
@ -61,6 +54,7 @@ struct s_data
|
|||
t_list *lst_func;
|
||||
};
|
||||
|
||||
t_data *data_singleton();
|
||||
int shell_init(int ac, char **av);
|
||||
void shell_exit(void);
|
||||
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_resetsig(void);
|
||||
/* void content_free(void *data, size_t content_size); */
|
||||
|
||||
char *ft_putast(void *node);
|
||||
void ft_putast2(void *node);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
# define SH_IS_INTERACTIVE(b) (b & SH_INTERACTIVE)
|
||||
# define SH_NO_INTERACTIVE(b) !(b & SH_INTERACTIVE)
|
||||
|
||||
# define SH_MSG_NOJOBC "no job-control"
|
||||
# define SH_MSG_NOJOBC "no job-control"
|
||||
|
||||
typedef long long t_type;
|
||||
typedef long long t_flag;
|
||||
|
|
@ -88,8 +88,6 @@ typedef struct s_errormatch t_errormatch;
|
|||
typedef struct s_treematch t_treematch;
|
||||
typedef struct s_distrostree t_distrostree;
|
||||
|
||||
t_data *data_singleton();
|
||||
|
||||
enum e_sym
|
||||
{
|
||||
LINEBREAK = 1,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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);
|
||||
if (do_lexer_routine(token, stream) > 0)
|
||||
continue ;
|
||||
token_print(*token);
|
||||
exit(1);
|
||||
/* token_print(*token); */
|
||||
if ((ret = do_parser_routine(token, ast)) == 1
|
||||
&& SH_NO_INTERACTIVE(data->opts))
|
||||
return (ret);
|
||||
|
|
|
|||
Loading…
Reference in a new issue