math fix + historique done fi
This commit is contained in:
parent
ffd7f81a71
commit
2f0fc3b511
3 changed files with 6 additions and 7 deletions
|
|
@ -6,14 +6,14 @@
|
||||||
# By: wescande <wescande@student.42.fr> +#+ +:+ +#+ #
|
# By: wescande <wescande@student.42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2016/08/29 21:32:58 by wescande #+# #+# #
|
# Created: 2016/08/29 21:32:58 by wescande #+# #+# #
|
||||||
# Updated: 2017/03/23 16:49:08 by gwojda ### ########.fr #
|
# Updated: 2017/03/23 17:01:20 by ariard ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
NAME = 42sh
|
NAME = 42sh
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
FLAGS = -Wall -Wextra -Werror #-fvisibility=hidden -fsanitize=address
|
FLAGS = -Wall -Wextra -Werror -fvisibility=hidden -fsanitize=address
|
||||||
D_FLAGS = -g
|
D_FLAGS = -g
|
||||||
|
|
||||||
DELTA = $$(echo "$$(tput cols)-47"|bc)
|
DELTA = $$(echo "$$(tput cols)-47"|bc)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/17 18:54:00 by ariard #+# #+# */
|
/* Created: 2017/03/17 18:54:00 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/23 16:56:57 by ariard ### ########.fr */
|
/* Updated: 2017/03/23 17:16:43 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -56,7 +56,7 @@ int builtin_math(const char *path, char *const av[], char *const envp[])
|
||||||
return (SH_ERR(MATHERR_3, operand));
|
return (SH_ERR(MATHERR_3, operand));
|
||||||
if (!(value = do_math(value, operator, operand)))
|
if (!(value = do_math(value, operator, operand)))
|
||||||
return (1);
|
return (1);
|
||||||
builtin_setenv("setenv", (char *[]){"math", av[1], value, 0}, NULL);
|
builtin_setenv("setenv", (char *[]){"local", av[1], value, 0}, NULL);
|
||||||
ft_strdel(&value);
|
ft_strdel(&value);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/20 19:12:50 by ariard #+# #+# */
|
/* Created: 2017/03/20 19:12:50 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/22 16:38:33 by gwojda ### ########.fr */
|
/* Updated: 2017/03/23 17:25:03 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -17,9 +17,8 @@ int isrw_delim(t_type type)
|
||||||
return (type == TK_NEWLINE || type == TK_AMP
|
return (type == TK_NEWLINE || type == TK_AMP
|
||||||
|| type == TK_SEMI || type == TK_PIPE
|
|| type == TK_SEMI || type == TK_PIPE
|
||||||
|| type == TK_WHILE || type == TK_UNTIL
|
|| type == TK_WHILE || type == TK_UNTIL
|
||||||
|| type == TK_DONE || type == TK_RBRACE
|
|
||||||
|| type == TK_DO || type == TK_IF
|
|| type == TK_DO || type == TK_IF
|
||||||
|| type == TK_FI || type == TK_THEN
|
|| type == TK_THEN || type == TK_RBRACE
|
||||||
|| type == TK_ELIF || type == TK_ELSE
|
|| type == TK_ELIF || type == TK_ELSE
|
||||||
|| type == TK_DSEMI || type == TK_PAREN_CLOSE
|
|| type == TK_DSEMI || type == TK_PAREN_CLOSE
|
||||||
|| type == TK_PAREN_OPEN || type == TK_LBRACE
|
|| type == TK_PAREN_OPEN || type == TK_LBRACE
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue