with math
This commit is contained in:
commit
d30519ced2
8 changed files with 15 additions and 11 deletions
|
|
@ -60,6 +60,7 @@ completion/c_terminal.c\
|
||||||
completion/completion.c\
|
completion/completion.c\
|
||||||
exec/ast_free.c\
|
exec/ast_free.c\
|
||||||
exec/bad_fd.c\
|
exec/bad_fd.c\
|
||||||
|
exec/error_badidentifier.c\
|
||||||
exec/exec_ampersand.c\
|
exec/exec_ampersand.c\
|
||||||
exec/exec_and_if.c\
|
exec/exec_and_if.c\
|
||||||
exec/exec_case.c\
|
exec/exec_case.c\
|
||||||
|
|
@ -97,7 +98,6 @@ exec/redirect_less.c\
|
||||||
exec/redirect_lessand.c\
|
exec/redirect_lessand.c\
|
||||||
exec/set_exitstatus.c\
|
exec/set_exitstatus.c\
|
||||||
exec/set_process.c\
|
exec/set_process.c\
|
||||||
exec/error_badidentifier.c\
|
|
||||||
glob/command_getoutput.c\
|
glob/command_getoutput.c\
|
||||||
glob/dir_glob.c\
|
glob/dir_glob.c\
|
||||||
glob/esc_print.c\
|
glob/esc_print.c\
|
||||||
|
|
@ -236,12 +236,12 @@ parser/add_cmd.c\
|
||||||
parser/add_condition.c\
|
parser/add_condition.c\
|
||||||
parser/add_func.c\
|
parser/add_func.c\
|
||||||
parser/add_loop.c\
|
parser/add_loop.c\
|
||||||
|
parser/add_math.c\
|
||||||
|
parser/add_number.c\
|
||||||
parser/add_redir.c\
|
parser/add_redir.c\
|
||||||
parser/add_sep.c\
|
parser/add_sep.c\
|
||||||
parser/add_subshell.c\
|
parser/add_subshell.c\
|
||||||
parser/add_var.c\
|
parser/add_var.c\
|
||||||
parser/add_number.c\
|
|
||||||
parser/add_math.c\
|
|
||||||
parser/aggregate_sym.c\
|
parser/aggregate_sym.c\
|
||||||
parser/build_tree.c\
|
parser/build_tree.c\
|
||||||
parser/error_syntax.c\
|
parser/error_syntax.c\
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 318efc7cfb7b7cc9d3714fa19fd2be7382b6adec
|
Subproject commit 6a6a23b2839a5ec7322bdc6adbb2d3dad3d1023c
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/13 13:09:57 by jhalford #+# #+# */
|
/* Created: 2016/12/13 13:09:57 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/02 21:00:13 by jhalford ### ########.fr */
|
/* Updated: 2017/03/07 11:05:55 by gwojda ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -27,6 +27,7 @@ t_stof g_builtin[] =
|
||||||
{"bg", &builtin_bg},
|
{"bg", &builtin_bg},
|
||||||
{"read", &builtin_read},
|
{"read", &builtin_read},
|
||||||
{"hash", &builtin_hash},
|
{"hash", &builtin_hash},
|
||||||
|
{"history", &builtin_history},
|
||||||
{NULL, NULL},
|
{NULL, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/07 10:58:49 by ariard #+# #+# */
|
/* Created: 2017/03/07 10:58:49 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/07 13:33:49 by ariard ### ########.fr */
|
/* Updated: 2017/03/07 13:42:11 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/07 11:12:05 by ariard #+# #+# */
|
/* Created: 2017/03/07 11:12:05 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/07 12:17:13 by ariard ### ########.fr */
|
/* Updated: 2017/03/07 14:40:30 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
|
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/02/06 16:09:27 by wescande #+# #+# */
|
/* Created: 2017/02/06 16:09:27 by wescande #+# #+# */
|
||||||
/* Updated: 2017/03/03 20:38:36 by wescande ### ########.fr */
|
/* Updated: 2017/03/07 12:07:53 by wescande ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -73,7 +73,8 @@ void expand_var(t_glob *gl)
|
||||||
{
|
{
|
||||||
if (var && *var)
|
if (var && *var)
|
||||||
{
|
{
|
||||||
content = ft_getenv(data_singleton()->env, var);
|
if (!(content = ft_getenv(data_singleton()->env, var)))
|
||||||
|
content = ft_getenv(data_singleton()->local_var, var);
|
||||||
insert_var(gl, pat, var, content);
|
insert_var(gl, pat, var, content);
|
||||||
pat = gl->pat;
|
pat = gl->pat;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
|
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/15 14:19:48 by gwojda #+# #+# */
|
/* Created: 2016/12/15 14:19:48 by gwojda #+# #+# */
|
||||||
/* Updated: 2017/03/04 16:50:05 by ariard ### ########.fr */
|
/* Updated: 2017/03/07 11:20:27 by gwojda ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -39,6 +39,8 @@ void ft_init_history(void)
|
||||||
return ;
|
return ;
|
||||||
while (get_next_line(fd, &str) > 0)
|
while (get_next_line(fd, &str) > 0)
|
||||||
{
|
{
|
||||||
|
if (!*str)
|
||||||
|
continue ;
|
||||||
ft_push_back_history(&data_singleton()->line.list_beg,
|
ft_push_back_history(&data_singleton()->line.list_beg,
|
||||||
ft_create_history_list(str));
|
ft_create_history_list(str));
|
||||||
free(str);
|
free(str);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/03 15:08:16 by ariard #+# #+# */
|
/* Created: 2017/03/03 15:08:16 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/07 10:47:43 by ariard ### ########.fr */
|
/* Updated: 2017/03/07 14:40:21 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue